summary refs log tree commit diff stats
path: root/compiler/semobjconstr.nim
diff options
context:
space:
mode:
authorhaxscramper <haxscramper@gmail.com>2021-11-02 10:54:04 +0300
committerGitHub <noreply@github.com>2021-11-02 08:54:04 +0100
commit4c510d5577a0ced6a31b8417fed74acdd604b9a3 (patch)
tree4930c9d2ba03f1f1cdb98ef8134336a5a450eae1 /compiler/semobjconstr.nim
parent2f730afe9e7eb981258aea257deba0240f488dd1 (diff)
downloadNim-4c510d5577a0ced6a31b8417fed74acdd604b9a3.tar.gz
[FIX] Do not break formatted string line (#19085) [backport]
Otherwise, compiler produces broken error message - `$1` is not interpolated

`Error: The $1 type doesn't have a default value. The following fields must be initialized: importGraph.`
Diffstat (limited to 'compiler/semobjconstr.nim')
-rw-r--r--compiler/semobjconstr.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim
index 001956ede..30ab76957 100644
--- a/compiler/semobjconstr.nim
+++ b/compiler/semobjconstr.nim
@@ -368,8 +368,7 @@ proc defaultConstructionError(c: PContext, t: PType, info: TLineInfo) =
     let initResult = semConstructTypeAux(c, constrCtx, {})
     assert constrCtx.missingFields.len > 0
     localError(c.config, info,
-      "The $1 type doesn't have a default value. The following fields must " &
-      "be initialized: $2." % [typeToString(t), listSymbolNames(constrCtx.missingFields)])
+      "The $1 type doesn't have a default value. The following fields must be initialized: $2." % [typeToString(t), listSymbolNames(constrCtx.missingFields)])
   elif objType.kind == tyDistinct:
     localError(c.config, info,
       "The $1 distinct type doesn't have a default value." % typeToString(t))