diff options
Diffstat (limited to 'tests/java5/generics/itds/sharing/CtorH.aj')
-rw-r--r-- | tests/java5/generics/itds/sharing/CtorH.aj | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/java5/generics/itds/sharing/CtorH.aj b/tests/java5/generics/itds/sharing/CtorH.aj new file mode 100644 index 000000000..8ce2d0ffe --- /dev/null +++ b/tests/java5/generics/itds/sharing/CtorH.aj @@ -0,0 +1,19 @@ +import java.util.*; + +public class CtorH { + public static void main(String []argv) { + Base<Integer> baseInt = new Base<Integer>(); + Base<String> baseString = new Base<String>(); + + List<Integer> intList = new ArrayList<Integer>(); + List<String> strList = new ArrayList<String>(); + Base b1 = new Base(intList); + Base b2 = new Base(strList); + } +} + +class Base<N> { } + +aspect X { + public Base<Z>.new(List<Z> lz) {} // OK, Z becomes N in first case, S in the second ;) +} |