Skip to content

Commit

Permalink
fixes #16617 [backport]
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Dec 30, 2021
1 parent a61bbf7 commit 0c8ac3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/typeallowed.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c8ac3c

Please sign in to comment.