-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make tests pass #623
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
Make tests pass #623
Conversation
Constants that are adapted to a different supertype need to do this explicitly (not just by changing the type). Otherwise tree checkers will compute the original type and fail. This caused a test failure in pos/harmonize. The mystery is why this was not caught in the checkin tests.
Previously was only done for DefDefs. Caused backend failure.
I believe the tests hang. Running locally shows that lots of tests fail, all because of the revert of 78aa682. If 78aa682 is enabled junit tests fail because we cannot compile ClassPath. Users/odersky/workspace/dotty/tests/run> dotc arybufgrow.scala -d /classes The other failures are similar. I am at the end of what I can do. @DarkDimius you need to take this over. It's really important to get the build back to work quickly! |
@odersky, taking this over. |
this failure is indeed manifestation of reverted commit:
This is static method, that tries to access |
Curiously, the test of #580 was not affected by reverting the fix. It still works, but lots of other run tests fail. So I am bringing it back. @DarkDimius over to you now. |
@DarkDimius You might want to cherry-pick db11fc5 |
c6c4c9f
to
dd80fe0
Compare
/rebuild |
@DarkDimius : Can you get this to rebuild? It seems that Jenkins restarted and now it's stuck saying "validate-partest — [85] Building. " even though the job was aborted. |
See scala#624 (comment) for a lengthy explanation.
Forced rebuild by changing the commit message. |
Partest now finish running! It fails because of |
@smarter, we should not disable checking of lamdas. Tests exist to ensure that the way how lambdas are generated does not change without our notice. |
OK, I just updated the check file, but this might be annoying if we change the details of lambda generation often. |
- Only transform static methods which are inside module classes. - Make sure that the prefix of the underlying type of the Ident is a ThisType of the current module class. For example in "scala.Int.box(42)", "box" is an Ident whose underlying type is "TermRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,scala)),Int$)),box)", but we should not trigger an assertion in this case.
After fixing |
/synch |
// so instead we require this phase to run after Flatten and use meth.owner | ||
if (meth.is(JavaStatic) && meth.owner.is(ModuleClass)) { | ||
tree.tpe match { | ||
case TermRef(thiz: ThisType, _) if (thiz.underlying.typeSymbol == meth.owner) => |
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.
Instead of .underlying.termSymbol
it's simpler to use just .cls
.
LGTM. Glad to have this working in master. |
Subsumes #621, adding fixes for the test failures. #580 is open again. @review by @DarkDimius @smarter