From 1e177eeb15107bd62748e0e7277fce0f06ef847b Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 8 Jun 2010 22:57:28 +0000 Subject: [PATCH] generics and ITD inner class updates --- tests/features169/itdInnerTypes/Choice2.java | 32 +++++++++++++++++++ .../itdInnerTypes/ChoiceGenerics1.java | 14 ++++++++ .../itdInnerTypes/ChoiceGenerics2.java | 14 ++++++++ 3 files changed, 60 insertions(+) create mode 100644 tests/features169/itdInnerTypes/Choice2.java create mode 100644 tests/features169/itdInnerTypes/ChoiceGenerics1.java create mode 100644 tests/features169/itdInnerTypes/ChoiceGenerics2.java diff --git a/tests/features169/itdInnerTypes/Choice2.java b/tests/features169/itdInnerTypes/Choice2.java new file mode 100644 index 000000000..965a0d184 --- /dev/null +++ b/tests/features169/itdInnerTypes/Choice2.java @@ -0,0 +1,32 @@ +import java.util.*; + +public class Choice2 { + public static void main(String []argv) { + System.out.println(Bar.Keys.CHOICE); + } +} + +class Bar { + +} + +aspect X { + static List choices; + public static List forClass() { + ArrayList al = new ArrayList(); + return al; + } + public static class Bar.Keys { + public static final Function CHOICE = Get.attrOf(choices,"choice"); + } +} + +class Get { + public static Function attrOf(List t,String s) { + return null; + } +} + +class Function { + +} diff --git a/tests/features169/itdInnerTypes/ChoiceGenerics1.java b/tests/features169/itdInnerTypes/ChoiceGenerics1.java new file mode 100644 index 000000000..11b8bea9f --- /dev/null +++ b/tests/features169/itdInnerTypes/ChoiceGenerics1.java @@ -0,0 +1,14 @@ +import java.util.*; + +public class ChoiceGenerics1 { + public static void main(String []argv) { + new Keys().choice = 42; + } +} + + +aspect X { + public static class ChoiceGenerics1.Keys { + public N choice = null; + } +} diff --git a/tests/features169/itdInnerTypes/ChoiceGenerics2.java b/tests/features169/itdInnerTypes/ChoiceGenerics2.java new file mode 100644 index 000000000..ba3fb2ec5 --- /dev/null +++ b/tests/features169/itdInnerTypes/ChoiceGenerics2.java @@ -0,0 +1,14 @@ +import java.util.*; + +public class ChoiceGenerics2 { + public static void main(String []argv) { + new Keys().choice = "abc"; + } +} + + +aspect X { + public static class ChoiceGenerics2.Keys { + public N choice = null; + } +} -- 2.39.5