Open bodily11 opened 2 years ago
What do you mean 'defined inline'? Any examples?
I'm hitting this issue now too. I think what @bodily11 was referring to is the following. Take for instance
type Balances = vec record {
0: text;
1: nat64;
};
The parser won't accept it unless you break out the nested record like so
type BalanceTuple = record {
0: text;
1: nat64;
};
type Balances = vec BalanceTuple;
Actually, I think nested definitions might be okay. But, the numbered tuple format isn't
// Doesn't work
type BalanceTuple = record {
0: text;
1: nat64;
};
// Works
type BalanceTuple = record {
text;
nat64;
};
I have noticed that your candid parser doesn't parse types/values in candid if they are defined inline. So I have had to pull candid files and manually edit (pull out all inline definitions to define them normally) because they aren't pick up by the candid parser.
This is an enhancement that would be awesome to see.