summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/amp.check3
-rw-r--r--test/files/run/amp.scala19
2 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/amp.check b/test/files/run/amp.check
new file mode 100644
index 0000000000..44be9395cb
--- /dev/null
+++ b/test/files/run/amp.check
@@ -0,0 +1,3 @@
+g called
+42
+1
diff --git a/test/files/run/amp.scala b/test/files/run/amp.scala
new file mode 100644
index 0000000000..62451b62ba
--- /dev/null
+++ b/test/files/run/amp.scala
@@ -0,0 +1,19 @@
+object Test extends Application {
+
+ def foo() = {
+ def f: int = 1
+ val x = &f
+ x
+ }
+
+ def bar(g: => int) = {
+ &g
+ }
+
+ Console.println((bar{ Console.println("g called"); 42 })())
+ Console.println(foo()())
+
+}
+
+
+