-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support Scala 2.12 Mixins #2685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Scala 2.12 Mixins #2685
Conversation
In compiler/test/dotc/tests.scala there is a reference to LinkScala2ImplClasses.scala that needs to be renamed. |
@@ -399,9 +399,15 @@ object Flags { | |||
/** A module variable (Scala 2.x only) */ | |||
final val Scala2ModuleVar = termFlag(57, "<modulevar>") | |||
|
|||
/** A Scala 2.12 trait that has been augmented with static members */ | |||
final val Scala_2_12_Augmented = typeFlag(57, "<scala12augmented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the convention about type flag names, but this is the only one with <
, but without >
.
Should it be <scala12augmented>
instead?
@@ -734,7 +734,7 @@ object Denotations { | |||
this | |||
case _ => | |||
if (coveredInterval.containsPhaseId(ctx.phaseId)) { | |||
if (ctx.debug) ctx.traceInvalid(this) | |||
if (ctx.debug || true) ctx.traceInvalid(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line looks strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catches, thanks!
Speed up construction and testing of base class sets. Use a linear search with automatic bubbling up of hits.
Adapt to either 2.11 or 2.12 scheme.
Don't mention ImplClasses in the name since they do not exist in the scheme for 2.12.
f43ee97
to
f521a5a
Compare
@@ -70,26 +70,29 @@ object Mode { | |||
/** We are currently unpickling Scala2 info */ | |||
val Scala2Unpickling = newMode(13, "Scala2Unpickling") | |||
|
|||
/** We are currently unpickling from Java 8 or higher */ | |||
val Java8Unpickling = newMode(14, "Java8Unpickling") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to leave a note that it is used as heuristic to find scala 2.12
Otherwise LGTM. |
This PR is a first step to Scala 2.12 support from Dotty. It makes it possible for Dotty to extend traits compiled with Scala 2.12.