Bug 336880

Summary: confusion in bounds analysis when ITD uses multiple type variables
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.6.11   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Clement CLA 2011-02-10 16:38:03 EST
This bug needs an ITD that uses multiple type variables and those type variables have constraints.  e.g.

<R extends I1, T extends I2> T II.foo(R r, Class<T> ct) 

when this is called (in a complicated separate compilation scenario), the bounds checking can get confused and start using the first argument to the call when checking the bounds of the second parameter.

e.g.

foo(A,B)

it may bounds check whether A satisfies the 'T extends I2' constraint
Comment 1 Andrew Clement CLA 2011-02-10 17:01:32 EST
The problem here is the type variable rank is not preserved - meaning on deserialization and use in a subsequent weave step we have lose the index of the typevariable.  The both default to '0' and this means the array manipulation that infers how arguments obey bound constraints ends up stepping onto itself (in InferenceContext.recordSubstitute)
Comment 2 Andrew Clement CLA 2011-02-10 17:53:36 EST
fixed, one liner in ResolvedMemberImpl deserialization.