-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add/simplify primitives #598
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
Conversation
60c179d
to
3594109
Compare
/rebuild |
1 similar comment
/rebuild |
@@ -386,6 +386,9 @@ object SymDenotations { | |||
/** Is symbol a primitive value class? */ | |||
def isPrimitiveValueClass(implicit ctx: Context) = defn.ScalaValueClasses contains symbol | |||
|
|||
/** Is symbol a primitive value class? */ | |||
def isNumericValueClass(implicit ctx: Context) = defn.ScalaNumericValueClasses contains symbol |
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.
Neither name nor comment explains what this method does. Comment says nothing about class being numeric, and name of the method does not say anything about class being primitive. Methods tests for both of those.
Otherwise LGTM. |
3594109
to
f5a70a2
Compare
Added comments and rebased to master. |
Harmonization is Dotty's alternative to Scala 2's notion of weak conformance. It is less powerful but also less entangled with the core type system. The idea is that in some specific contexts trees that all have primitive numeric types will be converted as necessary so that they all have the same numeric type. These tree sets are: - the two branches of an if - the alternatives of a match - the body together with the catch blocks of a try - the arguments of a vararg parameter Examples are in the test file, harmonize.scala.
f5a70a2
to
d07d669
Compare
Harmonize trees with numeric types to have the same type. Dotty's alternative to Scala 2's concept of weak conformance. Review by @DarkDimius