fix ICE in isUnresolvedSym (#13925)
Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
parent
f86fc5316a
commit
b4e9f8e814
1 changed files with 6 additions and 5 deletions
|
|
@ -622,11 +622,12 @@ proc isAssignable(c: PContext, n: PNode; isUnsafeAddr=false): TAssignableResult
|
||||||
result = parampatterns.isAssignable(c.p.owner, n, isUnsafeAddr)
|
result = parampatterns.isAssignable(c.p.owner, n, isUnsafeAddr)
|
||||||
|
|
||||||
proc isUnresolvedSym(s: PSym): bool =
|
proc isUnresolvedSym(s: PSym): bool =
|
||||||
return s.kind == skGenericParam or
|
result = s.kind == skGenericParam
|
||||||
tfInferrableStatic in s.typ.flags or
|
if not result and s.typ != nil:
|
||||||
(s.kind == skParam and s.typ.isMetaType) or
|
result = tfInferrableStatic in s.typ.flags or
|
||||||
(s.kind == skType and
|
(s.kind == skParam and s.typ.isMetaType) or
|
||||||
s.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} != {})
|
(s.kind == skType and
|
||||||
|
s.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} != {})
|
||||||
|
|
||||||
proc hasUnresolvedArgs(c: PContext, n: PNode): bool =
|
proc hasUnresolvedArgs(c: PContext, n: PNode): bool =
|
||||||
# Checks whether an expression depends on generic parameters that
|
# Checks whether an expression depends on generic parameters that
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue