aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-10-28 15:18:24 +0100
committerMartin Odersky <odersky@gmail.com>2014-10-28 15:18:31 +0100
commit474b2aeb608ebbdeb639ba081f413f49459b3eff (patch)
treee3c61fba28b0e886f3bafc5cd8394c41e79d86b3 /tests/pos
parent46eb5ea0b8ac3e80795e7f5030b128794feb692c (diff)
downloaddotty-474b2aeb608ebbdeb639ba081f413f49459b3eff.tar.gz
dotty-474b2aeb608ebbdeb639ba081f413f49459b3eff.tar.bz2
dotty-474b2aeb608ebbdeb639ba081f413f49459b3eff.zip
Added a test for by name functions
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/bynamefuns.scala15
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)
+
+}