Closed j2ren closed 5 years ago
In this example, it is legal for M#bar (through C) to call foo even though M does not have an ancestor that has foo as a method.
module M2 type :foo ... def foo end end
module M type :bar ... def bar foo end end
class C include M2 include M end
C.new.bar
The current static type checker would set "self" to M when type checking M#bar, which causes a no type error from foo.
It is resolved dev branch now!
In this example, it is legal for M#bar (through C) to call foo even though M does not have an ancestor that has foo as a method.
module M2 type :foo ... def foo end end
module M type :bar ... def bar foo end end
class C include M2 include M end
C.new.bar
The current static type checker would set "self" to M when type checking M#bar, which causes a no type error from foo.