aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1590.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/i1590.scala')
-rw-r--r--tests/pos/i1590.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pos/i1590.scala b/tests/pos/i1590.scala
index a8f36de45..ab922c218 100644
--- a/tests/pos/i1590.scala
+++ b/tests/pos/i1590.scala
@@ -1 +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]
+}