Missing error about recursive type in public state variable
Open
bug :bug:
low effort
low impact
should have
should report error
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
```solidity
contract MetaTest {
struct Metadata {
bool flag;
uint256[] ids;
}
Metadata public meta;
}
```
The above code is missing an error.
On the other hand,
```solidity
contract MetaTest {
struct Metadata {
uint256[] ids;
}
Metadata public meta;
}
```
has the correct error:
```
Error: Internal or recursive type is not allowed for public state variables.
--> :7:2:
|
7 | Metadata public meta;
| ^^^^^^^^^^^^^^^^^^^^
```
Was bought up by https://matrix.to/#/!vVfTacneThsGqrLLFd:gitter.im/$m4KcZLxNX08utoQcYsYLb1dWQD_WAAWLJpvMbqYjdyI?via=gitter.im&via=matrix.org
Contributor guide
Assessment
This issue has not been assessed yet.