Revert localErrorNode param order changes (#17809)

* Revert localErrorNode param order changes

* Remove unused globalError overload

* heh
This commit is contained in:
Clyybber 2021-04-21 16:03:30 +02:00 • committed by GitHub
commit 80389b8053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 13 deletions

View file

@ -2620,7 +2620,7 @@ proc semTupleConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
# check if either everything or nothing is tyTypeDesc
for i in 1..<tupexp.len:
if isTupleType != (tupexp[i].typ.kind == tyTypeDesc):
return localErrorNode(c, n, "Mixing types and values in tuples is not allowed.", tupexp[i].info)
return localErrorNode(c, n, tupexp[i].info, "Mixing types and values in tuples is not allowed.")
if isTupleType: # expressions as ``(int, string)`` are reinterpret as type expressions
result = n
var typ = semTypeNode(c, n, nil).skipTypes({tyTypeDesc})