Community
Participate
Working Groups
Get git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git BETA_JAVA8 and git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git master into Eclipse Open new workspace Clone https://github.com/nurkiewicz/LazySeq. I used the CLI as I did not have then maven plugin at this time. run mvn eclipse:eclipse compile (with the Java 8 EA) Create the library M2_REPO, point to ~/.m2/repository Here is the tail of the stack trace at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:140) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:85) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:75) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:100) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:140) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:85) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:75) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:100) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:140) at org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor.visit(TypeBindingVisitor.java:85)
Manoj, please extract a small test case please. TIA.
Created attachment 233265 [details] Small Test case reproducing the problem
See Stephan's comment in https://bugs.eclipse.org/bugs/show_bug.cgi?id=378674#c19
Created attachment 233308 [details] Proposed Patch This solves the stack overflow issue mentioned in the bug; however, there is another build issue that comes while compiling the project which is tracked as bug 412650
(In reply to comment #4) > Created attachment 233308 [details] > Proposed Patch > > This solves the stack overflow issue mentioned in the bug; however, there is > another build issue that comes while compiling the project which is tracked > as bug 412650 Patch looks good. I would make one change though. Instead of adding the boolean visited as a field of TypeBinding, we could associate with the TypeBindingVisitor some data structure that tracks visited objects. That would (a) minimize the memory pressure (b) eliminate the need to clear the visited flag as done in the present patch. Please make this change and release. Thanks.
Created attachment 233529 [details] Proposed Patch Modified as per the review comment.
Released via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=807a76e3a3770379eee00c55de0aa0f44ab7094a
It's a pity my work in branch sherrmann/NewTypeInference is getting stale. As mentioned in the linked bug 378674 comment 19 I got away with a flag in only TypeVariableBinding and WildcardBinding. Even folding this into tagBits should be possible. Just mentioning that I still believe the SimpleSet is avoidable here. May not be a big issue, though :)
(In reply to comment #8) >Even folding this into tagBits should > be possible. Just mentioning that I still believe the SimpleSet is avoidable > here. > May not be a big issue, though :) Srikanth did discuss this as an alternative and we had noted that we would have to clear the flag (as was done in the earlier patch) while a set based structure would be tied to TypeBindingVisitor rather than the type and gets initialized for every TypeBindingVisitor. If it helps in anyway, we can move to the tagbits solution as well.