shiika icon indicating copy to clipboard operation
shiika copied to clipboard

Improve error message of return type mismatch

Open yhara opened this issue 2 years ago • 0 comments

Given

class A
  def to_s   # Forgot  `-> String`
    "??"
  end
end
puts A.new.to_s

Actual

Error: the argument str' of Object#puts' should be String but got Void

Expected

Something like "Error: A#to_s must be return String"

yhara avatar Aug 20 '22 23:08 yhara