summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/disabled/run/code.scala33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/disabled/run/code.scala b/test/disabled/run/code.scala
new file mode 100644
index 0000000000..7074943206
--- /dev/null
+++ b/test/disabled/run/code.scala
@@ -0,0 +1,33 @@
+import scala.tools.partest.utils.CodeTest
+
+case class Element(name: String)
+
+object Test extends App {
+ case class InnerElement(name: String)
+ def foo[T](ys: List[T]) = {
+ val fun: reflect.Code[Int => Int] = x => x + ys.length
+ fun
+ }
+ CodeTest(foo(List(2)), args)
+ CodeTest({() => val e = Element("someName"); e}, args)
+// CodeTest({() => val e = InnerElement("someName"); e}, args) // (does not work yet)
+ def titi() = {
+ var truc = 0
+ CodeTest(() => {
+ truc = 6
+ }, args)
+ }
+ def tata(): Unit = {
+ var truc = 0
+ CodeTest(() => {
+ truc = truc + 6
+ }, args)
+ }
+ titi()
+ tata()
+}
+
+
+
+
+