cx
cx copied to clipboard
No compilation error when appending to a pointer to a slice
@asahi3g commented on Jul 3
To Reproduce
package main
func main()() {
var si []i32
var psi *[]i32 = &si
psi = append(psi, 4)
panic(true, false, "must not compile")
}
Expected behavior
Compilation error eg golang :
first argument to append must be slice; have *[]int32
Screenshots
byts1 [1]
byts2 [0]
pending_9.cx: 6: result was not equal to the expected value; must not compile
Desktop:
- OS: Linux
- CX Version 0.0.7, commit: f999780