argotorg / argotorg/solidity

Missing error about recursive type in public state variable

Open
#11,369 5 comments 0 reactions 1 assignee Claimed by @christianparpart View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.