summaryrefslogtreecommitdiff
path: root/test/files/neg/t9231.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-03-17 15:46:07 -0700
committerJason Zaugg <jzaugg@gmail.com>2015-03-17 15:46:07 -0700
commit2dc3b19fb3fe18dada28c3506a14dd9602065e06 (patch)
tree5e36d534f7bda9a40337a5f79ae73693019f83e1 /test/files/neg/t9231.scala
parentfa33395a25c87115c910e8d4a4124aee6134062b (diff)
downloadscala-2dc3b19fb3fe18dada28c3506a14dd9602065e06.tar.gz
scala-2dc3b19fb3fe18dada28c3506a14dd9602065e06.tar.bz2
scala-2dc3b19fb3fe18dada28c3506a14dd9602065e06.zip
SI-9231 Don't attempt implicit search for erroneous parameter
If the instantiated type of an implicit parameter is erroneous, we should not attempt the implicit search. This avoids the following useless error message in the enclosed test: error: ambiguous implicit values: ... match expected type M[<error>]
Diffstat (limited to 'test/files/neg/t9231.scala')
-rw-r--r--test/files/neg/t9231.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/t9231.scala b/test/files/neg/t9231.scala
new file mode 100644
index 0000000000..05b1d24e9a
--- /dev/null
+++ b/test/files/neg/t9231.scala
@@ -0,0 +1,9 @@
+class M[A]
+class C {
+ implicit def M1: M[Int] = null
+ implicit def M2: M[String] = null
+
+ def foo[A](implicit M: M[A]) = null
+
+ foo[DoesNotExist]
+}