summaryrefslogtreecommitdiff
path: root/test/files/presentation/ide-bug-1000531
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-06-10 12:34:28 +0200
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-06-10 12:34:28 +0200
commitddb29a8105bc3b692bc129cbd8ed111baae7076d (patch)
treef69fda145c216d37437de33aaf3111c1afaa75c3 /test/files/presentation/ide-bug-1000531
parent95278dbdb828b4f8b786740b5186edbb4489096f (diff)
parentca3fb2506307c452bce236e431c024ed741b4ef7 (diff)
downloadscala-ddb29a8105bc3b692bc129cbd8ed111baae7076d.tar.gz
scala-ddb29a8105bc3b692bc129cbd8ed111baae7076d.tar.bz2
scala-ddb29a8105bc3b692bc129cbd8ed111baae7076d.zip
Merge pull request #3815 from retronym/topic/java8-support-2
Java 8 agnostism for our test suite
Diffstat (limited to 'test/files/presentation/ide-bug-1000531')
-rw-r--r--test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala15
-rw-r--r--test/files/presentation/ide-bug-1000531/src/TestIterable.java7
2 files changed, 18 insertions, 4 deletions
diff --git a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
index 878bbfa19e..3f59282083 100644
--- a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
+++ b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
@@ -1,7 +1,14 @@
/** When this files is opened within the IDE, a typing error is reported. */
-class A[B] extends java.lang.Iterable[B] {
+class A[B] extends TestIterable[B] {
import scala.collection.JavaConversions._
- def iterator = Iterator.empty
+ def iterator: other.TestIterator[Nothing] = ???
- iterator. /*!*/
-} \ No newline at end of file
+ iterator./*!*/
+}
+
+object other {
+ trait TestIterator[T] {
+ def hasNext: Boolean
+ def next: T
+ }
+}
diff --git a/test/files/presentation/ide-bug-1000531/src/TestIterable.java b/test/files/presentation/ide-bug-1000531/src/TestIterable.java
new file mode 100644
index 0000000000..84a6fe77f1
--- /dev/null
+++ b/test/files/presentation/ide-bug-1000531/src/TestIterable.java
@@ -0,0 +1,7 @@
+public abstract class TestIterable<T> {
+ public abstract TestIterator<T> iterator();
+ public static abstract class TestIterator<T> {
+ public abstract T next();
+ public abstract boolean hasNext();
+ }
+}