aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/amp.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg/amp.scala')
-rw-r--r--tests/neg/amp.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/neg/amp.scala b/tests/neg/amp.scala
new file mode 100644
index 000000000..da35242a9
--- /dev/null
+++ b/tests/neg/amp.scala
@@ -0,0 +1,15 @@
+object Test extends dotty.runtime.LegacyApp {
+
+ 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()())
+}