diff options
author | hlaaftana <10591326+hlaaftana@users.noreply.github.com> | 2020-04-24 10:22:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 09:22:12 +0200 |
commit | b2141fc2a12b239c4b24f38ffbd3ca629278630e (patch) | |
tree | 4ceb2352280d4d6637f91f6ae028ca8e71fef146 /compiler | |
parent | dd5ccc3e5aeb927a65ac40117113a1ca6b02d48c (diff) | |
download | Nim-b2141fc2a12b239c4b24f38ffbd3ca629278630e.tar.gz |
changed type() to typeof() in docs and error messages (#14084)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semcall.nim | 2 | ||||
-rw-r--r-- | compiler/types.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 321745c82..ab28c21b2 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -633,7 +633,7 @@ proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode = if s.ast[genericParamsPos].safeLen != n.len-1: let expected = s.ast[genericParamsPos].safeLen localError(c.config, getCallLineInfo(n), errGenerated, "cannot instantiate: '" & renderTree(n) & - "'; got " & $(n.len-1) & " type(s) but expected " & $expected) + "'; got " & $(n.len-1) & " typeof(s) but expected " & $expected) return n result = explicitGenericSym(c, n, s) if result == nil: result = explicitGenericInstError(c, n) diff --git a/compiler/types.nim b/compiler/types.nim index eac9695b6..b75a97c25 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -587,7 +587,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string = if t.n == nil: result = "unknown" else: - result = "type(" & renderTree(t.n) & ")" + result = "typeof(" & renderTree(t.n) & ")" of tyArray: if t[0].kind == tyRange: result = "array[" & rangeToStr(t[0].n) & ", " & |