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
[[syntax trees at end of genBCode]] // playground.scalapackage<empty> {
@SourceFile("playground.scala") traitA() extendsObject {
deffoo():Nothing=???()
}
}
Scala 2
[[syntax trees at end of jvm]] // playground.scalapackage<empty> {
abstracttraitAextendsObject {
deffoo():Nothing= scala.Predef.???();
def/*A*/$init$():Unit= {
()
}
}
}
Expectation
Scala 3 should follow Scala 2 rules to emit trait constructors under -Ycompile-scala2-library.
Notes
The rules for trait constructors were briefly mentionned in #10530.