-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add a test for supercalls in traits. #611
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
Add a test for supercalls in traits. #611
Conversation
6c276dc
to
0733b5f
Compare
()Unit translates to ()BoxedUnit not BoxedUnit.
A class might implement several fields in inherited traits with the same and type. In that case only one getter should be produced, but all initializing expressions have to be executed.
Also added non-unit fields and a class that directly implements two traits with the same fields.
0733b5f
to
05679f3
Compare
Added fixes and rebased to master. |
I get a non-zero exit code on run/t261.scala. But running the test manually succeeds with the expected output. Can someone help me to figure out what might be wrong here? |
t261.scala also runs fine for me from command line, but fails in partest. |
Ok, after cleaning environment on my machine(git clean) t261 also fails in CLI.
Seems like this is a real bug in dotty. |
05679f3
to
512bb15
Compare
rebased over commit that will force jenkins to be more verbose about why tests fail. In particular, it should print the exception message shown above |
running |
Cool, now that's progress! So it sounds like the dotc script needs to clean up/rebuild some more things than it does now? |
OK, let me summarize, even though it's probably obvious. We have two issues (1) Why does git clean make a difference. We seem to have some classpath (2) Why the difference between partest and local run?
On Wed, May 27, 2015 at 9:07 PM, Dmitry Petrashko [email protected]
Martin Odersky |
t261 was succeeding in local run for me before I deleted class-files that had in @odersky, which command do you use to run dotty-generated files? |
In my case, the source of problem was: |
I just use
to run. |
Hmm. I don't have any classes in workspace/dotty. |
@DarkDimius Good to see the excepion trace that caused the error. And it's quite likely it has something to do with the changes. But I am still puzzled why I am not seeing this if I run the tests locally. |
As you aren't including the dotty-defined or scala-define artifacts in the classpath, where does eg:
|
Predef and Runtime are on my classpath. |
I checked the javap output and I do find a B$$foo in Test$. So it seems the partest is somehow pulling in a different classfile. public java.lang.String B$$foo(); |
@odersky, can you please show your entire classpath? I guess the problem could be a similar one, with shadowing on classpath.
|
@odersky could you please run |
@DarkDimius Here's the transcript of what I did: /Users/odersky/workspace/dotty/tests/run> dotc t261.scala -d /classes |
On 2bfbb8e there is a @odersky If you are using the provided |
I now did the following:
The test succeeds. Which seems to show that partest suffers from classfile pollution, not the local setup. |
can you please run this command in project root and show it's output: |
Should be improved in #615. Relies on timestamps received from filesystem. |
@odersky, you could see class files generated by partest in |
Here's a hypothesis: Is it true that the output directory of partest is on the classpath? If yes, then could it be that the failing test is compiled by the compiler compiled by dotc itself, not the one originally built? Here's a full transcript of what I did. There's no room for error that I can see here. The "2233" suffix was introduced freshly; it is used nowhere else.
|
On 28 May 2015 09:40:42 odersky [email protected] wrote:
Partest uses output directory per test. And it doesn't compile dotty, as Dotty compiled by dotty currently dies with NPE during initialization of
|
(Palm slaps face) I was on the wrong git branch when I tested. I could reproduce now with the setup I showed. |
Fixes problem with run/t261.scala.
512bb15
to
7779b8f
Compare
@smarter showed me how to get the git branch displayed in the bash prompt, it has definitely prevented a lot of confusion since: http://code-worrier.com/blog/git-branch-in-bash-prompt/ |
@vsalvis, you'd better not follow this guide. Because
@odersky there's also a
|
LGTM. |
Add a test for supercalls in traits.
review by @odersky