-
Notifications
You must be signed in to change notification settings - Fork 21
NullPointerException using abstract class value #9934
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9934?orig=1 |
@SethTisue said: |
Rodrigo Fernandes (rtfpessoa) said (edited on Sep 27, 2016 5:19:29 PM UTC): This only happened when running all the tests. If I ever did testOnly it would work just fine. Completely weird. I know this is very few information. But all my tests would never replicate this in an isolated way. Edit: I only found that #5366 was related after I created this issue. I could not get it by the title. |
@som-snytt said: |
Rodrigo Fernandes (rtfpessoa) said: |
@som-snytt said: |
Rodrigo Fernandes (rtfpessoa) said: |
Rodrigo Fernandes (rtfpessoa) said: |
@som-snytt said (edited on Sep 28, 2016 7:49:19 PM UTC): |
Rodrigo Fernandes (rtfpessoa) said: |
@SethTisue said: |
I have a very weird bug in my code.
I am using Scala 2.11.7 and also tried with 2.11.8.
Problem
I get a NullPointerException when trying to access an abstract class value that contains a default value.
Example
I not always get a NullPointerException, it only happens in the tests if I run all the tests. If I run the test that fails with testOnly it passes.
I was going crazy since yesterday and today I had the idea to change the code to explicitly pass the "default":
And now it works fine.
Do you have any ideas about what can be going wrong here?
EDIT:
The line 134 is the one with
val specificTypeRules ....
I just updated the base classes and the rest of the code like it was, before I started changing it (as best as I could). I did lots of testing before understanding the error and I mostly did not commit before I had it fixed.
The text was updated successfully, but these errors were encountered: