constraint now part of the parameter symbol and not of the type
This commit is contained in:
parent
0834224070
commit
7171ae62cb
7 changed files with 25 additions and 21 deletions
|
|
@ -71,8 +71,8 @@ proc inSymChoice(sc, x: PNode): bool =
|
|||
|
||||
proc checkTypes(c: PPatternContext, p: PSym, n: PNode): bool =
|
||||
# check param constraints first here as this is quite optimized:
|
||||
if p.typ.constraint != nil:
|
||||
result = matchNodeKinds(p.typ.constraint, n)
|
||||
if p.constraint != nil:
|
||||
result = matchNodeKinds(p.constraint, n)
|
||||
if not result: return
|
||||
if isNil(n.typ):
|
||||
result = p.typ.kind in {tyEmpty, tyStmt}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue