From 93df03c2abc4be4aa6c47c9c2df5190d4918e3a1 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 20 Jan 2026 19:40:39 +0800 Subject: [PATCH] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- compiler/lexer.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 7263779faa..1609df4d40 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -508,7 +508,9 @@ proc getNumber(L: var Lexer, result: var Token) = # Maximum digits = ceil(bitWidth / bitsPerDigit) = (bitWidth + bitsPerDigit - 1) div bitsPerDigit let maxDigits = (bitWidth + bitsPerDigit - 1) div bitsPerDigit if numDigits > maxDigits: - lexMessageLitNum(L, "number has $1 digits but type only supports $2 digits: '$3'" % [$numDigits, $maxDigits, result.literal], startpos, warnLongLiterals) + lexMessageLitNum(L, + "number has " & $numDigits & " digits but type only supports " & + $maxDigits & " digits: '$1'", startpos, warnLongLiterals) # Bounds checks. Non decimal literals are allowed to overflow the range of # the datatype as long as their pattern don't overflow _bitwise_, hence