We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16d3eb5 commit d60954cCopy full SHA for d60954c
tests/debug/eval-captured-value-class.check
@@ -0,0 +1,25 @@
1
+break Test$ 14
2
+eval new A("foo")
3
+result fo
4
+eval m("bar")
5
+result ba
6
+
7
+break Test$A$1 9
8
+eval size
9
+result 2
10
+eval size.value
11
12
13
14
+// TODO fix eval m("bar")
15
+// TODO fix result ba
16
17
+break Test$ 12
18
19
20
21
22
23
24
25
tests/debug/eval-captured-value-class.scala
@@ -0,0 +1,15 @@
+class Size(val value: Int) extends AnyVal
+object Test:
+ def main(args: Array[String]): Unit =
+ val size = new Size(2)
+ class A(msg: String):
+ override def toString: String =
+ msg.take(size.value)
+ def m(msg: String): String =
+ println(new A("foo"))
+ println(m("bar"))
0 commit comments