summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2016-10-11 12:57:58 -0700
committerGitHub <noreply@github.com>2016-10-11 12:57:58 -0700
commit95b1427e7e655ea1ba04195fabf151fbae5789a1 (patch)
treee27a45d05e261b8b68c417f029c6717b171811b4 /test/files
parentd7fe04993e10750c308e44b0fe563bcd3b0714ad (diff)
parent20896646122fa82dc81f1405173b09eac37ae7cc (diff)
downloadscala-95b1427e7e655ea1ba04195fabf151fbae5789a1.tar.gz
scala-95b1427e7e655ea1ba04195fabf151fbae5789a1.tar.bz2
scala-95b1427e7e655ea1ba04195fabf151fbae5789a1.zip
Merge pull request #5442 from adriaanm/t9943
SI-9943 sealed class does not yield SAM type
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t9943.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t9943.scala b/test/files/pos/t9943.scala
new file mode 100644
index 0000000000..0d4717ccbb
--- /dev/null
+++ b/test/files/pos/t9943.scala
@@ -0,0 +1,9 @@
+class Foo[T] {
+ def toMap[K, V](implicit ev: Foo[T] <:< Foo[(K, V)]): Foo[Map[K, V]] = null
+ def toMap[K](keySelector: T => K): Foo[Map[K, T]] = null
+}
+
+object Foo {
+ (??? : Foo[Int]) toMap (_ % 2)
+ (??? : Foo[(Int, String)]).toMap
+}