bugfix: varargs count as open arrays (#19447)

(cherry picked from commit 6ea6225523)
This commit is contained in:
Andreas Rumpf
2022-01-25 08:08:22 +01:00
committed by narimiran
parent 2fb1c80f42
commit a8e040ec30

View File

@@ -233,7 +233,7 @@ proc classifyViewTypeAux(marker: var IntSet, t: PType): ViewTypeKind =
case t.kind
of tyVar:
result = mutableView
of tyLent, tyOpenArray:
of tyLent, tyOpenArray, tyVarargs:
result = immutableView
of tyGenericInst, tyDistinct, tyAlias, tyInferred, tySink, tyOwned,
tyUncheckedArray, tySequence, tyArray, tyRef, tyStatic: