Skip to content

Commit

Permalink
fixes nim-lang#16617 [backport] (nim-lang#19300)
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored and PMunch committed Mar 28, 2022
1 parent a070511 commit fa34fe3
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 fa34fe3

Please sign in to comment.