fix string literal assignment with different lengths on ARC (#24083)

fixes #24080
This commit is contained in:
metagn
2024-09-08 21:17:26 +03:00
committed by GitHub
parent 7cd1777218
commit cd22560af5
2 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
discard """
matrix: "--mm:arc; --mm:orc"
"""
block: # issue #24080
var a = (s: "a")
var b = "a"
a.s.setLen 0
b = a.s
doAssert b == ""
block: # issue #24080, longer string
var a = (s: "abc")
var b = "abc"
a.s.setLen 2
b = a.s
doAssert b == "ab"