Description and Reproduction Sample
struct Foo {
mut x i32
}
fun main() {
mut a := Foo{}
b := a
a.x = 3
println(a)
println(b)
}
Current Behavior
JS backend:
Foo{
x = 3
}
Foo{
x = 3
}
C backend:
Foo{
x = 3
}
Foo{
x = 0
}
Expected Behavior
JS should behave like C
Possible Solution and Additional Information
No response
Environment details (bait doctor)
Version: Bait 0.0.7 81a5a9a
OS: linux/x64
Git: git version 2.47.0
Node.js: v23.1.0
CC: cc (GCC) 14.2.1 20240910
Description and Reproduction Sample
Current Behavior
JS backend:
C backend:
Expected Behavior
JS should behave like C
Possible Solution and Additional Information
No response
Environment details (bait doctor)
Version: Bait 0.0.7 81a5a9a
OS: linux/x64
Git: git version 2.47.0
Node.js: v23.1.0
CC: cc (GCC) 14.2.1 20240910