diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-31 16:06:56 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-31 16:06:56 -0700 |
commit | 5654ebddb63d078f9f79dcf84fbb8489030136f6 (patch) | |
tree | d4bfc365cdf8e4993113275136f14803ceab3abd /test/files/pos/fun_undo_eta.scala | |
parent | 4fc7d5517c7152d43745960efde5042febe29422 (diff) | |
parent | 5e5ab186fe5b8cf047fd3da58da29dbc8f9fbd71 (diff) | |
download | scala-5654ebddb63d078f9f79dcf84fbb8489030136f6.tar.gz scala-5654ebddb63d078f9f79dcf84fbb8489030136f6.tar.bz2 scala-5654ebddb63d078f9f79dcf84fbb8489030136f6.zip |
Merge pull request #4971 from adriaanm/genbcode-delambdafy
Unify treatment of built-in functions and SAMs
Diffstat (limited to 'test/files/pos/fun_undo_eta.scala')
-rw-r--r-- | test/files/pos/fun_undo_eta.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/fun_undo_eta.scala b/test/files/pos/fun_undo_eta.scala new file mode 100644 index 0000000000..466b0e2629 --- /dev/null +++ b/test/files/pos/fun_undo_eta.scala @@ -0,0 +1,10 @@ +class Test { + def m(i: Int) = i + + def expectWild[A](f: A) = ??? + def expectFun[A](f: A => Int) = ??? + + expectWild((i => m(i))) // manual eta expansion + expectWild(m(_)) // have to undo eta expansion with wildcard expected type + expectFun(m(_)) // have to undo eta expansion with function expected type +} |