diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-23 09:29:23 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-23 09:29:23 -0800 |
commit | f8853a8005e957345608086f839b7a7747d81586 (patch) | |
tree | b8db2e4cce5ed863048cc4f2372446565db41c06 /test/files/pos/t9131.scala | |
parent | 178e8df9b6a91375a6162721a0cbc2d90bcc7451 (diff) | |
parent | cc2e613189ce78d160ab88281736df948361c6ad (diff) | |
download | scala-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.scala | 12 |
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()}) + } +} |