You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> scalac -Xcheck-macros Macro_1.scala Test_2.scala
> scala TestException in thread "main" scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:344)
at Base.foo(Test_2.scala:2)
at Test_2$package$.Test(Test_2.scala:14)
at Test.main(Test_2.scala:12)
Notice that the bridge to def foo(): Object is missing. As far as I can tell the issue is that the overridden symbol is never entered into the decls of the enclosing class, so the bridge-generation logic does not even know it exists. Surprisingly -Ycheck:all does not catch this mismatch between decls and trees.
The text was updated successfully, but these errors were encountered:
Compiler version
Latest main: 58810fd
Minimized code
Macro_1.scala
:Test_2.scala
:Output
Expectation
Analysis
The output from
-Xprint:erasure
contains:Notice that the bridge to
def foo(): Object
is missing. As far as I can tell the issue is that the overridden symbol is never entered into the decls of the enclosing class, so the bridge-generation logic does not even know it exists. Surprisingly -Ycheck:all does not catch this mismatch between decls and trees.The text was updated successfully, but these errors were encountered: