diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-06-03 19:12:31 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-06-09 15:20:18 -0400 |
commit | 5c4be4057a8ececee7d260623fdc58f09ee4a09d (patch) | |
tree | 62f8b3540ada9c3422ba22908aa6be42b7a4624f /test/files/pos | |
parent | d70c0e344d420af1d8520b0a73109850f66c518c (diff) | |
download | scala-5c4be4057a8ececee7d260623fdc58f09ee4a09d.tar.gz scala-5c4be4057a8ececee7d260623fdc58f09ee4a09d.tar.bz2 scala-5c4be4057a8ececee7d260623fdc58f09ee4a09d.zip |
SI-7364 Allow raw types in parent position in Java sources
To make this work, this commit simply restricts parent
type argument inference to Scala source files.
The surrounding code has also been refactored to avoid a var.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t7364/BadList.java | 3 | ||||
-rw-r--r-- | test/files/pos/t7364/UseIt.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t7364b/BadList_1.java | 3 | ||||
-rw-r--r-- | test/files/pos/t7364b/UseIt_2.scala | 5 |
4 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t7364/BadList.java b/test/files/pos/t7364/BadList.java new file mode 100644 index 0000000000..2692fa085f --- /dev/null +++ b/test/files/pos/t7364/BadList.java @@ -0,0 +1,3 @@ +public class BadList extends java.util.ArrayList { + public java.util.ArrayList foo() { return null; } +} diff --git a/test/files/pos/t7364/UseIt.scala b/test/files/pos/t7364/UseIt.scala new file mode 100644 index 0000000000..3847165323 --- /dev/null +++ b/test/files/pos/t7364/UseIt.scala @@ -0,0 +1,4 @@ +class UseIt { + val list = new BadList + list.foo() +} diff --git a/test/files/pos/t7364b/BadList_1.java b/test/files/pos/t7364b/BadList_1.java new file mode 100644 index 0000000000..fbb428adba --- /dev/null +++ b/test/files/pos/t7364b/BadList_1.java @@ -0,0 +1,3 @@ +public class BadList_1 extends java.util.ArrayList { + public java.util.ArrayList foo() { return null; } +} diff --git a/test/files/pos/t7364b/UseIt_2.scala b/test/files/pos/t7364b/UseIt_2.scala new file mode 100644 index 0000000000..06b50f6766 --- /dev/null +++ b/test/files/pos/t7364b/UseIt_2.scala @@ -0,0 +1,5 @@ +class UseIt { + val list = new BadList_1 + list.foo() + list.set(0, list.get(0)) +} |