summaryrefslogtreecommitdiff
path: root/test/files/pos/sammy_extends_function.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-08-23 15:28:58 -0700
committerSeth Tisue <seth@tisue.net>2016-08-26 14:16:56 -0700
commitd275b0372b661d4df22db52f0ec3802843332ad6 (patch)
treef547e5ec9398b7562fb0b7cf9c209adcb1873680 /test/files/pos/sammy_extends_function.scala
parentb3f6c7796e139e5a5e0e3588201aa97d1dc4ef3c (diff)
downloadscala-d275b0372b661d4df22db52f0ec3802843332ad6.tar.gz
scala-d275b0372b661d4df22db52f0ec3802843332ad6.tar.bz2
scala-d275b0372b661d4df22db52f0ec3802843332ad6.zip
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
Diffstat (limited to 'test/files/pos/sammy_extends_function.scala')
-rw-r--r--test/files/pos/sammy_extends_function.scala4
1 files changed, 4 insertions, 0 deletions
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 }