aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2015-10-07 15:07:28 +0200
committerodersky <odersky@gmail.com>2015-10-07 15:07:28 +0200
commit8532c98672e6dcde4d350f253b46892cc0ece34c (patch)
treeb834f8e32776b62c0224607e1664f65f39893108 /tests/pos
parenta8c8bdad57941071b85caa54bc57b84d8ca7d526 (diff)
parent22a2c79adf3acb8b5dd341b552e499bced58c537 (diff)
downloaddotty-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.scala17
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
+ }
+}