summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-11-16 22:19:26 +0800
committerGitHub <noreply@github.com>2020-11-16 14:19:26 +0000
commit4213f7a6c90bbb593decced8a27b563fd9d36f6f (patch)
tree553002d1f1940899cda978d62bee8eb8a87b76ec
parenta4d02f591c685b261a41a7b9b51aaba05c542499 (diff)
downloadNim-4213f7a6c90bbb593decced8a27b563fd9d36f6f.tar.gz
rename: stmt -> typed and expr -> untyped (#15989)
* stmt -> typed

* expr -> untyped

* minor
-rw-r--r--compiler/ast.nim2
-rw-r--r--compiler/semtypes.nim2
-rw-r--r--compiler/sigmatch.nim4
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index ca931ab09..3d14aba66 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -1804,7 +1804,7 @@ proc isAtom*(n: PNode): bool {.inline.} =
   result = n.kind >= nkNone and n.kind <= nkNilLit
 
 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}
 
 proc makeStmtList*(n: PNode): PNode =
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 5feb25a59..0ec7140e0 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -1315,7 +1315,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
             "' is only valid for macros and templates")
       # 'auto' as a return type does not imply a generic:
       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':
         r = newTypeS(tyUntyped, c)
       elif r.kind == tyStatic:
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 2e332f105..b674c3d9e 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -1240,8 +1240,8 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
       if result < isGeneric: result = isNone
     else: discard
   of tyOpenArray, tyVarargs:
-    # varargs[expr] is special too but handled earlier. So we only need to
-    # handle varargs[stmt] which is the same as varargs[typed]:
+    # varargs[untyped] is special too but handled earlier. So we only need to
+    # handle varargs[typed]:
     if f.kind == tyVarargs:
       if tfVarargs in a.flags:
         return typeRel(c, f.base, a.lastSon, flags)