Project: AspectJ
Bug 99168 [generics][itds] ITD on generic inner class crashes ajc
Reported: 2005-06-09 11:21:17 | Status: resolved fixed

inter-type declaration on a generic inner class crashes the compiler: class Outer { class Inner {} class Generic_Inner<T> {} } class Generic_Outer<T> { } aspect Injector { int Outer.outer; // works int Outer.Inner.inner; // works int Generic_Outer.outer; // works int Outer.Generic_Inner.inner; // crashes } /home/user/sgelin3/dev/java/ajc/new_bug/Bug.java [error] Internal compiler error java.lang.RuntimeException: can't handle: class Generic_Inner#RAW extends NULL TYPENULL SUPERINTERFACES enclosing type : OuterNULL FIELDSNULL METHODS at org.aspectj.ajdt.internal.compiler.lookup.InterTypeScope.makeSourceTypeBinding(InterTypeScope.java:35) at org.aspectj.ajdt.internal.compiler.lookup.InterTypeScope.<init>(InterTypeScope.java:28) at org.aspectj.ajdt.internal.compiler.ast.InterTypeDeclaration.resolve(InterTypeDeclaration.java:101) at org.aspectj.ajdt.internal.compiler.ast.InterTypeFieldDeclaration.resolve(InterTypeFieldDeclaration.java:141) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1076) at org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration.resolve(AspectDeclaration.java:110) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1125) ...

Files changed in fix:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeScope.java