fixes #4207
This commit is contained in:
parent
660cd7ed70
commit
041054e038
3 changed files with 12 additions and 7 deletions
|
|
@ -536,7 +536,7 @@ proc semConst(c: PContext, n: PNode): PNode =
|
|||
localError(a.sons[2].info, errConstExprExpected)
|
||||
continue
|
||||
if typeAllowed(typ, skConst) != nil and def.kind != nkNilLit:
|
||||
localError(a.info, errXisNoType, typeToString(typ))
|
||||
localError(a.info, "invalid type for const: " & typeToString(typ))
|
||||
continue
|
||||
v.typ = typ
|
||||
v.ast = def # no need to copy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue