cx icon indicating copy to clipboard operation
cx copied to clipboard

Wrong sprintf behaviour when passing increment expression as argument

Open vidya88 opened this issue 5 years ago • 0 comments

@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

vidya88 avatar Sep 24 '19 05:09 vidya88