diff options
author | Dmitry Petrashko <dark@d-d.me> | 2016-02-12 17:21:58 +0100 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2016-02-12 17:21:58 +0100 |
commit | 6cc0e484bda30468ea2e2bcba2d11968e996b5c2 (patch) | |
tree | c46f0cfed76a416155cb4bd57a5cdad6c2c379dd /tests/neg | |
parent | 9d19ef6ec8d68c9058deadeb1c4a62e70c63852c (diff) | |
parent | fec5b81678c73b3ea9ad8a9daa3ff4b4ad767d46 (diff) | |
download | dotty-6cc0e484bda30468ea2e2bcba2d11968e996b5c2.tar.gz dotty-6cc0e484bda30468ea2e2bcba2d11968e996b5c2.tar.bz2 dotty-6cc0e484bda30468ea2e2bcba2d11968e996b5c2.zip |
Merge pull request #1081 from dotty-staging/fix-#645
Add test case for #645
Diffstat (limited to 'tests/neg')
-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()()) +} |