diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t2764/Ann.java | 5 | ||||
-rw-r--r-- | test/files/pos/t2764/Enum.java | 5 | ||||
-rw-r--r-- | test/files/pos/t2764/Use.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t5165/TestAnnotation.java | 11 | ||||
-rw-r--r-- | test/files/pos/t5165/TestObject.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t5165/TestTrait.scala | 3 | ||||
-rw-r--r-- | test/files/run/patmat_unapp_abstype-new.check | 2 | ||||
-rw-r--r-- | test/files/run/patmat_unapp_abstype-new.flags | 1 | ||||
-rw-r--r-- | test/files/run/t4124.check | 4 | ||||
-rw-r--r-- | test/files/run/t4124.scala | 24 |
10 files changed, 62 insertions, 2 deletions
diff --git a/test/files/pos/t2764/Ann.java b/test/files/pos/t2764/Ann.java new file mode 100644 index 0000000000..184fc6e864 --- /dev/null +++ b/test/files/pos/t2764/Ann.java @@ -0,0 +1,5 @@ +package bippy; + +public @interface Ann { + Enum value(); +} diff --git a/test/files/pos/t2764/Enum.java b/test/files/pos/t2764/Enum.java new file mode 100644 index 0000000000..fe07559535 --- /dev/null +++ b/test/files/pos/t2764/Enum.java @@ -0,0 +1,5 @@ +package bippy; + +public enum Enum { + VALUE; +} diff --git a/test/files/pos/t2764/Use.scala b/test/files/pos/t2764/Use.scala new file mode 100644 index 0000000000..8cf8102709 --- /dev/null +++ b/test/files/pos/t2764/Use.scala @@ -0,0 +1,6 @@ +package bippy + +class Use { + @Ann(Enum.VALUE) + def foo {} +} diff --git a/test/files/pos/t5165/TestAnnotation.java b/test/files/pos/t5165/TestAnnotation.java new file mode 100644 index 0000000000..90886b7537 --- /dev/null +++ b/test/files/pos/t5165/TestAnnotation.java @@ -0,0 +1,11 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +public @interface TestAnnotation { + public enum TestEnumOne { A, B } + public enum TestEnumTwo { C, D } + + public TestEnumOne one(); + public TestEnumTwo two(); + public String strVal(); +} diff --git a/test/files/pos/t5165/TestObject.scala b/test/files/pos/t5165/TestObject.scala new file mode 100644 index 0000000000..eaf244e9d0 --- /dev/null +++ b/test/files/pos/t5165/TestObject.scala @@ -0,0 +1,3 @@ + +object TestObject extends TestTrait + diff --git a/test/files/pos/t5165/TestTrait.scala b/test/files/pos/t5165/TestTrait.scala new file mode 100644 index 0000000000..b317e6c6a3 --- /dev/null +++ b/test/files/pos/t5165/TestTrait.scala @@ -0,0 +1,3 @@ + +@TestAnnotation(one=TestAnnotation.TestEnumOne.A, two=TestAnnotation.TestEnumTwo.C, strVal="something") +trait TestTrait diff --git a/test/files/run/patmat_unapp_abstype-new.check b/test/files/run/patmat_unapp_abstype-new.check index 72239d16cd..42c54631d2 100644 --- a/test/files/run/patmat_unapp_abstype-new.check +++ b/test/files/run/patmat_unapp_abstype-new.check @@ -1,4 +1,4 @@ TypeRef -none of the above +MethodType Bar Foo diff --git a/test/files/run/patmat_unapp_abstype-new.flags b/test/files/run/patmat_unapp_abstype-new.flags deleted file mode 100644 index ba80cad69b..0000000000 --- a/test/files/run/patmat_unapp_abstype-new.flags +++ /dev/null @@ -1 +0,0 @@ --Xoldpatmat diff --git a/test/files/run/t4124.check b/test/files/run/t4124.check new file mode 100644 index 0000000000..66a0092d93 --- /dev/null +++ b/test/files/run/t4124.check @@ -0,0 +1,4 @@ +hi +hi +bye +bye diff --git a/test/files/run/t4124.scala b/test/files/run/t4124.scala new file mode 100644 index 0000000000..9f35b57ce3 --- /dev/null +++ b/test/files/run/t4124.scala @@ -0,0 +1,24 @@ +import xml.Node + +object Test extends App { + val body: Node = <elem>hi</elem> + println ((body: AnyRef, "foo") match { + case (node: Node, "bar") => "bye" + case (ser: Serializable, "foo") => "hi" + }) + + println ((body, "foo") match { + case (node: Node, "bar") => "bye" + case (ser: Serializable, "foo") => "hi" + }) + + println ((body: AnyRef, "foo") match { + case (node: Node, "foo") => "bye" + case (ser: Serializable, "foo") => "hi" + }) + + println ((body: AnyRef, "foo") match { + case (node: Node, "foo") => "bye" + case (ser: Serializable, "foo") => "hi" + }) +} |