summaryrefslogtreecommitdiff
path: root/test/files/pos/t9131.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2015-02-23 09:29:23 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2015-02-23 09:29:23 -0800
commitf8853a8005e957345608086f839b7a7747d81586 (patch)
treeb8db2e4cce5ed863048cc4f2372446565db41c06 /test/files/pos/t9131.scala
parent178e8df9b6a91375a6162721a0cbc2d90bcc7451 (diff)
parentcc2e613189ce78d160ab88281736df948361c6ad (diff)
downloadscala-f8853a8005e957345608086f839b7a7747d81586.tar.gz
scala-f8853a8005e957345608086f839b7a7747d81586.tar.bz2
scala-f8853a8005e957345608086f839b7a7747d81586.zip
Merge pull request #4286 from retronym/ticket/9131
SI-9131 Fix use of apply syntactic sugar with by-name param
Diffstat (limited to 'test/files/pos/t9131.scala')
-rw-r--r--test/files/pos/t9131.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t9131.scala b/test/files/pos/t9131.scala
new file mode 100644
index 0000000000..1a186a0a24
--- /dev/null
+++ b/test/files/pos/t9131.scala
@@ -0,0 +1,12 @@
+class Test {
+
+ def byNameFunc(f: (=> (() => Any)) => Any): Unit = ()
+
+ def test = {
+ // "value apply is not a member of => () => Any"
+ byNameFunc(z => z())
+ // okay
+ byNameFunc(z => z.apply())
+ byNameFunc(z => {val f = z; f()})
+ }
+}