diff options
author | Martin Odersky <odersky@gmail.com> | 2015-09-18 17:51:45 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-09-18 17:51:45 +0200 |
commit | 22a2c79adf3acb8b5dd341b552e499bced58c537 (patch) | |
tree | f5fc61bf452b2d1b7ef79a2846e8c3fb55325e06 /tests/pos | |
parent | 7f983665985d93c735d519f7d24d9ba072b26cd4 (diff) | |
download | dotty-22a2c79adf3acb8b5dd341b552e499bced58c537.tar.gz dotty-22a2c79adf3acb8b5dd341b552e499bced58c537.tar.bz2 dotty-22a2c79adf3acb8b5dd341b552e499bced58c537.zip |
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.
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i739.scala | 7 |
1 files changed, 7 insertions, 0 deletions
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 } } |