SSO strings: bugfix (#25810)

This commit is contained in:
Andreas Rumpf
2026-05-12 23:20:10 +02:00
committed by GitHub
parent f0c60b06e5
commit 6204e48ba5
6 changed files with 54 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
discard """
cmd: "nim check --strings:sso --mm:orc --hints:off $file"
action: "reject"
nimout: '''
tsso_string_index_var.nim(13, 12) Error: expression 's[0]' is immutable, not 'var'
'''
"""
proc passByVar(c: var char) =
c = 'x'
var s = "abc"
passByVar(s[0])