-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix Patmat and FunctionalInterfaces, enable 61 tests that succeed. #693
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
According to the gitter discussion, it would make sense to do a PR against 2.12 that drops the name sorting. When is the best time to do this? |
89642ec
to
5dcec98
Compare
Name wrangling was incorrect previously. Now uses the `specializedFor` method in `NameOps`. An incorrect return from a pattern match in `TypeSpecializer` resulted in errors; test `genericClass_specialization` keeps an eye on those.
/rebuild |
/rebuild |
Simplifies debugging for me.
Fixes bugs in handling try-finally blocks.
/rebuild |
1 similar comment
/rebuild |
Passes all the tests on my local machine. Should be ready for review. |
/rebuild -- worker ran out of disk space |
/rebuild |
Includes fix to emission of invokeDynamic instructions in positions where expected type isn't the type of lambda being returned. SI-9387
/rebuild (we set the timeout to 0, which jenkins interpreted as 3... ugh!) |
def compare(x: Name, y: Name): Int = { | ||
if (x.isTermName && y.isTypeName) 1 | ||
else if (x.isTypeName && y.isTermName) -1 | ||
else if (x.start == y.start && x.length == y.length) 0 |
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 think you can just use
if (x eq y)
here because names are hash-consed.
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.
if (x eq y)
will not be true for TypeName('A')
and TermName('A')
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.
But you have already tested for that case
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.
Ahh, agreed than. It wasn't the case initially.
Otherwise LGTM |
@DarkDimius, why do you want to sort tparam names? Miniboxing got away without doing it and it never caused any problems. |
@VladUreche this is code that uses Scala2 specialized functions, scalac sorts type params by their name to do name mangling: |
Use x.length - y.length trick, Names are hash-consed.
@odersky comments addressed. |
Several fixes to pattern matcher and FunctionalInterfaces, as well as fixes to backend. @odersky please review.