rename: stmt -> typed and expr -> untyped (#15989)
* stmt -> typed * expr -> untyped * minor
This commit is contained in:
parent
a4d02f591c
commit
4213f7a6c9
3 changed files with 4 additions and 4 deletions
|
|
@ -1804,7 +1804,7 @@ proc isAtom*(n: PNode): bool {.inline.} =
|
||||||
result = n.kind >= nkNone and n.kind <= nkNilLit
|
result = n.kind >= nkNone and n.kind <= nkNilLit
|
||||||
|
|
||||||
proc isEmptyType*(t: PType): bool {.inline.} =
|
proc isEmptyType*(t: PType): bool {.inline.} =
|
||||||
## 'void' and 'stmt' types are often equivalent to 'nil' these days:
|
## 'void' and 'typed' types are often equivalent to 'nil' these days:
|
||||||
result = t == nil or t.kind in {tyVoid, tyTyped}
|
result = t == nil or t.kind in {tyVoid, tyTyped}
|
||||||
|
|
||||||
proc makeStmtList*(n: PNode): PNode =
|
proc makeStmtList*(n: PNode): PNode =
|
||||||
|
|
|
||||||
|
|
@ -1315,7 +1315,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
|
||||||
"' is only valid for macros and templates")
|
"' is only valid for macros and templates")
|
||||||
# 'auto' as a return type does not imply a generic:
|
# 'auto' as a return type does not imply a generic:
|
||||||
elif r.kind == tyAnything:
|
elif r.kind == tyAnything:
|
||||||
# 'p(): auto' and 'p(): expr' are equivalent, but the rest of the
|
# 'p(): auto' and 'p(): untyped' are equivalent, but the rest of the
|
||||||
# compiler is hardly aware of 'auto':
|
# compiler is hardly aware of 'auto':
|
||||||
r = newTypeS(tyUntyped, c)
|
r = newTypeS(tyUntyped, c)
|
||||||
elif r.kind == tyStatic:
|
elif r.kind == tyStatic:
|
||||||
|
|
|
||||||
|
|
@ -1240,8 +1240,8 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
||||||
if result < isGeneric: result = isNone
|
if result < isGeneric: result = isNone
|
||||||
else: discard
|
else: discard
|
||||||
of tyOpenArray, tyVarargs:
|
of tyOpenArray, tyVarargs:
|
||||||
# varargs[expr] is special too but handled earlier. So we only need to
|
# varargs[untyped] is special too but handled earlier. So we only need to
|
||||||
# handle varargs[stmt] which is the same as varargs[typed]:
|
# handle varargs[typed]:
|
||||||
if f.kind == tyVarargs:
|
if f.kind == tyVarargs:
|
||||||
if tfVarargs in a.flags:
|
if tfVarargs in a.flags:
|
||||||
return typeRel(c, f.base, a.lastSon, flags)
|
return typeRel(c, f.base, a.lastSon, flags)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue