Skip to content

Commit c3c121c

Browse files
authored
chore: add regression test for #4528 (#24663)
The issue was fixed by me in #18928. To answer @sjrd's comment in #4528 (comment), there is no `updateDynamic` in `scala.reflect.Selectable`. Closes #4528
2 parents 95f9aff + 9008baf commit c3c121c

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)