Skip to content

Commit a506b50

Browse files
Relax Ycheck's checkNotRepeated
See i3248.scala for an example of a non case class pattern leaking scala.annotation.internal.Repeated.
1 parent 954e080 commit a506b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class TreeChecker extends Phase with SymTransformer {
288288
}
289289

290290
def checkNotRepeated(tree: Tree)(implicit ctx: Context): tree.type = {
291-
def allowedRepeated = (tree.symbol.flags is Case) && tree.tpe.widen.isRepeatedParam
291+
def allowedRepeated = tree.tpe.widen.isRepeatedParam
292292

293293
assert(!tree.tpe.widen.isRepeatedParam || allowedRepeated, i"repeated parameter type not allowed here: $tree")
294294
tree

0 commit comments

Comments
 (0)