diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-12 12:07:36 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-12 12:07:43 +0100 |
commit | fec5b81678c73b3ea9ad8a9daa3ff4b4ad767d46 (patch) | |
tree | 2bf4fb7bf7afcb854864118dc3adabb42d438032 /tests/neg/amp.scala | |
parent | 13b61653439700ca6607074bcded4d714131bdc2 (diff) | |
download | dotty-fec5b81678c73b3ea9ad8a9daa3ff4b4ad767d46.tar.gz dotty-fec5b81678c73b3ea9ad8a9daa3ff4b4ad767d46.tar.bz2 dotty-fec5b81678c73b3ea9ad8a9daa3ff4b4ad767d46.zip |
Add test case for #645
Diffstat (limited to 'tests/neg/amp.scala')
-rw-r--r-- | tests/neg/amp.scala | 15 |
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()()) +} |