shiika icon indicating copy to clipboard operation
shiika copied to clipboard

`1 == true` should be compile error

Open yhara opened this issue 3 years ago • 0 comments

1 == true passes type check due to the current definition of Object#==.

Maybe there should be something like self type? (todo: study other languages)

class Object
  def ==(other: self) -> Bool
    ...

yhara avatar Oct 26 '21 13:10 yhara