mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 13:30:33 +00:00
hopefully easier to understand error message (#21585)
This commit is contained in:
@@ -132,7 +132,7 @@ proc pickBestCandidate(c: PContext, headSymbol: PNode,
|
||||
# just in case, should be impossible though
|
||||
if syms.len == 0:
|
||||
break
|
||||
|
||||
|
||||
if nextSymIndex > high(syms):
|
||||
# we have reached the end
|
||||
break
|
||||
@@ -293,7 +293,7 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors):
|
||||
const
|
||||
errTypeMismatch = "type mismatch: got <"
|
||||
errButExpected = "but expected one of:"
|
||||
errExpectedPosition = "Expected one of (first mismatch at position [#]):"
|
||||
errExpectedPosition = "Expected one of (first mismatch at [position]):"
|
||||
errUndeclaredField = "undeclared field: '$1'"
|
||||
errUndeclaredRoutine = "attempting to call undeclared routine: '$1'"
|
||||
errBadRoutine = "attempting to call routine: '$1'$2"
|
||||
|
||||
@@ -7,7 +7,7 @@ Expression: int(inNanoseconds(t2 - t1)) / 100.5
|
||||
[1] int(inNanoseconds(t2 - t1)): int
|
||||
[2] 100.5: float64
|
||||
|
||||
Expected one of (first mismatch at position [#]):
|
||||
Expected one of (first mismatch at [position]):
|
||||
[1] proc `/`(x, y: float): float
|
||||
[1] proc `/`(x, y: float32): float32
|
||||
[2] proc `/`(x, y: int): float
|
||||
@@ -20,4 +20,4 @@ from times import inNanoseconds
|
||||
let t1 = getMonotime()
|
||||
let result = 1 + 2
|
||||
let t2 = getMonotime()
|
||||
echo "Elapsed: ", (t2 - t1).inNanoseconds.int / 100.5
|
||||
echo "Elapsed: ", (t2 - t1).inNanoseconds.int / 100.5
|
||||
|
||||
Reference in New Issue
Block a user