diff options
author | aclement <aclement> | 2005-08-12 10:18:33 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-08-12 10:18:33 +0000 |
commit | cdd9e1e85bcf2ee4045e43f5215d56b2af37295a (patch) | |
tree | 68903b9210b036d95c164840e5a5ba4a2b155fac /tests/src | |
parent | a4e1d6751e7875982992a81e02a6468af692b5c8 (diff) | |
download | aspectj-cdd9e1e85bcf2ee4045e43f5215d56b2af37295a.tar.gz aspectj-cdd9e1e85bcf2ee4045e43f5215d56b2af37295a.zip |
genericitds: Using target type variables in your ITD field declarations.
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 7cf4fa774..9dfbe2f91 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -2600,6 +2600,91 @@ <!-- sharing type variables between the ITD and the generic type --> + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 1"> + <compile files="FieldA.aj" options="-1.5"/> + <run class="FieldA"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 2"> + <compile files="FieldB.aj" options="-1.5"> + <message kind="error" line="16" text="Incorrect number of type parameters supplied. The generic type Base<N,M> has 2 type parameters, not 1."/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 3"> + <compile files="FieldC.aj" options="-1.5"/> + <run class="FieldC"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 4"> + <compile files="FieldD.aj" options="-1.5"/> + <run class="FieldD"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 5"> + <compile files="FieldE.aj" options="-1.5"/> + <run class="FieldE"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 6"> + <compile files="FieldF.aj" options="-1.5"/> + <run class="FieldF"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 7"> + <compile files="FieldG.aj" options="-1.5"/> + <run class="FieldG"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 8"> + <compile files="FieldH.aj" options="-1.5"/> + <run class="FieldH"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 9"> + <compile files="FieldI.aj" options="-1.5"> + <message kind="error" line="7" text="Type mismatch: cannot convert from List<String> to List<Integer>"/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -10"> + <compile files="FieldJ.aj" options="-1.5"/> + <run class="FieldJ"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -11"> + <compile files="FieldK.aj" options="-1.5"/> + <run class="FieldK"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -12"> + <compile files="FieldL.aj" options="-1.5"/> + <run class="FieldL"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -13"> + <compile files="FieldM.aj" options="-1.5"/> + <run class="FieldM"/> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -14"> + <compile files="FieldN.aj" options="-1.5"> + <message kind="error" line="11" text="Type parameters can not be specified in the ITD target type - the target type I is not generic."/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -15"> + <compile files="FieldO.aj" options="-1.5"> + <message kind="error" line="11" text="Intertype declarations can only be made on the generic type, not on a parameterized type. The name 'String' cannot be used as a type parameter, since it refers to a real type."/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -16"> + <compile files="FieldP.aj" options="-1.5"> + <message kind="error" line="10" text="static intertype field declarations cannot refer to type variables from the target generic type"/> + </compile> + </ajc-test> + <ajc-test dir="java5/generics/itds/sharing" title="method itd sharing type variable with generic type"> <compile files="Simple.aj" options="-1.5"/> <run class="Simple"/> |