aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-11 20:56:02 +0100
committerMartin Odersky <odersky@gmail.com>2017-03-12 12:11:49 +0100
commitfac74a618ae4666490cd8c7fd3f9604d877562d9 (patch)
tree6ceb2db2beb93a0faec2d46933362d9470ff4209 /tests/pos
parentb2d3b8938391516e81f18962e67f5bacf0aa2440 (diff)
downloaddotty-fac74a618ae4666490cd8c7fd3f9604d877562d9.tar.gz
dotty-fac74a618ae4666490cd8c7fd3f9604d877562d9.tar.bz2
dotty-fac74a618ae4666490cd8c7fd3f9604d877562d9.zip
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.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/t1569.scala6
1 files changed, 6 insertions, 0 deletions
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")
+}