diff options
-rw-r--r-- | test/dotc/scala-collections.whitelist | 2 | ||||
-rw-r--r-- | tests/pos/i938.scala | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/test/dotc/scala-collections.whitelist b/test/dotc/scala-collections.whitelist index c5cd38f4d..1c3931c6a 100644 --- a/test/dotc/scala-collections.whitelist +++ b/test/dotc/scala-collections.whitelist @@ -186,7 +186,7 @@ ./scala-scala/src/library/scala/collection/SortedSetLike.scala ./scala-scala/src/library/scala/collection/Traversable.scala -# https://github.com/lampepfl/dotty/issues/938 +# https://github.com/lampepfl/dotty/issues/938 (but relies also on #937 being fixed) #./scala-scala/src/library/scala/collection/TraversableLike.scala ./scala-scala/src/library/scala/collection/TraversableProxy.scala diff --git a/tests/pos/i938.scala b/tests/pos/i938.scala new file mode 100644 index 000000000..cf8fd76e3 --- /dev/null +++ b/tests/pos/i938.scala @@ -0,0 +1,21 @@ +object Test { + import scala.collection._ + + trait T { + def f() : Unit + } + + def view = new T { + def f() = () + } + + trait TLike[+A, RR] { self => + + def repr: RR = ??? + + def view2 = new TraversableView[A, RR] { + protected lazy val underlying = self.repr + override def foreach[U](f: A => U): Unit = ??? + } + } +} |