Skip to content

Commit 4f624fc

Browse files
committed
Add test case
1 parent 4a5edb2 commit 4f624fc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/neg/i2928.scala

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Box[T22](var v: T22)
2+
3+
object Test {
4+
def main(args: Array[String]): Unit = {
5+
val s = new Box[String]("")
6+
val i = new Box[Int](3)
7+
8+
var box: Box[_] = s
9+
val sv = box.v
10+
box = i
11+
box.v = sv // error
12+
13+
val c: Int = i.v
14+
}
15+
}

0 commit comments

Comments
 (0)