From fac74a618ae4666490cd8c7fd3f9604d877562d9 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 11 Mar 2017 20:56:02 +0100 Subject: Fix #1569: Improve avoidance algorithm The essential change is that we do not throw away more precise info of the avoided type if the expected type is fully defined. --- tests/pos/t1569.scala | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/pos/t1569.scala (limited to 'tests/pos') diff --git a/tests/pos/t1569.scala b/tests/pos/t1569.scala new file mode 100644 index 000000000..5e48c03b1 --- /dev/null +++ b/tests/pos/t1569.scala @@ -0,0 +1,6 @@ +// See pos/t1569a.scala for related examples that work. +object Bug { + class C { type T } + def foo(x: Int)(y: C)(z: y.T): Unit = {} + foo(3)(new C { type T = String })("hello") +} -- cgit v1.2.3