diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-10-14 07:16:34 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-10-14 07:16:34 -0700 |
commit | 686fb483e721ba2bef77e185afd5bf97a134d890 (patch) | |
tree | 75200d850cf9b39ec979e8eea71e1a2a6dbb7946 /test/files/pos/sammy_poly.scala | |
parent | d068b163d36b3fbffe39f87e3dc152a14c3ca07e (diff) | |
parent | b126e5c31b2bc57df5d0d5cf3508babe1dd7a759 (diff) | |
download | scala-2.11.0-M6.tar.gz scala-2.11.0-M6.tar.bz2 scala-2.11.0-M6.zip |
Merge pull request #3037 from gkossakowski/fix-merge-3018v2.11.0-M6
[resubmit] Experimental Single Abstract Method support (sammy meets world)
Diffstat (limited to 'test/files/pos/sammy_poly.scala')
-rw-r--r-- | test/files/pos/sammy_poly.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/pos/sammy_poly.scala b/test/files/pos/sammy_poly.scala new file mode 100644 index 0000000000..c629be7166 --- /dev/null +++ b/test/files/pos/sammy_poly.scala @@ -0,0 +1,7 @@ +// test synthesizeSAMFunction where the sam type is not fully defined +class T { + trait F[T, U] { def apply(x: T): U } + // NOTE: the f(x) desugaring for now assumes the single abstract method is called 'apply' + def app[T, U](x: T)(f: F[T, U]): U = f(x) + app(1)(x => List(x)) +}
\ No newline at end of file |