From 22a2c79adf3acb8b5dd341b552e499bced58c537 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 18 Sep 2015 17:51:45 +0200 Subject: Generalize set of typevars instantiated before implicit search We now also consider type variables in a selection prefix of the application. The test case was augmented to include a snippet which only succeeds under the generalization. --- tests/pos/i739.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/pos/i739.scala') diff --git a/tests/pos/i739.scala b/tests/pos/i739.scala index 340478f4f..61fed4e5d 100644 --- a/tests/pos/i739.scala +++ b/tests/pos/i739.scala @@ -3,8 +3,15 @@ class Foo object Test { def foo[T](x: T)(implicit ev: T): T = ??? + class Fn[T] { + def invoke(implicit ev: T): T = ??? + } + + def bar[T](x: T): Fn[T] = ??? + def test: Unit = { implicit val evidence: Foo = new Foo foo(new Foo) + bar(new Foo).invoke } } -- cgit v1.2.3