summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-12-31 09:21:30 +0100
committerGitHub <noreply@github.com>2021-12-31 09:21:30 +0100
commitac37eed5a28042d50e23d9ae145f2d46b8dc5058 (patch)
tree31b3f2bfad8c7550d986a1ca5a7155d53a04ecce
parentdc5c88ca79e871aefa76c7fefae4282c639a3283 (diff)
downloadNim-ac37eed5a28042d50e23d9ae145f2d46b8dc5058.tar.gz
fixes #16617 [backport] (#19300)
-rw-r--r--compiler/typeallowed.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/typeallowed.nim b/compiler/typeallowed.nim
index d00aa538f..78cd74e56 100644
--- a/compiler/typeallowed.nim
+++ b/compiler/typeallowed.nim
@@ -57,6 +57,8 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
   of tyVar, tyLent:
     if kind in {skProc, skFunc, skConst} and (views notin c.features):
       result = t
+    elif taIsOpenArray in flags:
+      result = t
     elif t.kind == tyLent and ((kind != skResult and views notin c.features) or
                               kind == skParam): # lent can't be used as parameters.
       result = t