Skip to content

Commit 9008baf

Browse files
committed
chore: add regression test for #4528
1 parent 241f261 commit 9008baf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/run/i4528.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import scala.reflect.Selectable.reflectiveSelectable
2+
3+
type T = {val a: Int; def a_=(x: Int): Unit}
4+
5+
@main def Test() =
6+
val x: T = (new { var a = 10 }).asInstanceOf[T]
7+
assert(x.a == 10)
8+
x.a = 11
9+
assert(x.a == 11)

0 commit comments

Comments
 (0)