Bug 108448 - IllegalStateException: Undeclared type variable when hiding
Summary: IllegalStateException: Undeclared type variable when hiding
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 02:35 EDT by Wes Isberg CLA
Modified: 2005-08-31 09:20 EDT (History)
0 users

See Also:


Attachments
ajcore text file (8.54 KB, text/plain)
2005-08-31 02:36 EDT, Wes Isberg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2005-08-31 02:35:46 EDT
ISE thrown compiling http://sourceforge.net/projects/collections 4.0beta3 source.
javac issues two warnings, but Eclipse 3.1 (JDT) issues *many* for type
parameter hiding types (perhaps bug 103783).  I haven't isolated a test case or
tried it on earlier releases - sorry.
Comment 1 Wes Isberg CLA 2005-08-31 02:36:43 EDT
Created attachment 26684 [details]
ajcore text file
Comment 2 Adrian Colyer CLA 2005-08-31 05:45:47 EDT
I recognise that stack trace :)

The collections project looks like a good way of hammering our generics support.
I'll download it and give it a spin...
Comment 3 Adrian Colyer CLA 2005-08-31 06:17:02 EDT
I've improved the error handling inside ajc so that we get much better
diagnostics on errors like this in the future. The compiler now fails with an
IllegalStateException that says:

"While determing the generic superinterfaces of
org.apache.commons.collections15.list.FastArrayList$SubList$SubListIter with
generic signature Ljava/lang/Object;Ljava/util/ListIterator<TE;>; the following
error was detected: Undeclared type variable in signature: E"

Much more like it :)
Now I can go ahead and make the fix (not chasing up *all* the outer types to
find type variables, we are only looking at immediate enclosing types at the
moment), and if we encounter similar situations in the future we should be able
to debug much more directly from the error report.
Comment 4 Adrian Colyer CLA 2005-08-31 07:34:13 EDT
Put in place a straightforward fix to walk *all* outer types while looking for
type variables in scope. ajc now compiles the collections project without error.
Just running the full suite before commiting...
Comment 5 Adrian Colyer CLA 2005-08-31 09:20:04 EDT
fix now available in latest published build on the downloads page.