From a87db212098a5e69176652c93284f425bb7e1b09 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 5 Oct 2014 10:26:02 +1000 Subject: SI-8291 Fix implicitNotFound message with type aliases This pattern of code is typically a bug: if (f(tp.typeSymbol)) { g(tp.typeArgs) } Intead, one needs to take the base type of `tp` wrt `tp.typeSymbol`. This commit does exactly that when formatting the `@implicitNotFound` custom error message. Patch found on the back of an envelope in the handwriting of @adriaanm --- test/files/neg/t8291.check | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/neg/t8291.check (limited to 'test/files/neg/t8291.check') diff --git a/test/files/neg/t8291.check b/test/files/neg/t8291.check new file mode 100644 index 0000000000..c9972e5575 --- /dev/null +++ b/test/files/neg/t8291.check @@ -0,0 +1,7 @@ +t8291.scala:5: error: Could not find implicit for Int or String + implicitly[X[Int, String]] + ^ +t8291.scala:6: error: Could not find implicit for Int or String + implicitly[Z[String]] + ^ +two errors found -- cgit v1.2.3