From 5c4be4057a8ececee7d260623fdc58f09ee4a09d Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 3 Jun 2013 19:12:31 +0200 Subject: 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. --- test/files/pos/t7364b/BadList_1.java | 3 +++ test/files/pos/t7364b/UseIt_2.scala | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 test/files/pos/t7364b/BadList_1.java create mode 100644 test/files/pos/t7364b/UseIt_2.scala (limited to 'test/files/pos/t7364b') 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)) +} -- cgit v1.2.3