cx
cx copied to clipboard
Wrong sprintf behaviour when passing increment expression as argument
@asahi3g commented on Mar 12
To Reproduce
package main
func main()() {
var i i32 = 4
var s str = sprintf("%d", i++)
printf("'%s'\n", s)
test(s, "4", "")
}
Expected behavior Test should pass and print '4'
Screenshots
'%!d(MISSING)'
byts1 [37 33 100 40 77 73 83 83 73 78 71 41]
byts2 [52]
pending_0.cx: 8: result was not equal to the expected value
Desktop (please complete the following information):
- OS: Linux
- CX Version : 0.6.1, d8775bf