Add back error message to tprevent_forloopvar_mutations (#20992)
This commit is contained in:
parent
10b6e4f5b4
commit
79ec6d677c
1 changed files with 9 additions and 0 deletions
|
|
@ -1,5 +1,14 @@
|
||||||
discard """
|
discard """
|
||||||
errormsg: "type mismatch: got <int>"
|
errormsg: "type mismatch: got <int>"
|
||||||
|
nimout: '''tprevent_forloopvar_mutations.nim(16, 7) Error: type mismatch: got <int>
|
||||||
|
but expected one of:
|
||||||
|
proc inc[T, V: Ordinal](x: var T; y: V = 1)
|
||||||
|
first type mismatch at position: 1
|
||||||
|
required type for x: var T: Ordinal
|
||||||
|
but expression 'i' is immutable, not 'var'
|
||||||
|
|
||||||
|
expression: inc i
|
||||||
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for i in 0..10:
|
for i in 0..10:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue