diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-01 14:41:22 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-01 14:41:22 -0700 |
commit | 00e6c8b9e395cae3b761b848482bc91c7634ec13 (patch) | |
tree | a3b4bdf5d54d4d9ed5a260f4e410d3a918571fdc /test/files/pos | |
parent | 3a33a8be46881474376cd8628cf4a6092fc3b97e (diff) | |
parent | 8383b65fb53ae9424cf9c6f1314ee73321ad3b9a (diff) | |
download | scala-00e6c8b9e395cae3b761b848482bc91c7634ec13.tar.gz scala-00e6c8b9e395cae3b761b848482bc91c7634ec13.tar.bz2 scala-00e6c8b9e395cae3b761b848482bc91c7634ec13.zip |
Merge pull request #2317 from retronym/ticket/7232-master
[forward-port] SI-7232 Fix Java import vs defn. binding precendence
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t7232.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7232/Foo.java | 9 | ||||
-rw-r--r-- | test/files/pos/t7232/List.java | 4 | ||||
-rw-r--r-- | test/files/pos/t7232/Test.scala | 5 | ||||
-rw-r--r-- | test/files/pos/t7232b.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7232b/Foo.java | 8 | ||||
-rw-r--r-- | test/files/pos/t7232b/List.java | 5 | ||||
-rw-r--r-- | test/files/pos/t7232b/Test.scala | 5 | ||||
-rw-r--r-- | test/files/pos/t7232c.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7232c/Foo.java | 10 | ||||
-rw-r--r-- | test/files/pos/t7232c/Test.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t7232d.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t7232d/Entry.java | 4 | ||||
-rw-r--r-- | test/files/pos/t7232d/Foo.java | 8 | ||||
-rw-r--r-- | test/files/pos/t7232d/Test.scala | 4 |
15 files changed, 70 insertions, 0 deletions
diff --git a/test/files/pos/t7232.flags b/test/files/pos/t7232.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t7232.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7232/Foo.java b/test/files/pos/t7232/Foo.java new file mode 100644 index 0000000000..3478301b30 --- /dev/null +++ b/test/files/pos/t7232/Foo.java @@ -0,0 +1,9 @@ +package pack; + +import java.util.List; + +public class Foo { + public static java.util.List okay() { throw new Error(); } + + public static List wrong() { throw new Error(); } +} diff --git a/test/files/pos/t7232/List.java b/test/files/pos/t7232/List.java new file mode 100644 index 0000000000..e42c63aa67 --- /dev/null +++ b/test/files/pos/t7232/List.java @@ -0,0 +1,4 @@ +package pack; + +public class List { +} diff --git a/test/files/pos/t7232/Test.scala b/test/files/pos/t7232/Test.scala new file mode 100644 index 0000000000..49c3c12aed --- /dev/null +++ b/test/files/pos/t7232/Test.scala @@ -0,0 +1,5 @@ +object Test { + import pack._ + Foo.okay().size() + Foo.wrong().size() +} diff --git a/test/files/pos/t7232b.flags b/test/files/pos/t7232b.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t7232b.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7232b/Foo.java b/test/files/pos/t7232b/Foo.java new file mode 100644 index 0000000000..94f08d545e --- /dev/null +++ b/test/files/pos/t7232b/Foo.java @@ -0,0 +1,8 @@ +package pack; + +import java.util.*; + +public class Foo { + // should be pack.List. + public static List list() { throw new Error(); } +} diff --git a/test/files/pos/t7232b/List.java b/test/files/pos/t7232b/List.java new file mode 100644 index 0000000000..ce977152b9 --- /dev/null +++ b/test/files/pos/t7232b/List.java @@ -0,0 +1,5 @@ +package pack; + +public class List { + public void packList() {} +} diff --git a/test/files/pos/t7232b/Test.scala b/test/files/pos/t7232b/Test.scala new file mode 100644 index 0000000000..6377e26bec --- /dev/null +++ b/test/files/pos/t7232b/Test.scala @@ -0,0 +1,5 @@ +object Test { + import pack._ + + Foo.list().packList() +} diff --git a/test/files/pos/t7232c.flags b/test/files/pos/t7232c.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t7232c.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7232c/Foo.java b/test/files/pos/t7232c/Foo.java new file mode 100644 index 0000000000..bbda09a2da --- /dev/null +++ b/test/files/pos/t7232c/Foo.java @@ -0,0 +1,10 @@ +package pack; + +import java.util.List; + +public class Foo { + public static class List { + public void isInnerList() {} + } + public static List innerList() { throw new Error(); } +} diff --git a/test/files/pos/t7232c/Test.scala b/test/files/pos/t7232c/Test.scala new file mode 100644 index 0000000000..aa7c710948 --- /dev/null +++ b/test/files/pos/t7232c/Test.scala @@ -0,0 +1,4 @@ +object Test { + import pack._ + Foo.innerList().isInnerList() +} diff --git a/test/files/pos/t7232d.flags b/test/files/pos/t7232d.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t7232d.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t7232d/Entry.java b/test/files/pos/t7232d/Entry.java new file mode 100644 index 0000000000..0cfb6fb25b --- /dev/null +++ b/test/files/pos/t7232d/Entry.java @@ -0,0 +1,4 @@ +package pack; + +public class Entry { +} diff --git a/test/files/pos/t7232d/Foo.java b/test/files/pos/t7232d/Foo.java new file mode 100644 index 0000000000..df7114a0f0 --- /dev/null +++ b/test/files/pos/t7232d/Foo.java @@ -0,0 +1,8 @@ +package pack; + +import java.util.Map.Entry; + +public class Foo { + public static Entry mapEntry() { throw new Error(); } + public static void javaTest() { mapEntry().getKey(); } +} diff --git a/test/files/pos/t7232d/Test.scala b/test/files/pos/t7232d/Test.scala new file mode 100644 index 0000000000..89a8063b3c --- /dev/null +++ b/test/files/pos/t7232d/Test.scala @@ -0,0 +1,4 @@ +object Test { + import pack._ + Foo.mapEntry().getKey() +} |