diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-06-04 14:55:23 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-06-04 14:55:23 +0200 |
commit | eec8ba0b01ca2d7fd74faba8b1f4e187691bb3ca (patch) | |
tree | 3e7e3bad13670f5f06ab53e9db01037fef7eadc7 /test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala | |
parent | 86fc1ceae4db611aa4f990973cea484c41f79e44 (diff) | |
download | scala-eec8ba0b01ca2d7fd74faba8b1f4e187691bb3ca.tar.gz scala-eec8ba0b01ca2d7fd74faba8b1f4e187691bb3ca.tar.bz2 scala-eec8ba0b01ca2d7fd74faba8b1f4e187691bb3ca.zip |
Java 6-8 agnosticism for a test
Under Java 8, the output contains newly added methods in
j.u.Iterator.
I've created cut down, test-local versions of the relevant types
to decouple.
Diffstat (limited to 'test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala')
-rw-r--r-- | test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala | 15 |
1 files changed, 11 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 + } +} |