diff options
author | odersky <odersky@gmail.com> | 2015-10-07 15:07:28 +0200 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2015-10-07 15:07:28 +0200 |
commit | 8532c98672e6dcde4d350f253b46892cc0ece34c (patch) | |
tree | b834f8e32776b62c0224607e1664f65f39893108 /tests/pos | |
parent | a8c8bdad57941071b85caa54bc57b84d8ca7d526 (diff) | |
parent | 22a2c79adf3acb8b5dd341b552e499bced58c537 (diff) | |
download | dotty-8532c98672e6dcde4d350f253b46892cc0ece34c.tar.gz dotty-8532c98672e6dcde4d350f253b46892cc0ece34c.tar.bz2 dotty-8532c98672e6dcde4d350f253b46892cc0ece34c.zip |
Merge pull request #799 from dotty-staging/change-inference
Change inference
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i739.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/i739.scala b/tests/pos/i739.scala new file mode 100644 index 000000000..61fed4e5d --- /dev/null +++ b/tests/pos/i739.scala @@ -0,0 +1,17 @@ +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 + } +} |