Skip to content

Commit 1a991ff

Browse files
committed
Update tests
1 parent a858981 commit 1a991ff

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

tests/link/custom-lib/Map2.scala renamed to tests/link/custom-lib/strawman/collection/Map2.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
package strawman.collection
2+
13
trait Map2[K] {
24
def get(k: K): K = k
35
def foo: K = {
46
this match {
57
case that: Map2[b] => that.get(3.asInstanceOf[b])
8+
// case that: Map2[b] => that.get(3.asInstanceOf[K]) // FIXME
69
case _ => get(5.asInstanceOf[K])
710
}
811
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package strawman.collection.mutable
2+
3+
trait Builder2[To] {
4+
def result(): To
5+
}
6+
7+
class StringBuilder2 extends Builder2[String] {
8+
def result() = "hello"
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import strawman.collection.mutable._
3+
4+
object Test {
5+
def main(args: Array[String]): Unit = {
6+
// FIXME issue loading class inheriting a type parameter
7+
// val sb2 = new StringBuilder2
8+
// println(sb2.result())
9+
}
10+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
strawman/collection/Map2
2+
Test$$anon$1
13
Test
24
Test$

tests/link/on-custom-lib/map2.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import strawman.collection._
2+
13
object Test {
24
def main(args: Array[String]): Unit = {
3-
// FIMXE
4-
// val map2 = new Map2[Int] {}
5-
// println(map2.foo)
5+
val map2 = new Map2[Int] {}
6+
println(map2.foo)
67
}
78
}

0 commit comments

Comments
 (0)