parent
3105909f88
commit
7ccc7d7e93
4 changed files with 26 additions and 6 deletions
14
tests/lent/tnot_allowed_lent2.nim
Normal file
14
tests/lent/tnot_allowed_lent2.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
errmsg: "'x' cannot be assigned to"
|
||||
line: 10
|
||||
"""
|
||||
|
||||
proc bug14498 =
|
||||
var a = @['a', 'b', 'c', 'd', 'e', 'f']
|
||||
|
||||
for x in a:
|
||||
x = 'c'
|
||||
|
||||
echo a
|
||||
|
||||
bug14498()
|
||||
Loading…
Add table
Add a link
Reference in a new issue