Skip to content

Commit 90e9bd2

Browse files
committed
vcParents: add ensureConforms to class tag generated for arrays of value classes
1 parent 4a0c271 commit 90e9bd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/transform/VCParents.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ class VCParents extends MiniPhaseTransform with DenotTransformer {
152152
case Apply(TypeApply(_, tptr :: _), _) if (tree.fun.symbol eq scala2ClassTagApplyMethod) => {
153153
val claz = tptr.tpe.classSymbol
154154
if (ValueClasses.isDerivedValueClass (claz) )
155-
ref(claz.companionModule) else tree
155+
//TODO: add ensureConforms to fix -Ycheck:all for array of instances of case class X[T](val x: T) extends AnyVal
156+
ref(claz.companionModule).ensureConforms(tree.tpe) else tree
156157
}
157158
case _ => tree
158159
}

0 commit comments

Comments
 (0)