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.scala10
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]
+}