Skip to content

Commit 4ae7a92

Browse files
committed
Update tests
1 parent f7abe5c commit 4ae7a92

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-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+
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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+
// FIXME: Issue when loading type bindings from Tasty
6+
// val map2 = new Map2[Int] {}
7+
// println(map2.foo)
68
}
79
}

0 commit comments

Comments
 (0)