xls icon indicating copy to clipboard operation
xls copied to clipboard

DSLX: Can't declare array of ColonRef type

Open RobSpringer opened this issue 2 years ago • 1 comments

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.

RobSpringer avatar Sep 06 '22 17:09 RobSpringer

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.

RobSpringer avatar Sep 27 '22 18:09 RobSpringer

Looks like the attached patch fixed both issues. Closing!

RobSpringer avatar Nov 04 '22 22:11 RobSpringer