Interestingly, if I try to compile that program with both s1 and s2 uncommented (instead of individually), I get this error:
/tmp/odin/soa.odin(7:35) Error: Expected a constant integer as an array field
s1: #soa[2]S = {{i = 1, j = 2}, {i = 3, j = 4}}
^~~~^
I'm not sure how related this is to #3515, given this is about arrays, and that one is about slices. Even though it says in that report that #soa arrays are not supported for compound literals, I was able to get the s3 declaration to compile. I'm assuming based on the error message for s2 that it's because #soa[2]S turns into a [2]int and the {{1,2}, ... is parsed just fine.
Interestingly, if I try to compile that program with both
s1
ands2
uncommented (instead of individually), I get this error:I'm not sure how related this is to #3515, given this is about arrays, and that one is about slices. Even though it says in that report that
#soa arrays are not supported for compound literals
, I was able to get thes3
declaration to compile. I'm assuming based on the error message fors2
that it's because#soa[2]S
turns into a[2]int
and the{{1,2}, ...
is parsed just fine.