Bug 336880 - confusion in bounds analysis when ITD uses multiple type variables
Summary: confusion in bounds analysis when ITD uses multiple type variables
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.6.11   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 16:38 EST by Andrew Clement CLA
Modified: 2011-02-10 17:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.