diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index d24184af8..25d1c1eeb 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -420,6 +420,9 @@ std::string StructDefinition::eip712EncodeTypeWithoutSubtypes() const std::string StructDefinition::eip712EncodeType() const { + // EIP-712 supports recurvie structs, but not containing nested mappings + solAssert(!annotation().containsNestedMapping.has_value() || !annotation().containsNestedMapping.value(), "Struct containing mapping cannot be used in EIP-712."); + // std::set enables duplicates elimination and ordered enumeration std::set subtypes; insertEip712EncodedSubtypes(subtypes);