diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-04-16 18:46:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 12:46:59 +0200 |
commit | 20698b8057b09ace67ff0bc932aa552157ee7c9d (patch) | |
tree | 57c36d88689c8a60751a2ceae288fd705aa3d3a7 /compiler/semobjconstr.nim | |
parent | 549ef24f35213302ba66e9e786c18ab9146940ee (diff) | |
download | Nim-20698b8057b09ace67ff0bc932aa552157ee7c9d.tar.gz |
fixes #23494; Wrong type in object construction error message (#23504)
fixes #23494
Diffstat (limited to 'compiler/semobjconstr.nim')
-rw-r--r-- | compiler/semobjconstr.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim index e29d723d7..96b2d702d 100644 --- a/compiler/semobjconstr.nim +++ b/compiler/semobjconstr.nim @@ -478,7 +478,7 @@ proc semObjConstr(c: PContext, n: PNode, flags: TExprFlags; expectedType: PType result.typ.flags.incl tfHasOwned if t.kind != tyObject: return localErrorNode(c, result, if t.kind != tyGenericBody: - "object constructor needs an object type".dup(addDeclaredLoc(c.config, t)) + "object constructor needs an object type".dup(addTypeNodeDeclaredLoc(c.config, t)) else: "cannot instantiate: '" & typeToString(t, preferDesc) & "'; the object's generic parameters cannot be inferred and must be explicitly given" |