diff options
author | Martin Odersky <odersky@gmail.com> | 2014-10-28 15:18:24 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-10-28 15:18:31 +0100 |
commit | 474b2aeb608ebbdeb639ba081f413f49459b3eff (patch) | |
tree | e3c61fba28b0e886f3bafc5cd8394c41e79d86b3 /tests/pos/bynamefuns.scala | |
parent | 46eb5ea0b8ac3e80795e7f5030b128794feb692c (diff) | |
download | dotty-474b2aeb608ebbdeb639ba081f413f49459b3eff.tar.gz dotty-474b2aeb608ebbdeb639ba081f413f49459b3eff.tar.bz2 dotty-474b2aeb608ebbdeb639ba081f413f49459b3eff.zip |
Added a test for by name functions
Diffstat (limited to 'tests/pos/bynamefuns.scala')
-rw-r--r-- | tests/pos/bynamefuns.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pos/bynamefuns.scala b/tests/pos/bynamefuns.scala new file mode 100644 index 000000000..5aa1df38d --- /dev/null +++ b/tests/pos/bynamefuns.scala @@ -0,0 +1,15 @@ +object Test { + + type LF = (=> Int) => Int + + def f(x: => Int) = x * x + + val x: LF = f + + def g = 3 + + f(11) + x(g) + x(11) + +} |