fix hintMsgOrigin regression + simplify msgs code (#17805)
This commit is contained in:
parent
603af22b7c
commit
8de053d870
6 changed files with 22 additions and 32 deletions
|
|
@ -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, tupexp[i].info, "Mixing types and values in tuples is not allowed.")
|
||||
return localErrorNode(c, n, "Mixing types and values in tuples is not allowed.", tupexp[i].info)
|
||||
if isTupleType: # expressions as ``(int, string)`` are reinterpret as type expressions
|
||||
result = n
|
||||
var typ = semTypeNode(c, n, nil).skipTypes({tyTypeDesc})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue