Skip to content

Commit

Permalink
Add back error message to tprevent_forloopvar_mutations (nim-lang#20992)
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn authored Dec 2, 2022
1 parent 10b6e4f commit 79ec6d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/varres/tprevent_forloopvar_mutations.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
discard """
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:
Expand Down

0 comments on commit 79ec6d6

Please sign in to comment.