From 8d4ce1da77bd6bf4a2311c9e30bd815a9aedae1b Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 28 May 2012 10:31:50 +0200 Subject: SI-5845 Advances the example from a crasher to an inference failure. The inference failure itself seems like an instance of of SI-3346. But dependent method types (which triggered the crash), can be employed to avoid inferring the type constructor CC. class Num[T] { def mkOps = new Ops class Ops { def +++(rhs: T) = () } } class A { implicit def infixOps[T](lhs: T)(implicit num: Num[T]): num.Ops = num.mkOps implicit val n1: Num[Int] = new Num[Int] { } 5 +++ 5 } --- test/files/neg/t5845.check | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/neg/t5845.check (limited to 'test/files/neg/t5845.check') diff --git a/test/files/neg/t5845.check b/test/files/neg/t5845.check new file mode 100644 index 0000000000..8c6100d6de --- /dev/null +++ b/test/files/neg/t5845.check @@ -0,0 +1,7 @@ +t5845.scala:9: error: value +++ is not a member of Int + println(5 +++ 5) + ^ +t5845.scala:15: error: value +++ is not a member of Int + println(5 +++ 5) + ^ +two errors found -- cgit v1.2.3