We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3cca47 commit 28ca899Copy full SHA for 28ca899
tests/init/neg/cold-insert-hot-array.scala
@@ -0,0 +1,9 @@
1
+object A:
2
+ def foo[T](x: T, array: Array[T]): Unit = array(0) = x
3
+
4
+class B {
5
+ var a = new Array[B](2)
6
+ A.foo(this, a) //error
7
+ println(a(0).i)
8
+ val i = 99
9
+}
0 commit comments