From 79ec6d677cd7d63e3e8e90101c30b1dc1103dcc9 Mon Sep 17 00:00:00 2001 From: metagn Date: Fri, 2 Dec 2022 11:19:26 +0300 Subject: [PATCH] Add back error message to tprevent_forloopvar_mutations (#20992) --- tests/varres/tprevent_forloopvar_mutations.nim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/varres/tprevent_forloopvar_mutations.nim b/tests/varres/tprevent_forloopvar_mutations.nim index aae23d8b17..fef75b339f 100644 --- a/tests/varres/tprevent_forloopvar_mutations.nim +++ b/tests/varres/tprevent_forloopvar_mutations.nim @@ -1,5 +1,14 @@ discard """ errormsg: "type mismatch: got " + nimout: '''tprevent_forloopvar_mutations.nim(16, 7) Error: type mismatch: got +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: