diff options
author | odersky <odersky@gmail.com> | 2016-10-16 13:26:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-16 13:26:34 +0200 |
commit | 0fdd4e37ffca9b1da770ba348aece793c200f1ff (patch) | |
tree | cab76702a7a8e31618d39cacac017ae144344dc0 /tests/pos | |
parent | 009398bf72d4ec3e10f4b6f56431927065c3b846 (diff) | |
parent | 5d531ec78173b9524acd3b58485f89099dbe6991 (diff) | |
download | dotty-0fdd4e37ffca9b1da770ba348aece793c200f1ff.tar.gz dotty-0fdd4e37ffca9b1da770ba348aece793c200f1ff.tar.bz2 dotty-0fdd4e37ffca9b1da770ba348aece793c200f1ff.zip |
Merge pull request #1592 from dotty-staging/fix-#1590
Fix #1590: Eliminate wildcards when approximating a type
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i1590.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos/i1590.scala b/tests/pos/i1590.scala new file mode 100644 index 000000000..ab922c218 --- /dev/null +++ b/tests/pos/i1590.scala @@ -0,0 +1,10 @@ +case class W[T](seq: Option[Option[T]] = Option.empty) +object W { + def apply[T] = new W[T]() +} + +case class V[T](vv: W[W[T]] = W.apply) +object Test { + W[Int]() + // V[Int]() fails in scalac and dotty: both instantiate the vv-default to W[Nothing] +} |