From d275b0372b661d4df22db52f0ec3802843332ad6 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 23 Aug 2016 15:28:58 -0700 Subject: SAM for subtypes of FunctionN only exclude FunctionN types themselves from SAM, don't exclude their subtypes; we want e.g. trait T extends Function1[String, String] (x => x) : T to compile reference: https://github.com/scala/scala-dev/issues/206 --- test/files/pos/sammy_extends_function.scala | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/files/pos/sammy_extends_function.scala (limited to 'test/files') diff --git a/test/files/pos/sammy_extends_function.scala b/test/files/pos/sammy_extends_function.scala new file mode 100644 index 0000000000..e8cf5d8749 --- /dev/null +++ b/test/files/pos/sammy_extends_function.scala @@ -0,0 +1,4 @@ +// https://github.com/scala/scala-dev/issues/206 + +trait T extends Function1[String, String] +object O { (x => x): T } -- cgit v1.2.3