-
Notifications
You must be signed in to change notification settings - Fork 21
Build manager incorrectly reports errors against Java inner classes #3133
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-3133?orig=1
|
David Chase (dr2chase) said: |
@milessabin said: I can confirm that no errors are reported (correctly) which command line scalac is invoked on it in the usual mode. However when scalac is invoked with -Ybuilder-debug:refined specified (which replicates the behaviour of incremental builds in Eclipse) the (incorrect) error in the description is reported. So it looks like a build manager issue to me ... |
Sam Reid (samreid) said: Here's a more minimal error case (place in package test): package test;
public class Test {
public static interface TestInterface{}
public Test(TestInterface ti){}
} Note that if the constructor arg type is changed to Test.TestInterface, then the build completes properly. |
David Chase (dr2chase) said: Description Resource Path Location Type
type WrappedKey is not a member of object GHashMap GHashMap.java /Bug/src line 104 Scala Problem where the line in question reads this(hasher, new HashMap<WrappedKey, V>()); So your revised example, strictly speaking, is too minimal. |
David Chase (dr2chase) said: private GHashMap(Hasher<K> hasher, HashMap<GHashMap.WrappedKey, V> map) { I've tinkered with adding type parameters to GHashMap, no luck. |
David Chase (dr2chase) said: private GHashMap(Hasher<K> hasher, HashMap map) {
this.hasher = hasher;
this.map = (HashMap<GHashMap.WrappedKey, V>) map;
} (Yuck.) |
In an upgrade to 2.8.0, I noticed a bunch of errors where references to inner classes triggered errors -- despite being legal Java, despite not causing problems in an ant build using 2.8.0prebeta1. Here is a small example, attached as a zip file of a small project (three Java files in a Scala project) demonstrating (I hope) how this goes wrong.
The offending file/line is GHashMap.java, line 104, with the reference to !WrappedKey "not found". !WrappedKey is defined on line 38 (and F3 will take you there!). Notice other mentions of !WrappedKey that do not cause problems to be reported. Qualifying it explicitly did not help, at least for me.
Everything involved is up-to-date as of earlier today, March 2.
This is the most boring code I could find that would exhibit this problem. It does not seem to be directly referenced from any Scala code in the larger project from which it was extracted.
The text was updated successfully, but these errors were encountered: