kcl-lang / kcl

KCL Programming Language (CNCF Sandbox Project). https://kcl-lang.io
https://kcl-lang.io
Apache License 2.0
1.42k stars 110 forks source link

bug in adding to list #1400

Closed steeling closed 1 month ago

steeling commented 1 month ago
kcl version
0.8.9-darwin-arm64

input:

schema x:
    m: [str] = ["hello"]

s = x {
}

t = s | {
    m += ["world"]
}

outputs

s:
  m:
  - hello
t:
  m:
  - hello
  - hello
  - world

expected:

s:
  m:
  - hello
t:
  m:
  - hello
  - world
Peefy commented 1 month ago

Good Catch! Thank you! fixed in #1402, will be released in the 0.9.0 stable version.