Confusing error message when a getter would return zero values and the compiler refuses to generate it #12302
Labels
easy difficulty
good first issue
should report better error
Error is just badly reported. Should be a proper type error - source is not fine.
Original title: "unusual behavior with mapping within struct within library".
Description
When a library contains a struct type whose only member is a
mapping
, and a contract contains a public member of that struct type, then compilation fails with errorInternal or recursive type is not allowed for public state variables.
. But if you add a further field in the struct (of typeuint256
for example), then compilation does not fail. This looks like a bug.Environment
Steps to Reproduce
Lib.sol
A.sol
BUT IF YOU UNCOMMENT the commented line, then it compiles.
The text was updated successfully, but these errors were encountered: