From 4c5ef53fdafe650d579bf4769ca09de2ce6e795a Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Thu, 9 Apr 2020 17:09:51 -0700 Subject: [PATCH] all pragmas in errmsgs should be written: '.importc' (un-ambiguous and less verbose than {.importc.} --- compiler/vmgen.nim | 2 +- tests/misc/tsizeof2.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 35b04771d72b8..b408db08b0f99 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -727,7 +727,7 @@ proc genBinaryABCD(c: PCtx; n: PNode; dest: var TDest; opc: TOpcode) = c.freeTemp(tmp3) template sizeOfLikeMsg(name): string = - "'$1' requires 'importc' types to be 'completeStruct'" % [name] + "'$1' requires '.importc' types to be '.completeStruct'" % [name] proc genNarrow(c: PCtx; n: PNode; dest: TDest) = let t = skipTypes(n.typ, abstractVar-{tyTypeDesc}) diff --git a/tests/misc/tsizeof2.nim b/tests/misc/tsizeof2.nim index bf0d8e585c693..da28de5083828 100644 --- a/tests/misc/tsizeof2.nim +++ b/tests/misc/tsizeof2.nim @@ -1,5 +1,5 @@ discard """ -errormsg: "'sizeof' requires 'importc' types to be 'completeStruct'" +errormsg: "'sizeof' requires '.importc' types to be '.completeStruct'" line: 9 """