aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-17 18:14:15 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-17 18:14:15 +0100
commit0a07f7f3385e5cc65fe58db753d2781ecf14ec41 (patch)
tree7ca6b4df926eb0e1833949476d9e94f8698d06c2 /tests
parentd69e8490dc66f98719fa1483e57d824c3a61f99c (diff)
downloaddotty-0a07f7f3385e5cc65fe58db753d2781ecf14ec41.tar.gz
dotty-0a07f7f3385e5cc65fe58db753d2781ecf14ec41.tar.bz2
dotty-0a07f7f3385e5cc65fe58db753d2781ecf14ec41.zip
Infer type parameters of anonymous class parents from expected type
If a parent type of an anonymous class is an Ident or Select which refers to a parameterized type, use the expected type to infer its type parameters. Fixes #1803.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i1803.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/i1803.scala b/tests/pos/i1803.scala
new file mode 100644
index 000000000..19bf21918
--- /dev/null
+++ b/tests/pos/i1803.scala
@@ -0,0 +1,7 @@
+class C[T]
+
+object Test {
+ def f(x: C[Int]) = ???
+
+ f(new C {})
+}