skycoin / cx

A new programming language for blockchain.
Other
43 stars 47 forks source link

can't initialize multidimensional arrays/slices with values #37

Open vidya88 opened 4 years ago

vidya88 commented 4 years ago

@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):

archerixx commented 3 years ago

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