fix string init error about string multiplication. fixes #209

This commit is contained in:
Irmen de Jong
2026-01-30 17:36:48 +01:00
parent 75accf4059
commit 88b48f58c9
2 changed files with 14 additions and 2 deletions
@@ -65,6 +65,19 @@ class TestVariables: FunSpec({
"""
compileText(C64Target(), false, text, outputDir, writeAssembly = true) shouldNotBe null
}
test("string init with int multiplication") {
val src="""
main {
sub start() {
const uword size = 20
const uword sizeplus = 20+1
str @shared tmp1 = " " * size
str @shared tmp2 = " " * sizeplus
}
}"""
compileText(C64Target(), false, src, outputDir, writeAssembly = true) shouldNotBe null
}
test("negation of unsigned via casts") {
val text = """