summary refs log tree commit diff stats
path: root/tests/varres
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2022-12-02 11:19:26 +0300
committerGitHub <noreply@github.com>2022-12-02 16:19:26 +0800
commit79ec6d677cd7d63e3e8e90101c30b1dc1103dcc9 (patch)
tree6284c56db2848e2a266f8c3804d89000f65429f6 /tests/varres
parent10b6e4f5b4a119a8fa42f82a24ae7e4b08b2c103 (diff)
downloadNim-79ec6d677cd7d63e3e8e90101c30b1dc1103dcc9.tar.gz
Add back error message to tprevent_forloopvar_mutations (#20992)
Diffstat (limited to 'tests/varres')
-rw-r--r--tests/varres/tprevent_forloopvar_mutations.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/varres/tprevent_forloopvar_mutations.nim b/tests/varres/tprevent_forloopvar_mutations.nim
index aae23d8b1..fef75b339 100644
--- a/tests/varres/tprevent_forloopvar_mutations.nim
+++ b/tests/varres/tprevent_forloopvar_mutations.nim
@@ -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: