xls
xls copied to clipboard
DSLX: Can't declare array of ColonRef type
Behold:
let ctr_cmds = aes_ctr[u32:4]:[ aes_ctr::initial_state().command, ...];
results in
0093: let ctr_cmds = aes_ctr[u32:4]:[ aes_ctr::initial_state().command, ...];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ ParseError: Expected ';', got ':'
Whereas
type asdf = aes_ctr::Command;
let ctr_cmds = aes_ctr[u32:4]:[ aes_ctr::initial_state().command, ...];
works.
Similar: can't instantiate an imported struct!
import foo
let bar = foo::Type { ... };
will throw an error.
You can work around this with type baz = foo::Type;
, but one shouldn't have to.
Looks like the attached patch fixed both issues. Closing!