cx icon indicating copy to clipboard operation
cx copied to clipboard

can't initialize multidimensional arrays/slices with values

Open vidya88 opened this issue 5 years ago • 1 comments

@corpusc commented on Jun 27

To Reproduce

  1. Enter this code: package main

func main() { var i [][]i32 = [][]i32{ {1, 2}, {3, 4} } }

  1. See error: c.cx:4: syntax error: unexpected LBRACE

Expected behavior No error

Desktop (please complete the following information):

  • OS: Windows 10
  • CX Version 0.7.0 full release

vidya88 avatar Sep 24 '19 02:09 vidya88

Adding [][]i32 before {1, 2} and {3, 4} compiles program without errors.

archerixx avatar Mar 17 '21 19:03 archerixx