JDK-8044804 : Repeated use of TypeVariable name crashes javac
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-06-04
  • Updated: 2015-01-30
  • Resolved: 2015-01-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Description
The following program crashes javac:

--- 8< ---
public class Test <T1, T1 extends MyObject, T2> {}

class MyObject {}
----------

The problem (IIRC) is the error message accesses the tsym.type of T1 or MyObject before it is attributed.
Comments
MemberEnter.complete() gets called during error reporting as part of Kinds.kindName(), we are currently in the first round of Enter: DefaultTestRunner:Worker-0:0@1288, prio=4, in group 'main', status: 'RUNNING' at com.sun.tools.javac.comp.MemberEnter.baseEnv(MemberEnter.java:1203) at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:980) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:566) at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1051) at com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:985) at com.sun.tools.javac.code.Symbol$ClassSymbol.getKind(Symbol.java:1118) at com.sun.tools.javac.code.Kinds.kindName(Kinds.java:162) at com.sun.tools.javac.comp.Check.duplicateError(Check.java:325) at com.sun.tools.javac.comp.Check.checkUnique(Check.java:3403) at com.sun.tools.javac.comp.Enter.visitTypeParameter(Enter.java:451) at com.sun.tools.javac.tree.JCTree$JCTypeParameter.accept(JCTree.java:2416) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:260) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:274) at com.sun.tools.javac.comp.Enter.visitClassDef(Enter.java:415) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:745)
09-09-2014