Skip to content

Commit 2babe93

Browse files
committed
Add test case
1 parent b836bf4 commit 2babe93

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

test/dotc/scala-collections.whitelist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
./scala-scala/src/library/scala/collection/SortedSetLike.scala
185185
./scala-scala/src/library/scala/collection/Traversable.scala
186186

187-
# https://github.com/lampepfl/dotty/issues/938
187+
# https://github.com/lampepfl/dotty/issues/938 (but relies also on #937 being fixed)
188188
#./scala-scala/src/library/scala/collection/TraversableLike.scala
189189

190190
./scala-scala/src/library/scala/collection/TraversableProxy.scala

tests/pos/i938.scala

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
object Test {
2+
import scala.collection._
3+
4+
trait T {
5+
def f() : Unit
6+
}
7+
8+
def view = new T {
9+
def f() = ()
10+
}
11+
12+
trait TLike[+A, RR] { self =>
13+
14+
def repr: RR = ???
15+
16+
def view2 = new TraversableView[A, RR] {
17+
protected lazy val underlying = self.repr
18+
override def foreach[U](f: A => U): Unit = ???
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)