diff options
author | Araq <rumpf_a@web.de> | 2015-09-14 20:30:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-14 20:30:55 +0200 |
commit | 1251fc76c32bdd50a3b9540e0cd80b0c435051ce (patch) | |
tree | e9a99e832743501ddd598005501ca7941c8b818b /compiler/semexprs.nim | |
parent | 0aa908c86c84c62bae52618b91d5f1cba4c0dea1 (diff) | |
download | Nim-1251fc76c32bdd50a3b9540e0cd80b0c435051ce.tar.gz |
fixes #3212
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 84cbbdc93..0e1d52fd4 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -452,18 +452,18 @@ proc changeType(n: PNode, newType: PType, check: bool) = let tup = newType.skipTypes({tyGenericInst}) if tup.kind != tyTuple: if tup.kind == tyObject: return - internalError(n.info, "changeType: no tuple type for constructor") + globalError(n.info, "no tuple type for constructor") elif sonsLen(n) > 0 and n.sons[0].kind == nkExprColonExpr: # named tuple? for i in countup(0, sonsLen(n) - 1): var m = n.sons[i].sons[0] if m.kind != nkSym: - internalError(m.info, "changeType(): invalid tuple constr") + globalError(m.info, "invalid tuple constructor") return if tup.n != nil: var f = getSymFromList(tup.n, m.sym.name) if f == nil: - internalError(m.info, "changeType(): invalid identifier") + globalError(m.info, "unknown identifier: " & m.sym.name.s) return changeType(n.sons[i].sons[1], f.typ, check) else: |