Bug 86217 - NPE resolving bounds of Type Variable
Summary: NPE resolving bounds of Type Variable
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 86133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-22 18:38 EST by Tim Hanson CLA
Modified: 2005-03-31 07:04 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hanson CLA 2005-02-22 18:38:02 EST
Compiling this file:

class Dep < T extends Dep.Inner2 > extends Parent
{
}

class Parent {
    static class Inner2{}
}


produces this stacktrace:
1. ERROR in B.java
 (at line 0)
        class Dep < T extends Dep.Inner2 > extends Parent
        ^
Internal compiler error
java.lang.NullPointerException
        at org.eclipse.jdt.internal.compiler.lookup.ClassScope.checkForInherited
MemberTypes(ClassScope.java:623)
        at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierar
chy(ClassScope.java:856)
        at org.eclipse.jdt.internal.compiler.lookup.Scope.findMemberType(Scope.j
ava:836)
        at org.eclipse.jdt.internal.compiler.lookup.Scope.getMemberType(Scope.ja
va:2053)
        at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.findNext
TypeBinding(QualifiedTypeReference.java:41)
        at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeB
inding(QualifiedTypeReference.java:70)
        at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeR
eference.java:141)
        at org.eclipse.jdt.internal.compiler.lookup.Scope.connectTypeVariables(S
cope.java:325)
        at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierar
chy(ClassScope.java:845)
        at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connect
TypeHierarchy(CompilationUnitScope.java:243)
        at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTy
peBindings(LookupEnvironment.java:195)
        at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.ja
va:307)
        at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:321)

        at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.
java:2366)
        at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1106)
        at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1011)

----------
1 problem
Comment 1 Philipe Mulet CLA 2005-02-22 19:04:03 EST
*** Bug 86133 has been marked as a duplicate of this bug. ***
Comment 2 Kent Johnson CLA 2005-02-24 14:08:00 EST
Added GenericType test526

Needed to resolve superclass/superinterface refs before typeVariables
Comment 3 Kent Johnson CLA 2005-02-24 14:12:11 EST
Make that test528
Comment 4 David Audel CLA 2005-03-31 07:04:21 EST
Verified in I20050330-0500