Add AST Node IdentifierPath

This commit is contained in:
Mathias Baumann 2020-08-31 17:37:03 +02:00
parent 0ea4bdafcd
commit 0b7b174945
33 changed files with 797 additions and 392 deletions

View File

@ -219,7 +219,7 @@ struct OverrideSpecifierChecker: public PostTypeChecker::Checker
{ {
for (ASTPointer<UserDefinedTypeName> const& override: _overrideSpecifier.overrides()) for (ASTPointer<UserDefinedTypeName> const& override: _overrideSpecifier.overrides())
{ {
Declaration const* decl = override->annotation().referencedDeclaration; Declaration const* decl = override->annotation().referencedDeclaration;
solAssert(decl, "Expected declaration to be resolved."); solAssert(decl, "Expected declaration to be resolved.");
if (dynamic_cast<ContractDefinition const*>(decl)) if (dynamic_cast<ContractDefinition const*>(decl))

View File

@ -171,16 +171,21 @@ void ReferencesResolver::endVisit(ModifierDefinition const&)
m_returnParameters.pop_back(); m_returnParameters.pop_back();
} }
void ReferencesResolver::endVisit(UserDefinedTypeName const& _typeName) void ReferencesResolver::endVisit(IdentifierPath const& _path)
{ {
Declaration const* declaration = m_resolver.pathFromCurrentScope(_typeName.namePath()); Declaration const* declaration = m_resolver.pathFromCurrentScope(_path.path());
if (!declaration) if (!declaration)
{ {
m_errorReporter.fatalDeclarationError(7920_error, _typeName.location(), "Identifier not found or not unique."); m_errorReporter.fatalDeclarationError(7920_error, _path.location(), "Identifier not found or not unique.");
return; return;
} }
_typeName.annotation().referencedDeclaration = declaration; _path.annotation().referencedDeclaration = declaration;
}
void ReferencesResolver::endVisit(UserDefinedTypeName const& _typeName)
{
_typeName.annotation().referencedDeclaration = _typeName.pathNode()->annotation().referencedDeclaration;
} }
bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)

View File

@ -82,6 +82,7 @@ private:
void endVisit(FunctionDefinition const& _functionDefinition) override; void endVisit(FunctionDefinition const& _functionDefinition) override;
bool visit(ModifierDefinition const& _modifierDefinition) override; bool visit(ModifierDefinition const& _modifierDefinition) override;
void endVisit(ModifierDefinition const& _modifierDefinition) override; void endVisit(ModifierDefinition const& _modifierDefinition) override;
void endVisit(IdentifierPath const& _typeName) override;
void endVisit(UserDefinedTypeName const& _typeName) override; void endVisit(UserDefinedTypeName const& _typeName) override;
bool visit(InlineAssembly const& _inlineAssembly) override; bool visit(InlineAssembly const& _inlineAssembly) override;
bool visit(Return const& _return) override; bool visit(Return const& _return) override;

View File

@ -557,6 +557,27 @@ private:
util::LazyInit<std::vector<EventDefinition const*>> m_interfaceEvents; util::LazyInit<std::vector<EventDefinition const*>> m_interfaceEvents;
}; };
/**
* A sequence of identifiers separated by dots
*/
class IdentifierPath: public ASTNode
{
public:
IdentifierPath(int64_t _id, SourceLocation const& _location, std::vector<ASTString> _path):
ASTNode(_id, _location), m_path(std::move(_path)) {}
std::vector<ASTString> const& path() const { return m_path; }
IdentifierPathAnnotation& annotation() const override
{
return initAnnotation<IdentifierPathAnnotation>();
}
void accept(ASTVisitor& _visitor) override;
void accept(ASTConstVisitor& _visitor) const override;
private:
std::vector<ASTString> m_path;
};
class InheritanceSpecifier: public ASTNode class InheritanceSpecifier: public ASTNode
{ {
public: public:
@ -1203,18 +1224,19 @@ private:
class UserDefinedTypeName: public TypeName class UserDefinedTypeName: public TypeName
{ {
public: public:
UserDefinedTypeName(int64_t _id, SourceLocation const& _location, std::vector<ASTString> _namePath): UserDefinedTypeName(int64_t _id, SourceLocation const& _location, ASTPointer<IdentifierPath> _namePath):
TypeName(_id, _location), m_namePath(std::move(_namePath)) {} TypeName(_id, _location), m_namePath(std::move(_namePath)) {}
void accept(ASTVisitor& _visitor) override; void accept(ASTVisitor& _visitor) override;
void accept(ASTConstVisitor& _visitor) const override; void accept(ASTConstVisitor& _visitor) const override;
std::vector<ASTString> const& namePath() const { return m_namePath; } std::vector<ASTString> const& namePath() const { return m_namePath->path(); }
ASTPointer<IdentifierPath> const& pathNode() const { return m_namePath; }
UserDefinedTypeNameAnnotation& annotation() const override; UserDefinedTypeNameAnnotation& annotation() const override;
private: private:
std::vector<ASTString> m_namePath; ASTPointer<IdentifierPath> m_namePath;
}; };
/** /**

View File

@ -233,6 +233,12 @@ struct TypeNameAnnotation: ASTAnnotation
TypePointer type = nullptr; TypePointer type = nullptr;
}; };
struct IdentifierPathAnnotation: TypeNameAnnotation
{
/// Referenced declaration, set during reference resolution stage.
Declaration const* referencedDeclaration = nullptr;
};
struct UserDefinedTypeNameAnnotation: TypeNameAnnotation struct UserDefinedTypeNameAnnotation: TypeNameAnnotation
{ {
/// Referenced declaration, set during reference resolution stage. /// Referenced declaration, set during reference resolution stage.

View File

@ -326,6 +326,15 @@ bool ASTJsonConverter::visit(ContractDefinition const& _node)
return false; return false;
} }
bool ASTJsonConverter::visit(IdentifierPath const& _node)
{
setJsonNode(_node, "IdentifierPath", {
make_pair("name", namePathToString(_node.path())),
make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration))
});
return false;
}
bool ASTJsonConverter::visit(InheritanceSpecifier const& _node) bool ASTJsonConverter::visit(InheritanceSpecifier const& _node)
{ {
setJsonNode(_node, "InheritanceSpecifier", { setJsonNode(_node, "InheritanceSpecifier", {
@ -519,7 +528,7 @@ bool ASTJsonConverter::visit(ElementaryTypeName const& _node)
bool ASTJsonConverter::visit(UserDefinedTypeName const& _node) bool ASTJsonConverter::visit(UserDefinedTypeName const& _node)
{ {
setJsonNode(_node, "UserDefinedTypeName", { setJsonNode(_node, "UserDefinedTypeName", {
make_pair("name", namePathToString(_node.namePath())), make_pair("pathNode", toJson(*_node.pathNode())),
make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)), make_pair("referencedDeclaration", idOrNull(_node.annotation().referencedDeclaration)),
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true)) make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true))
}); });

View File

@ -77,6 +77,7 @@ public:
bool visit(PragmaDirective const& _node) override; bool visit(PragmaDirective const& _node) override;
bool visit(ImportDirective const& _node) override; bool visit(ImportDirective const& _node) override;
bool visit(ContractDefinition const& _node) override; bool visit(ContractDefinition const& _node) override;
bool visit(IdentifierPath const& _node) override;
bool visit(InheritanceSpecifier const& _node) override; bool visit(InheritanceSpecifier const& _node) override;
bool visit(UsingForDirective const& _node) override; bool visit(UsingForDirective const& _node) override;
bool visit(StructDefinition const& _node) override; bool visit(StructDefinition const& _node) override;

View File

@ -115,6 +115,8 @@ ASTPointer<ASTNode> ASTJsonImporter::convertJsonToASTNode(Json::Value const& _js
return createImportDirective(_json); return createImportDirective(_json);
if (nodeType == "ContractDefinition") if (nodeType == "ContractDefinition")
return createContractDefinition(_json); return createContractDefinition(_json);
if (nodeType == "IdentifierPath")
return createIdentifier(_json);
if (nodeType == "InheritanceSpecifier") if (nodeType == "InheritanceSpecifier")
return createInheritanceSpecifier(_json); return createInheritanceSpecifier(_json);
if (nodeType == "UsingForDirective") if (nodeType == "UsingForDirective")
@ -299,6 +301,22 @@ ASTPointer<ContractDefinition> ASTJsonImporter::createContractDefinition(Json::V
); );
} }
ASTPointer<IdentifierPath> ASTJsonImporter::createIdentifierPath(Json::Value const& _node)
{
astAssert(_node["name"].isString(), "Expected 'name' to be a string!");
vector<ASTString> namePath;
vector<string> strs;
string nameString = member(_node, "name").asString();
boost::algorithm::split(strs, nameString, boost::is_any_of("."));
for (string s: strs)
namePath.emplace_back(s);
return createASTNode<IdentifierPath>(
_node,
namePath
);
}
ASTPointer<InheritanceSpecifier> ASTJsonImporter::createInheritanceSpecifier(Json::Value const& _node) ASTPointer<InheritanceSpecifier> ASTJsonImporter::createInheritanceSpecifier(Json::Value const& _node)
{ {
std::vector<ASTPointer<Expression>> arguments; std::vector<ASTPointer<Expression>> arguments;
@ -518,17 +536,9 @@ ASTPointer<ElementaryTypeName> ASTJsonImporter::createElementaryTypeName(Json::V
ASTPointer<UserDefinedTypeName> ASTJsonImporter::createUserDefinedTypeName(Json::Value const& _node) ASTPointer<UserDefinedTypeName> ASTJsonImporter::createUserDefinedTypeName(Json::Value const& _node)
{ {
astAssert(_node["name"].isString(), "Expected 'name' to be a string!");
vector<ASTString> namePath;
vector<string> strs;
string nameString = member(_node, "name").asString();
boost::algorithm::split(strs, nameString, boost::is_any_of("."));
for (string s: strs)
namePath.emplace_back(s);
return createASTNode<UserDefinedTypeName>( return createASTNode<UserDefinedTypeName>(
_node, _node,
namePath createIdentifierPath(member(_node, "pathNode"))
); );
} }

View File

@ -74,6 +74,7 @@ private:
ASTPointer<PragmaDirective> createPragmaDirective(Json::Value const& _node); ASTPointer<PragmaDirective> createPragmaDirective(Json::Value const& _node);
ASTPointer<ImportDirective> createImportDirective(Json::Value const& _node); ASTPointer<ImportDirective> createImportDirective(Json::Value const& _node);
ASTPointer<ContractDefinition> createContractDefinition(Json::Value const& _node); ASTPointer<ContractDefinition> createContractDefinition(Json::Value const& _node);
ASTPointer<IdentifierPath> createIdentifierPath(Json::Value const& _node);
ASTPointer<InheritanceSpecifier> createInheritanceSpecifier(Json::Value const& _node); ASTPointer<InheritanceSpecifier> createInheritanceSpecifier(Json::Value const& _node);
ASTPointer<UsingForDirective> createUsingForDirective(Json::Value const& _node); ASTPointer<UsingForDirective> createUsingForDirective(Json::Value const& _node);
ASTPointer<ASTNode> createStructDefinition(Json::Value const& _node); ASTPointer<ASTNode> createStructDefinition(Json::Value const& _node);

View File

@ -58,6 +58,7 @@ public:
virtual bool visit(PragmaDirective& _node) { return visitNode(_node); } virtual bool visit(PragmaDirective& _node) { return visitNode(_node); }
virtual bool visit(ImportDirective& _node) { return visitNode(_node); } virtual bool visit(ImportDirective& _node) { return visitNode(_node); }
virtual bool visit(ContractDefinition& _node) { return visitNode(_node); } virtual bool visit(ContractDefinition& _node) { return visitNode(_node); }
virtual bool visit(IdentifierPath& _node) { return visitNode(_node); }
virtual bool visit(InheritanceSpecifier& _node) { return visitNode(_node); } virtual bool visit(InheritanceSpecifier& _node) { return visitNode(_node); }
virtual bool visit(UsingForDirective& _node) { return visitNode(_node); } virtual bool visit(UsingForDirective& _node) { return visitNode(_node); }
virtual bool visit(StructDefinition& _node) { return visitNode(_node); } virtual bool visit(StructDefinition& _node) { return visitNode(_node); }
@ -110,6 +111,7 @@ public:
virtual void endVisit(PragmaDirective& _node) { endVisitNode(_node); } virtual void endVisit(PragmaDirective& _node) { endVisitNode(_node); }
virtual void endVisit(ImportDirective& _node) { endVisitNode(_node); } virtual void endVisit(ImportDirective& _node) { endVisitNode(_node); }
virtual void endVisit(ContractDefinition& _node) { endVisitNode(_node); } virtual void endVisit(ContractDefinition& _node) { endVisitNode(_node); }
virtual void endVisit(IdentifierPath& _node) { endVisitNode(_node); }
virtual void endVisit(InheritanceSpecifier& _node) { endVisitNode(_node); } virtual void endVisit(InheritanceSpecifier& _node) { endVisitNode(_node); }
virtual void endVisit(UsingForDirective& _node) { endVisitNode(_node); } virtual void endVisit(UsingForDirective& _node) { endVisitNode(_node); }
virtual void endVisit(StructDefinition& _node) { endVisitNode(_node); } virtual void endVisit(StructDefinition& _node) { endVisitNode(_node); }
@ -184,6 +186,7 @@ public:
virtual bool visit(PragmaDirective const& _node) { return visitNode(_node); } virtual bool visit(PragmaDirective const& _node) { return visitNode(_node); }
virtual bool visit(ImportDirective const& _node) { return visitNode(_node); } virtual bool visit(ImportDirective const& _node) { return visitNode(_node); }
virtual bool visit(ContractDefinition const& _node) { return visitNode(_node); } virtual bool visit(ContractDefinition const& _node) { return visitNode(_node); }
virtual bool visit(IdentifierPath const& _node) { return visitNode(_node); }
virtual bool visit(InheritanceSpecifier const& _node) { return visitNode(_node); } virtual bool visit(InheritanceSpecifier const& _node) { return visitNode(_node); }
virtual bool visit(StructDefinition const& _node) { return visitNode(_node); } virtual bool visit(StructDefinition const& _node) { return visitNode(_node); }
virtual bool visit(UsingForDirective const& _node) { return visitNode(_node); } virtual bool visit(UsingForDirective const& _node) { return visitNode(_node); }
@ -236,6 +239,7 @@ public:
virtual void endVisit(PragmaDirective const& _node) { endVisitNode(_node); } virtual void endVisit(PragmaDirective const& _node) { endVisitNode(_node); }
virtual void endVisit(ImportDirective const& _node) { endVisitNode(_node); } virtual void endVisit(ImportDirective const& _node) { endVisitNode(_node); }
virtual void endVisit(ContractDefinition const& _node) { endVisitNode(_node); } virtual void endVisit(ContractDefinition const& _node) { endVisitNode(_node); }
virtual void endVisit(IdentifierPath const& _node) { endVisitNode(_node); }
virtual void endVisit(InheritanceSpecifier const& _node) { endVisitNode(_node); } virtual void endVisit(InheritanceSpecifier const& _node) { endVisitNode(_node); }
virtual void endVisit(UsingForDirective const& _node) { endVisitNode(_node); } virtual void endVisit(UsingForDirective const& _node) { endVisitNode(_node); }
virtual void endVisit(StructDefinition const& _node) { endVisitNode(_node); } virtual void endVisit(StructDefinition const& _node) { endVisitNode(_node); }

View File

@ -104,6 +104,18 @@ void ContractDefinition::accept(ASTConstVisitor& _visitor) const
_visitor.endVisit(*this); _visitor.endVisit(*this);
} }
void IdentifierPath::accept(ASTVisitor& _visitor)
{
_visitor.visit(*this);
_visitor.endVisit(*this);
}
void IdentifierPath::accept(ASTConstVisitor& _visitor) const
{
_visitor.visit(*this);
_visitor.endVisit(*this);
}
void InheritanceSpecifier::accept(ASTVisitor& _visitor) void InheritanceSpecifier::accept(ASTVisitor& _visitor)
{ {
if (_visitor.visit(*this)) if (_visitor.visit(*this))
@ -368,13 +380,15 @@ void ElementaryTypeName::accept(ASTConstVisitor& _visitor) const
void UserDefinedTypeName::accept(ASTVisitor& _visitor) void UserDefinedTypeName::accept(ASTVisitor& _visitor)
{ {
_visitor.visit(*this); if (_visitor.visit(*this))
this->pathNode()->accept(_visitor);
_visitor.endVisit(*this); _visitor.endVisit(*this);
} }
void UserDefinedTypeName::accept(ASTConstVisitor& _visitor) const void UserDefinedTypeName::accept(ASTConstVisitor& _visitor) const
{ {
_visitor.visit(*this); if (_visitor.visit(*this))
this->pathNode()->accept(_visitor);
_visitor.endVisit(*this); _visitor.endVisit(*this);
} }

View File

@ -939,6 +939,14 @@ ASTPointer<Identifier> Parser::parseIdentifier()
} }
ASTPointer<UserDefinedTypeName> Parser::parseUserDefinedTypeName() ASTPointer<UserDefinedTypeName> Parser::parseUserDefinedTypeName()
{
ASTNodeFactory nodeFactory(*this);
ASTPointer<IdentifierPath> identifierPath = parseIdentifierPath();
nodeFactory.setEndPositionFromNode(identifierPath);
return nodeFactory.createNode<UserDefinedTypeName>(identifierPath);
}
ASTPointer<IdentifierPath> Parser::parseIdentifierPath()
{ {
RecursionGuard recursionGuard(*this); RecursionGuard recursionGuard(*this);
ASTNodeFactory nodeFactory(*this); ASTNodeFactory nodeFactory(*this);
@ -950,7 +958,7 @@ ASTPointer<UserDefinedTypeName> Parser::parseUserDefinedTypeName()
nodeFactory.markEndPosition(); nodeFactory.markEndPosition();
identifierPath.push_back(*expectIdentifierToken()); identifierPath.push_back(*expectIdentifierToken());
} }
return nodeFactory.createNode<UserDefinedTypeName>(identifierPath); return nodeFactory.createNode<IdentifierPath>(identifierPath);
} }
ASTPointer<TypeName> Parser::parseTypeNameSuffix(ASTPointer<TypeName> type, ASTNodeFactory& nodeFactory) ASTPointer<TypeName> Parser::parseTypeNameSuffix(ASTPointer<TypeName> type, ASTNodeFactory& nodeFactory)
@ -2101,7 +2109,7 @@ ASTPointer<TypeName> Parser::typeNameFromIndexAccessStructure(Parser::IndexAcces
vector<ASTString> path; vector<ASTString> path;
for (auto const& el: _iap.path) for (auto const& el: _iap.path)
path.push_back(dynamic_cast<Identifier const&>(*el).name()); path.push_back(dynamic_cast<Identifier const&>(*el).name());
type = nodeFactory.createNode<UserDefinedTypeName>(path); type = nodeFactory.createNode<UserDefinedTypeName>(nodeFactory.createNode<IdentifierPath>(path));
} }
for (auto const& lengthExpression: _iap.indices) for (auto const& lengthExpression: _iap.indices)
{ {

View File

@ -106,6 +106,7 @@ private:
ASTPointer<ModifierInvocation> parseModifierInvocation(); ASTPointer<ModifierInvocation> parseModifierInvocation();
ASTPointer<Identifier> parseIdentifier(); ASTPointer<Identifier> parseIdentifier();
ASTPointer<UserDefinedTypeName> parseUserDefinedTypeName(); ASTPointer<UserDefinedTypeName> parseUserDefinedTypeName();
ASTPointer<IdentifierPath> parseIdentifierPath();
ASTPointer<TypeName> parseTypeNameSuffix(ASTPointer<TypeName> type, ASTNodeFactory& nodeFactory); ASTPointer<TypeName> parseTypeNameSuffix(ASTPointer<TypeName> type, ASTNodeFactory& nodeFactory);
ASTPointer<TypeName> parseTypeName(); ASTPointer<TypeName> parseTypeName();
ASTPointer<FunctionTypeName> parseFunctionType(); ASTPointer<FunctionTypeName> parseFunctionType();

View File

@ -34,17 +34,17 @@ Optimized IR:
* !USE AT YOUR OWN RISK! * * !USE AT YOUR OWN RISK! *
*******************************************************/ *******************************************************/
object "D_9" { object "D_10" {
code { code {
{ {
mstore(64, memoryguard(0x80)) mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) } if callvalue() { revert(0, 0) }
let _1 := datasize("D_9_deployed") let _1 := datasize("D_10_deployed")
codecopy(0, dataoffset("D_9_deployed"), _1) codecopy(0, dataoffset("D_10_deployed"), _1)
return(0, _1) return(0, _1)
} }
} }
object "D_9_deployed" { object "D_10_deployed" {
code { code {
{ {
mstore(64, memoryguard(0x80)) mstore(64, memoryguard(0x80))

View File

@ -34,17 +34,17 @@ Optimized IR:
* !USE AT YOUR OWN RISK! * * !USE AT YOUR OWN RISK! *
*******************************************************/ *******************************************************/
object "D_13" { object "D_15" {
code { code {
{ {
mstore(64, memoryguard(0x80)) mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) } if callvalue() { revert(0, 0) }
let _1 := datasize("D_13_deployed") let _1 := datasize("D_15_deployed")
codecopy(0, dataoffset("D_13_deployed"), _1) codecopy(0, dataoffset("D_15_deployed"), _1)
return(0, _1) return(0, _1)
} }
} }
object "D_13_deployed" { object "D_15_deployed" {
code { code {
{ {
let _1 := memoryguard(0x80) let _1 := memoryguard(0x80)

View File

@ -4,4 +4,4 @@ pragma solidity >=0.0; contract Errort6 { using foo for ; /* missing type name
","message":"Expected type name","severity":"error","sourceLocation":{"end":94,"file":"A","start":93},"type":"ParserError"},{"component":"general","errorCode":"3796","formattedMessage":"A:2:84: Warning: Recovered in ContractDefinition at '}'. ","message":"Expected type name","severity":"error","sourceLocation":{"end":94,"file":"A","start":93},"type":"ParserError"},{"component":"general","errorCode":"3796","formattedMessage":"A:2:84: Warning: Recovered in ContractDefinition at '}'.
pragma solidity >=0.0; contract Errort6 { using foo for ; /* missing type name */ } pragma solidity >=0.0; contract Errort6 { using foo for ; /* missing type name */ }
^ ^
","message":"Recovered in ContractDefinition at '}'.","severity":"warning","sourceLocation":{"end":120,"file":"A","start":119},"type":"Warning"}],"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"Errort6":[3]},"id":4,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":3,"linearizedBaseContracts":[3],"name":"Errort6","nodeType":"ContractDefinition","nodes":[],"scope":4,"src":"59:35:0"}],"src":"36:84:0"},"id":0}}} ","message":"Recovered in ContractDefinition at '}'.","severity":"warning","sourceLocation":{"end":120,"file":"A","start":119},"type":"Warning"}],"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"Errort6":[4]},"id":5,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":4,"linearizedBaseContracts":[4],"name":"Errort6","nodeType":"ContractDefinition","nodes":[],"scope":5,"src":"59:35:0"}],"src":"36:84:0"},"id":0}}}

View File

@ -1,2 +1,2 @@
{"contracts":{"fileA":{"A":{"storageLayout":{"storage":[{"astId":14,"contract":"fileA:A","label":"x","offset":0,"slot":"0","type":"t_uint256"},{"astId":16,"contract":"fileA:A","label":"y","offset":0,"slot":"1","type":"t_uint256"},{"astId":18,"contract":"fileA:A","label":"s","offset":0,"slot":"2","type":"t_struct(S)12_storage"},{"astId":20,"contract":"fileA:A","label":"addr","offset":0,"slot":"6","type":"t_address"},{"astId":26,"contract":"fileA:A","label":"map","offset":0,"slot":"7","type":"t_mapping(t_uint256,t_mapping(t_address,t_bool))"},{"astId":29,"contract":"fileA:A","label":"array","offset":0,"slot":"8","type":"t_array(t_uint256)dyn_storage"},{"astId":31,"contract":"fileA:A","label":"s1","offset":0,"slot":"9","type":"t_string_storage"},{"astId":33,"contract":"fileA:A","label":"b1","offset":0,"slot":"10","type":"t_bytes_storage"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"},"t_array(t_uint256)2_storage":{"base":"t_uint256","encoding":"inplace","label":"uint256[2]","numberOfBytes":"64"},"t_array(t_uint256)dyn_storage":{"base":"t_uint256","encoding":"dynamic_array","label":"uint256[]","numberOfBytes":"32"},"t_bool":{"encoding":"inplace","label":"bool","numberOfBytes":"1"},"t_bytes_storage":{"encoding":"bytes","label":"bytes","numberOfBytes":"32"},"t_mapping(t_address,t_bool)":{"encoding":"mapping","key":"t_address","label":"mapping(address => bool)","numberOfBytes":"32","value":"t_bool"},"t_mapping(t_uint256,t_mapping(t_address,t_bool))":{"encoding":"mapping","key":"t_uint256","label":"mapping(uint256 => mapping(address => bool))","numberOfBytes":"32","value":"t_mapping(t_address,t_bool)"},"t_string_storage":{"encoding":"bytes","label":"string","numberOfBytes":"32"},"t_struct(S)12_storage":{"encoding":"inplace","label":"struct A.S","members":[{"astId":2,"contract":"fileA:A","label":"a","offset":0,"slot":"0","type":"t_uint128"},{"astId":4,"contract":"fileA:A","label":"b","offset":16,"slot":"0","type":"t_uint128"},{"astId":8,"contract":"fileA:A","label":"staticArray","offset":0,"slot":"1","type":"t_array(t_uint256)2_storage"},{"astId":11,"contract":"fileA:A","label":"dynArray","offset":0,"slot":"3","type":"t_array(t_uint256)dyn_storage"}],"numberOfBytes":"128"},"t_uint128":{"encoding":"inplace","label":"uint128","numberOfBytes":"16"},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":"32"}}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"fileA: Warning: Source file does not specify required compiler version! {"contracts":{"fileA":{"A":{"storageLayout":{"storage":[{"astId":14,"contract":"fileA:A","label":"x","offset":0,"slot":"0","type":"t_uint256"},{"astId":16,"contract":"fileA:A","label":"y","offset":0,"slot":"1","type":"t_uint256"},{"astId":19,"contract":"fileA:A","label":"s","offset":0,"slot":"2","type":"t_struct(S)12_storage"},{"astId":21,"contract":"fileA:A","label":"addr","offset":0,"slot":"6","type":"t_address"},{"astId":27,"contract":"fileA:A","label":"map","offset":0,"slot":"7","type":"t_mapping(t_uint256,t_mapping(t_address,t_bool))"},{"astId":30,"contract":"fileA:A","label":"array","offset":0,"slot":"8","type":"t_array(t_uint256)dyn_storage"},{"astId":32,"contract":"fileA:A","label":"s1","offset":0,"slot":"9","type":"t_string_storage"},{"astId":34,"contract":"fileA:A","label":"b1","offset":0,"slot":"10","type":"t_bytes_storage"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"},"t_array(t_uint256)2_storage":{"base":"t_uint256","encoding":"inplace","label":"uint256[2]","numberOfBytes":"64"},"t_array(t_uint256)dyn_storage":{"base":"t_uint256","encoding":"dynamic_array","label":"uint256[]","numberOfBytes":"32"},"t_bool":{"encoding":"inplace","label":"bool","numberOfBytes":"1"},"t_bytes_storage":{"encoding":"bytes","label":"bytes","numberOfBytes":"32"},"t_mapping(t_address,t_bool)":{"encoding":"mapping","key":"t_address","label":"mapping(address => bool)","numberOfBytes":"32","value":"t_bool"},"t_mapping(t_uint256,t_mapping(t_address,t_bool))":{"encoding":"mapping","key":"t_uint256","label":"mapping(uint256 => mapping(address => bool))","numberOfBytes":"32","value":"t_mapping(t_address,t_bool)"},"t_string_storage":{"encoding":"bytes","label":"string","numberOfBytes":"32"},"t_struct(S)12_storage":{"encoding":"inplace","label":"struct A.S","members":[{"astId":2,"contract":"fileA:A","label":"a","offset":0,"slot":"0","type":"t_uint128"},{"astId":4,"contract":"fileA:A","label":"b","offset":16,"slot":"0","type":"t_uint128"},{"astId":8,"contract":"fileA:A","label":"staticArray","offset":0,"slot":"1","type":"t_array(t_uint256)2_storage"},{"astId":11,"contract":"fileA:A","label":"dynArray","offset":0,"slot":"3","type":"t_array(t_uint256)dyn_storage"}],"numberOfBytes":"128"},"t_uint128":{"encoding":"inplace","label":"uint128","numberOfBytes":"16"},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":"32"}}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"fileA: Warning: Source file does not specify required compiler version!
","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"fileA","start":-1},"type":"Warning"}],"sources":{"fileA":{"id":0}}} ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"fileA","start":-1},"type":"Warning"}],"sources":{"fileA":{"id":0}}}

View File

@ -1,2 +1,2 @@
{"contracts":{"fileA":{"A":{"storageLayout":{"storage":[{"astId":14,"contract":"fileA:A","label":"x","offset":0,"slot":"0","type":"t_uint256"},{"astId":16,"contract":"fileA:A","label":"y","offset":0,"slot":"1","type":"t_uint256"},{"astId":18,"contract":"fileA:A","label":"s","offset":0,"slot":"2","type":"t_struct(S)12_storage"},{"astId":20,"contract":"fileA:A","label":"addr","offset":0,"slot":"7","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"},"t_array(t_uint256)2_storage":{"base":"t_uint256","encoding":"inplace","label":"uint256[2]","numberOfBytes":"64"},"t_array(t_uint256)dyn_storage":{"base":"t_uint256","encoding":"dynamic_array","label":"uint256[]","numberOfBytes":"32"},"t_struct(S)12_storage":{"encoding":"inplace","label":"struct A.S","members":[{"astId":2,"contract":"fileA:A","label":"a","offset":0,"slot":"0","type":"t_uint256"},{"astId":4,"contract":"fileA:A","label":"b","offset":0,"slot":"1","type":"t_uint256"},{"astId":8,"contract":"fileA:A","label":"staticArray","offset":0,"slot":"2","type":"t_array(t_uint256)2_storage"},{"astId":11,"contract":"fileA:A","label":"dynArray","offset":0,"slot":"4","type":"t_array(t_uint256)dyn_storage"}],"numberOfBytes":"160"},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":"32"}}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"fileA: Warning: Source file does not specify required compiler version! {"contracts":{"fileA":{"A":{"storageLayout":{"storage":[{"astId":14,"contract":"fileA:A","label":"x","offset":0,"slot":"0","type":"t_uint256"},{"astId":16,"contract":"fileA:A","label":"y","offset":0,"slot":"1","type":"t_uint256"},{"astId":19,"contract":"fileA:A","label":"s","offset":0,"slot":"2","type":"t_struct(S)12_storage"},{"astId":21,"contract":"fileA:A","label":"addr","offset":0,"slot":"7","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"},"t_array(t_uint256)2_storage":{"base":"t_uint256","encoding":"inplace","label":"uint256[2]","numberOfBytes":"64"},"t_array(t_uint256)dyn_storage":{"base":"t_uint256","encoding":"dynamic_array","label":"uint256[]","numberOfBytes":"32"},"t_struct(S)12_storage":{"encoding":"inplace","label":"struct A.S","members":[{"astId":2,"contract":"fileA:A","label":"a","offset":0,"slot":"0","type":"t_uint256"},{"astId":4,"contract":"fileA:A","label":"b","offset":0,"slot":"1","type":"t_uint256"},{"astId":8,"contract":"fileA:A","label":"staticArray","offset":0,"slot":"2","type":"t_array(t_uint256)2_storage"},{"astId":11,"contract":"fileA:A","label":"dynArray","offset":0,"slot":"4","type":"t_array(t_uint256)dyn_storage"}],"numberOfBytes":"160"},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":"32"}}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"fileA: Warning: Source file does not specify required compiler version!
","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"fileA","start":-1},"type":"Warning"}],"sources":{"fileA":{"id":0}}} ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"fileA","start":-1},"type":"Warning"}],"sources":{"fileA":{"id":0}}}

View File

@ -1,2 +1,2 @@
{"contracts":{"fileA":{"A":{"storageLayout":{"storage":[{"astId":14,"contract":"fileA:A","label":"x","offset":0,"slot":"0","type":"t_uint256"},{"astId":16,"contract":"fileA:A","label":"y","offset":0,"slot":"1","type":"t_uint256"},{"astId":18,"contract":"fileA:A","label":"s","offset":0,"slot":"2","type":"t_struct(S)12_storage"},{"astId":20,"contract":"fileA:A","label":"addr","offset":0,"slot":"6","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"},"t_array(t_uint256)2_storage":{"base":"t_uint256","encoding":"inplace","label":"uint256[2]","numberOfBytes":"64"},"t_array(t_uint256)dyn_storage":{"base":"t_uint256","encoding":"dynamic_array","label":"uint256[]","numberOfBytes":"32"},"t_struct(S)12_storage":{"encoding":"inplace","label":"struct A.S","members":[{"astId":2,"contract":"fileA:A","label":"a","offset":0,"slot":"0","type":"t_uint128"},{"astId":4,"contract":"fileA:A","label":"b","offset":16,"slot":"0","type":"t_uint128"},{"astId":8,"contract":"fileA:A","label":"staticArray","offset":0,"slot":"1","type":"t_array(t_uint256)2_storage"},{"astId":11,"contract":"fileA:A","label":"dynArray","offset":0,"slot":"3","type":"t_array(t_uint256)dyn_storage"}],"numberOfBytes":"128"},"t_uint128":{"encoding":"inplace","label":"uint128","numberOfBytes":"16"},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":"32"}}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"fileA: Warning: Source file does not specify required compiler version! {"contracts":{"fileA":{"A":{"storageLayout":{"storage":[{"astId":14,"contract":"fileA:A","label":"x","offset":0,"slot":"0","type":"t_uint256"},{"astId":16,"contract":"fileA:A","label":"y","offset":0,"slot":"1","type":"t_uint256"},{"astId":19,"contract":"fileA:A","label":"s","offset":0,"slot":"2","type":"t_struct(S)12_storage"},{"astId":21,"contract":"fileA:A","label":"addr","offset":0,"slot":"6","type":"t_address"}],"types":{"t_address":{"encoding":"inplace","label":"address","numberOfBytes":"20"},"t_array(t_uint256)2_storage":{"base":"t_uint256","encoding":"inplace","label":"uint256[2]","numberOfBytes":"64"},"t_array(t_uint256)dyn_storage":{"base":"t_uint256","encoding":"dynamic_array","label":"uint256[]","numberOfBytes":"32"},"t_struct(S)12_storage":{"encoding":"inplace","label":"struct A.S","members":[{"astId":2,"contract":"fileA:A","label":"a","offset":0,"slot":"0","type":"t_uint128"},{"astId":4,"contract":"fileA:A","label":"b","offset":16,"slot":"0","type":"t_uint128"},{"astId":8,"contract":"fileA:A","label":"staticArray","offset":0,"slot":"1","type":"t_array(t_uint256)2_storage"},{"astId":11,"contract":"fileA:A","label":"dynArray","offset":0,"slot":"3","type":"t_array(t_uint256)dyn_storage"}],"numberOfBytes":"128"},"t_uint128":{"encoding":"inplace","label":"uint128","numberOfBytes":"16"},"t_uint256":{"encoding":"inplace","label":"uint256","numberOfBytes":"32"}}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"fileA: Warning: Source file does not specify required compiler version!
","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"fileA","start":-1},"type":"Warning"}],"sources":{"fileA":{"id":0}}} ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"fileA","start":-1},"type":"Warning"}],"sources":{"fileA":{"id":0}}}

View File

@ -4,10 +4,10 @@
{ {
"C": "C":
[ [
11 12
] ]
}, },
"id": 12, "id": 13,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -17,10 +17,10 @@
"contractDependencies": [], "contractDependencies": [],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 11, "id": 12,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
11 12
], ],
"name": "C", "name": "C",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
@ -63,17 +63,17 @@
], ],
"name": "S", "name": "S",
"nodeType": "StructDefinition", "nodeType": "StructDefinition",
"scope": 11, "scope": 12,
"src": "17:20:1", "src": "17:20:1",
"visibility": "public" "visibility": "public"
}, },
{ {
"constant": false, "constant": false,
"id": 5, "id": 6,
"mutability": "mutable", "mutability": "mutable",
"name": "s", "name": "s",
"nodeType": "VariableDeclaration", "nodeType": "VariableDeclaration",
"scope": 11, "scope": 12,
"src": "42:3:1", "src": "42:3:1",
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
@ -84,9 +84,16 @@
}, },
"typeName": "typeName":
{ {
"id": 4, "id": 5,
"name": "S",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 4,
"name": "S",
"nodeType": "IdentifierPath",
"referencedDeclaration": 3,
"src": "42:1:1"
},
"referencedDeclaration": 3, "referencedDeclaration": 3,
"src": "42:1:1", "src": "42:1:1",
"typeDescriptions": "typeDescriptions":
@ -100,7 +107,7 @@
{ {
"body": "body":
{ {
"id": 9, "id": 10,
"nodeType": "Block", "nodeType": "Block",
"src": "76:70:1", "src": "76:70:1",
"statements": "statements":
@ -176,28 +183,28 @@
"externalReferences": "externalReferences":
[ [
{ {
"declaration": 5, "declaration": 6,
"isOffset": true, "isOffset": true,
"isSlot": false, "isSlot": false,
"src": "106:8:1", "src": "106:8:1",
"valueSize": 1 "valueSize": 1
}, },
{ {
"declaration": 5, "declaration": 6,
"isOffset": false, "isOffset": false,
"isSlot": true, "isSlot": true,
"src": "128:6:1", "src": "128:6:1",
"valueSize": 1 "valueSize": 1
} }
], ],
"id": 8, "id": 9,
"nodeType": "InlineAssembly", "nodeType": "InlineAssembly",
"src": "86:54:1" "src": "86:54:1"
} }
] ]
}, },
"functionSelector": "ffae15ba", "functionSelector": "ffae15ba",
"id": 10, "id": 11,
"implemented": true, "implemented": true,
"kind": "function", "kind": "function",
"modifiers": [], "modifiers": [],
@ -205,26 +212,26 @@
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"parameters": "parameters":
{ {
"id": 6, "id": 7,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "61:2:1" "src": "61:2:1"
}, },
"returnParameters": "returnParameters":
{ {
"id": 7, "id": 8,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "76:0:1" "src": "76:0:1"
}, },
"scope": 11, "scope": 12,
"src": "51:95:1", "src": "51:95:1",
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 12, "scope": 13,
"src": "0:148:1" "src": "0:148:1"
} }
], ],

View File

@ -6,7 +6,7 @@
{ {
"C": "C":
[ [
11 12
] ]
} }
}, },
@ -28,10 +28,10 @@
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
11 12
], ],
"name": "C", "name": "C",
"scope": 12 "scope": 13
}, },
"children": "children":
[ [
@ -40,7 +40,7 @@
{ {
"canonicalName": "C.S", "canonicalName": "C.S",
"name": "S", "name": "S",
"scope": 11, "scope": 12,
"visibility": "public" "visibility": "public"
}, },
"children": "children":
@ -85,7 +85,7 @@
"constant": false, "constant": false,
"mutability": "mutable", "mutability": "mutable",
"name": "s", "name": "s",
"scope": 11, "scope": 12,
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
"type": "struct C.S", "type": "struct C.S",
@ -96,16 +96,28 @@
{ {
"attributes": "attributes":
{ {
"name": "S",
"referencedDeclaration": 3, "referencedDeclaration": 3,
"type": "struct C.S" "type": "struct C.S"
}, },
"id": 4, "children":
[
{
"attributes":
{
"name": "S",
"referencedDeclaration": 3
},
"id": 4,
"name": "IdentifierPath",
"src": "42:1:1"
}
],
"id": 5,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "42:1:1" "src": "42:1:1"
} }
], ],
"id": 5, "id": 6,
"name": "VariableDeclaration", "name": "VariableDeclaration",
"src": "42:3:1" "src": "42:3:1"
}, },
@ -121,7 +133,7 @@
null null
], ],
"name": "e", "name": "e",
"scope": 11, "scope": 12,
"stateMutability": "pure", "stateMutability": "pure",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
@ -137,7 +149,7 @@
] ]
}, },
"children": [], "children": [],
"id": 6, "id": 7,
"name": "ParameterList", "name": "ParameterList",
"src": "61:2:1" "src": "61:2:1"
}, },
@ -150,7 +162,7 @@
] ]
}, },
"children": [], "children": [],
"id": 7, "id": 8,
"name": "ParameterList", "name": "ParameterList",
"src": "76:0:1" "src": "76:0:1"
}, },
@ -164,14 +176,14 @@
"externalReferences": "externalReferences":
[ [
{ {
"declaration": 5, "declaration": 6,
"isOffset": true, "isOffset": true,
"isSlot": false, "isSlot": false,
"src": "106:8:1", "src": "106:8:1",
"valueSize": 1 "valueSize": 1
}, },
{ {
"declaration": 5, "declaration": 6,
"isOffset": false, "isOffset": false,
"isSlot": true, "isSlot": true,
"src": "128:6:1", "src": "128:6:1",
@ -181,27 +193,27 @@
"operations": "{\n let x := s.offset\n let y := mul(s.slot, 2)\n}" "operations": "{\n let x := s.offset\n let y := mul(s.slot, 2)\n}"
}, },
"children": [], "children": [],
"id": 8, "id": 9,
"name": "InlineAssembly", "name": "InlineAssembly",
"src": "86:54:1" "src": "86:54:1"
} }
], ],
"id": 9, "id": 10,
"name": "Block", "name": "Block",
"src": "76:70:1" "src": "76:70:1"
} }
], ],
"id": 10, "id": 11,
"name": "FunctionDefinition", "name": "FunctionDefinition",
"src": "51:95:1" "src": "51:95:1"
} }
], ],
"id": 11, "id": 12,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "0:148:1" "src": "0:148:1"
} }
], ],
"id": 12, "id": 13,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:149:1" "src": "0:149:1"
} }

View File

@ -8,22 +8,22 @@
], ],
"B": "B":
[ [
4 5
], ],
"C": "C":
[ [
7 9
], ],
"D": "D":
[ [
10 13
], ],
"E": "E":
[ [
13 17
] ]
}, },
"id": 14, "id": 18,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -41,7 +41,7 @@
"name": "A", "name": "A",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 14, "scope": 18,
"src": "0:14:1" "src": "0:14:1"
}, },
{ {
@ -51,9 +51,16 @@
{ {
"baseName": "baseName":
{ {
"id": 2, "id": 3,
"name": "A",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 2,
"name": "A",
"nodeType": "IdentifierPath",
"referencedDeclaration": 1,
"src": "29:1:1"
},
"referencedDeclaration": 1, "referencedDeclaration": 1,
"src": "29:1:1", "src": "29:1:1",
"typeDescriptions": "typeDescriptions":
@ -62,7 +69,7 @@
"typeString": "contract A" "typeString": "contract A"
} }
}, },
"id": 3, "id": 4,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "29:1:1" "src": "29:1:1"
} }
@ -73,16 +80,16 @@
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 4, "id": 5,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
4, 5,
1 1
], ],
"name": "B", "name": "B",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 14, "scope": 18,
"src": "15:19:1" "src": "15:19:1"
}, },
{ {
@ -92,18 +99,25 @@
{ {
"baseName": "baseName":
{ {
"id": 5, "id": 7,
"name": "B",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4, "pathNode":
{
"id": 6,
"name": "B",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "49:1:1"
},
"referencedDeclaration": 5,
"src": "49:1:1", "src": "49:1:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_contract$_B_$4", "typeIdentifier": "t_contract$_B_$5",
"typeString": "contract B" "typeString": "contract B"
} }
}, },
"id": 6, "id": 8,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "49:1:1" "src": "49:1:1"
} }
@ -111,21 +125,21 @@
"contractDependencies": "contractDependencies":
[ [
1, 1,
4 5
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 7, "id": 9,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
7, 9,
4, 5,
1 1
], ],
"name": "C", "name": "C",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 14, "scope": 18,
"src": "35:19:1" "src": "35:19:1"
}, },
{ {
@ -135,18 +149,25 @@
{ {
"baseName": "baseName":
{ {
"id": 8, "id": 11,
"name": "C",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"referencedDeclaration": 7, "pathNode":
{
"id": 10,
"name": "C",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9,
"src": "69:1:1"
},
"referencedDeclaration": 9,
"src": "69:1:1", "src": "69:1:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_contract$_C_$7", "typeIdentifier": "t_contract$_C_$9",
"typeString": "contract C" "typeString": "contract C"
} }
}, },
"id": 9, "id": 12,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "69:1:1" "src": "69:1:1"
} }
@ -154,23 +175,23 @@
"contractDependencies": "contractDependencies":
[ [
1, 1,
4, 5,
7 9
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 10, "id": 13,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
10, 13,
7, 9,
4, 5,
1 1
], ],
"name": "D", "name": "D",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 14, "scope": 18,
"src": "55:19:1" "src": "55:19:1"
}, },
{ {
@ -180,18 +201,25 @@
{ {
"baseName": "baseName":
{ {
"id": 11, "id": 15,
"name": "D",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10, "pathNode":
{
"id": 14,
"name": "D",
"nodeType": "IdentifierPath",
"referencedDeclaration": 13,
"src": "89:1:1"
},
"referencedDeclaration": 13,
"src": "89:1:1", "src": "89:1:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_contract$_D_$10", "typeIdentifier": "t_contract$_D_$13",
"typeString": "contract D" "typeString": "contract D"
} }
}, },
"id": 12, "id": 16,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "89:1:1" "src": "89:1:1"
} }
@ -199,25 +227,25 @@
"contractDependencies": "contractDependencies":
[ [
1, 1,
4, 5,
7, 9,
10 13
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 13, "id": 17,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
17,
13, 13,
10, 9,
7, 5,
4,
1 1
], ],
"name": "E", "name": "E",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 14, "scope": 18,
"src": "75:19:1" "src": "75:19:1"
} }
], ],

View File

@ -10,19 +10,19 @@
], ],
"B": "B":
[ [
4 5
], ],
"C": "C":
[ [
7 9
], ],
"D": "D":
[ [
10 13
], ],
"E": "E":
[ [
13 17
] ]
} }
}, },
@ -51,7 +51,7 @@
[ [
null null
], ],
"scope": 14 "scope": 18
}, },
"id": 1, "id": 1,
"name": "ContractDefinition", "name": "ContractDefinition",
@ -69,7 +69,7 @@
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
4, 5,
1 1
], ],
"name": "B", "name": "B",
@ -77,7 +77,7 @@
[ [
null null
], ],
"scope": 14 "scope": 18
}, },
"children": "children":
[ [
@ -88,21 +88,33 @@
{ {
"attributes": "attributes":
{ {
"name": "A",
"referencedDeclaration": 1, "referencedDeclaration": 1,
"type": "contract A" "type": "contract A"
}, },
"id": 2, "children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 1
},
"id": 2,
"name": "IdentifierPath",
"src": "29:1:1"
}
],
"id": 3,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "29:1:1" "src": "29:1:1"
} }
], ],
"id": 3, "id": 4,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "29:1:1" "src": "29:1:1"
} }
], ],
"id": 4, "id": 5,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "15:19:1" "src": "15:19:1"
}, },
@ -113,14 +125,14 @@
"contractDependencies": "contractDependencies":
[ [
1, 1,
4 5
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
7, 9,
4, 5,
1 1
], ],
"name": "C", "name": "C",
@ -128,7 +140,7 @@
[ [
null null
], ],
"scope": 14 "scope": 18
}, },
"children": "children":
[ [
@ -139,21 +151,33 @@
{ {
"attributes": "attributes":
{ {
"name": "B", "referencedDeclaration": 5,
"referencedDeclaration": 4,
"type": "contract B" "type": "contract B"
}, },
"id": 5, "children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 5
},
"id": 6,
"name": "IdentifierPath",
"src": "49:1:1"
}
],
"id": 7,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "49:1:1" "src": "49:1:1"
} }
], ],
"id": 6, "id": 8,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "49:1:1" "src": "49:1:1"
} }
], ],
"id": 7, "id": 9,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "35:19:1" "src": "35:19:1"
}, },
@ -164,16 +188,16 @@
"contractDependencies": "contractDependencies":
[ [
1, 1,
4, 5,
7 9
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
10, 13,
7, 9,
4, 5,
1 1
], ],
"name": "D", "name": "D",
@ -181,7 +205,7 @@
[ [
null null
], ],
"scope": 14 "scope": 18
}, },
"children": "children":
[ [
@ -192,21 +216,33 @@
{ {
"attributes": "attributes":
{ {
"name": "C", "referencedDeclaration": 9,
"referencedDeclaration": 7,
"type": "contract C" "type": "contract C"
}, },
"id": 8, "children":
[
{
"attributes":
{
"name": "C",
"referencedDeclaration": 9
},
"id": 10,
"name": "IdentifierPath",
"src": "69:1:1"
}
],
"id": 11,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "69:1:1" "src": "69:1:1"
} }
], ],
"id": 9, "id": 12,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "69:1:1" "src": "69:1:1"
} }
], ],
"id": 10, "id": 13,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "55:19:1" "src": "55:19:1"
}, },
@ -217,18 +253,18 @@
"contractDependencies": "contractDependencies":
[ [
1, 1,
4, 5,
7, 9,
10 13
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
17,
13, 13,
10, 9,
7, 5,
4,
1 1
], ],
"name": "E", "name": "E",
@ -236,7 +272,7 @@
[ [
null null
], ],
"scope": 14 "scope": 18
}, },
"children": "children":
[ [
@ -247,26 +283,38 @@
{ {
"attributes": "attributes":
{ {
"name": "D", "referencedDeclaration": 13,
"referencedDeclaration": 10,
"type": "contract D" "type": "contract D"
}, },
"id": 11, "children":
[
{
"attributes":
{
"name": "D",
"referencedDeclaration": 13
},
"id": 14,
"name": "IdentifierPath",
"src": "89:1:1"
}
],
"id": 15,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "89:1:1" "src": "89:1:1"
} }
], ],
"id": 12, "id": 16,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "89:1:1" "src": "89:1:1"
} }
], ],
"id": 13, "id": 17,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "75:19:1" "src": "75:19:1"
} }
], ],
"id": 14, "id": 18,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:95:1" "src": "0:95:1"
} }

View File

@ -8,10 +8,10 @@
], ],
"C2": "C2":
[ [
4 5
] ]
}, },
"id": 5, "id": 6,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -29,7 +29,7 @@
"name": "C1", "name": "C1",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 5, "scope": 6,
"src": "0:14:1" "src": "0:14:1"
}, },
{ {
@ -39,9 +39,16 @@
{ {
"baseName": "baseName":
{ {
"id": 2, "id": 3,
"name": "C1",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 2,
"name": "C1",
"nodeType": "IdentifierPath",
"referencedDeclaration": 1,
"src": "30:2:1"
},
"referencedDeclaration": 1, "referencedDeclaration": 1,
"src": "30:2:1", "src": "30:2:1",
"typeDescriptions": "typeDescriptions":
@ -50,7 +57,7 @@
"typeString": "contract C1" "typeString": "contract C1"
} }
}, },
"id": 3, "id": 4,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "30:2:1" "src": "30:2:1"
} }
@ -61,16 +68,16 @@
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 4, "id": 5,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
4, 5,
1 1
], ],
"name": "C2", "name": "C2",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 5, "scope": 6,
"src": "15:20:1" "src": "15:20:1"
} }
], ],

View File

@ -10,7 +10,7 @@
], ],
"C2": "C2":
[ [
4 5
] ]
} }
}, },
@ -39,7 +39,7 @@
[ [
null null
], ],
"scope": 5 "scope": 6
}, },
"id": 1, "id": 1,
"name": "ContractDefinition", "name": "ContractDefinition",
@ -57,7 +57,7 @@
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
4, 5,
1 1
], ],
"name": "C2", "name": "C2",
@ -65,7 +65,7 @@
[ [
null null
], ],
"scope": 5 "scope": 6
}, },
"children": "children":
[ [
@ -76,26 +76,38 @@
{ {
"attributes": "attributes":
{ {
"name": "C1",
"referencedDeclaration": 1, "referencedDeclaration": 1,
"type": "contract C1" "type": "contract C1"
}, },
"id": 2, "children":
[
{
"attributes":
{
"name": "C1",
"referencedDeclaration": 1
},
"id": 2,
"name": "IdentifierPath",
"src": "30:2:1"
}
],
"id": 3,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "30:2:1" "src": "30:2:1"
} }
], ],
"id": 3, "id": 4,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "30:2:1" "src": "30:2:1"
} }
], ],
"id": 4, "id": 5,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "15:20:1" "src": "15:20:1"
} }
], ],
"id": 5, "id": 6,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:36:1" "src": "0:36:1"
} }

View File

@ -4,10 +4,10 @@
{ {
"C": "C":
[ [
17 19
] ]
}, },
"id": 18, "id": 20,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -17,10 +17,10 @@
"contractDependencies": [], "contractDependencies": [],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 17, "id": 19,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
17 19
], ],
"name": "C", "name": "C",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
@ -56,32 +56,39 @@
}, },
{ {
"constant": false, "constant": false,
"id": 8, "id": 9,
"mutability": "mutable", "mutability": "mutable",
"name": "a", "name": "a",
"nodeType": "VariableDeclaration", "nodeType": "VariableDeclaration",
"scope": 17, "scope": 19,
"src": "40:20:1", "src": "40:20:1",
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_mapping$_t_contract$_C_$17_$_t_bool_$", "typeIdentifier": "t_mapping$_t_contract$_C_$19_$_t_bool_$",
"typeString": "mapping(contract C => bool)" "typeString": "mapping(contract C => bool)"
}, },
"typeName": "typeName":
{ {
"id": 7, "id": 8,
"keyType": "keyType":
{ {
"id": 5, "id": 6,
"name": "C",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"referencedDeclaration": 17, "pathNode":
{
"id": 5,
"name": "C",
"nodeType": "IdentifierPath",
"referencedDeclaration": 19,
"src": "48:1:1"
},
"referencedDeclaration": 19,
"src": "48:1:1", "src": "48:1:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_contract$_C_$17", "typeIdentifier": "t_contract$_C_$19",
"typeString": "contract C" "typeString": "contract C"
} }
}, },
@ -89,12 +96,12 @@
"src": "40:18:1", "src": "40:18:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_mapping$_t_contract$_C_$17_$_t_bool_$", "typeIdentifier": "t_mapping$_t_contract$_C_$19_$_t_bool_$",
"typeString": "mapping(contract C => bool)" "typeString": "mapping(contract C => bool)"
}, },
"valueType": "valueType":
{ {
"id": 6, "id": 7,
"name": "bool", "name": "bool",
"nodeType": "ElementaryTypeName", "nodeType": "ElementaryTypeName",
"src": "53:4:1", "src": "53:4:1",
@ -109,11 +116,11 @@
}, },
{ {
"constant": false, "constant": false,
"id": 12, "id": 13,
"mutability": "mutable", "mutability": "mutable",
"name": "b", "name": "b",
"nodeType": "VariableDeclaration", "nodeType": "VariableDeclaration",
"scope": 17, "scope": 19,
"src": "66:26:1", "src": "66:26:1",
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
@ -124,10 +131,10 @@
}, },
"typeName": "typeName":
{ {
"id": 11, "id": 12,
"keyType": "keyType":
{ {
"id": 9, "id": 10,
"name": "address", "name": "address",
"nodeType": "ElementaryTypeName", "nodeType": "ElementaryTypeName",
"src": "74:7:1", "src": "74:7:1",
@ -146,7 +153,7 @@
}, },
"valueType": "valueType":
{ {
"id": 10, "id": 11,
"name": "bool", "name": "bool",
"nodeType": "ElementaryTypeName", "nodeType": "ElementaryTypeName",
"src": "85:4:1", "src": "85:4:1",
@ -161,11 +168,11 @@
}, },
{ {
"constant": false, "constant": false,
"id": 16, "id": 18,
"mutability": "mutable", "mutability": "mutable",
"name": "c", "name": "c",
"nodeType": "VariableDeclaration", "nodeType": "VariableDeclaration",
"scope": 17, "scope": 19,
"src": "98:20:1", "src": "98:20:1",
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
@ -176,12 +183,19 @@
}, },
"typeName": "typeName":
{ {
"id": 15, "id": 17,
"keyType": "keyType":
{ {
"id": 13, "id": 15,
"name": "E",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 14,
"name": "E",
"nodeType": "IdentifierPath",
"referencedDeclaration": 4,
"src": "106:1:1"
},
"referencedDeclaration": 4, "referencedDeclaration": 4,
"src": "106:1:1", "src": "106:1:1",
"typeDescriptions": "typeDescriptions":
@ -199,7 +213,7 @@
}, },
"valueType": "valueType":
{ {
"id": 14, "id": 16,
"name": "bool", "name": "bool",
"nodeType": "ElementaryTypeName", "nodeType": "ElementaryTypeName",
"src": "111:4:1", "src": "111:4:1",
@ -213,7 +227,7 @@
"visibility": "internal" "visibility": "internal"
} }
], ],
"scope": 18, "scope": 20,
"src": "0:121:1" "src": "0:121:1"
} }
], ],

View File

@ -6,7 +6,7 @@
{ {
"C": "C":
[ [
17 19
] ]
} }
}, },
@ -28,10 +28,10 @@
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
17 19
], ],
"name": "C", "name": "C",
"scope": 18 "scope": 20
}, },
"children": "children":
[ [
@ -81,7 +81,7 @@
"constant": false, "constant": false,
"mutability": "mutable", "mutability": "mutable",
"name": "a", "name": "a",
"scope": 17, "scope": 19,
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
"type": "mapping(contract C => bool)", "type": "mapping(contract C => bool)",
@ -99,11 +99,23 @@
{ {
"attributes": "attributes":
{ {
"name": "C", "referencedDeclaration": 19,
"referencedDeclaration": 17,
"type": "contract C" "type": "contract C"
}, },
"id": 5, "children":
[
{
"attributes":
{
"name": "C",
"referencedDeclaration": 19
},
"id": 5,
"name": "IdentifierPath",
"src": "48:1:1"
}
],
"id": 6,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "48:1:1" "src": "48:1:1"
}, },
@ -113,17 +125,17 @@
"name": "bool", "name": "bool",
"type": "bool" "type": "bool"
}, },
"id": 6, "id": 7,
"name": "ElementaryTypeName", "name": "ElementaryTypeName",
"src": "53:4:1" "src": "53:4:1"
} }
], ],
"id": 7, "id": 8,
"name": "Mapping", "name": "Mapping",
"src": "40:18:1" "src": "40:18:1"
} }
], ],
"id": 8, "id": 9,
"name": "VariableDeclaration", "name": "VariableDeclaration",
"src": "40:20:1" "src": "40:20:1"
}, },
@ -133,7 +145,7 @@
"constant": false, "constant": false,
"mutability": "mutable", "mutability": "mutable",
"name": "b", "name": "b",
"scope": 17, "scope": 19,
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
"type": "mapping(address => bool)", "type": "mapping(address => bool)",
@ -154,7 +166,7 @@
"name": "address", "name": "address",
"type": "address" "type": "address"
}, },
"id": 9, "id": 10,
"name": "ElementaryTypeName", "name": "ElementaryTypeName",
"src": "74:7:1" "src": "74:7:1"
}, },
@ -164,17 +176,17 @@
"name": "bool", "name": "bool",
"type": "bool" "type": "bool"
}, },
"id": 10, "id": 11,
"name": "ElementaryTypeName", "name": "ElementaryTypeName",
"src": "85:4:1" "src": "85:4:1"
} }
], ],
"id": 11, "id": 12,
"name": "Mapping", "name": "Mapping",
"src": "66:24:1" "src": "66:24:1"
} }
], ],
"id": 12, "id": 13,
"name": "VariableDeclaration", "name": "VariableDeclaration",
"src": "66:26:1" "src": "66:26:1"
}, },
@ -184,7 +196,7 @@
"constant": false, "constant": false,
"mutability": "mutable", "mutability": "mutable",
"name": "c", "name": "c",
"scope": 17, "scope": 19,
"stateVariable": true, "stateVariable": true,
"storageLocation": "default", "storageLocation": "default",
"type": "mapping(enum C.E => bool)", "type": "mapping(enum C.E => bool)",
@ -202,11 +214,23 @@
{ {
"attributes": "attributes":
{ {
"name": "E",
"referencedDeclaration": 4, "referencedDeclaration": 4,
"type": "enum C.E" "type": "enum C.E"
}, },
"id": 13, "children":
[
{
"attributes":
{
"name": "E",
"referencedDeclaration": 4
},
"id": 14,
"name": "IdentifierPath",
"src": "106:1:1"
}
],
"id": 15,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "106:1:1" "src": "106:1:1"
}, },
@ -216,27 +240,27 @@
"name": "bool", "name": "bool",
"type": "bool" "type": "bool"
}, },
"id": 14, "id": 16,
"name": "ElementaryTypeName", "name": "ElementaryTypeName",
"src": "111:4:1" "src": "111:4:1"
} }
], ],
"id": 15, "id": 17,
"name": "Mapping", "name": "Mapping",
"src": "98:18:1" "src": "98:18:1"
} }
], ],
"id": 16, "id": 18,
"name": "VariableDeclaration", "name": "VariableDeclaration",
"src": "98:20:1" "src": "98:20:1"
} }
], ],
"id": 17, "id": 19,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "0:121:1" "src": "0:121:1"
} }
], ],
"id": 18, "id": 20,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:122:1" "src": "0:122:1"
} }

View File

@ -8,14 +8,14 @@
], ],
"B": "B":
[ [
16 17
], ],
"C": "C":
[ [
31 35
] ]
}, },
"id": 32, "id": 36,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -70,7 +70,7 @@
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 32, "scope": 36,
"src": "0:40:1" "src": "0:40:1"
}, },
{ {
@ -80,9 +80,16 @@
{ {
"baseName": "baseName":
{ {
"id": 6, "id": 7,
"name": "A",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 6,
"name": "A",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "55:1:1"
},
"referencedDeclaration": 5, "referencedDeclaration": 5,
"src": "55:1:1", "src": "55:1:1",
"typeDescriptions": "typeDescriptions":
@ -91,7 +98,7 @@
"typeString": "contract A" "typeString": "contract A"
} }
}, },
"id": 7, "id": 8,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "55:1:1" "src": "55:1:1"
} }
@ -102,10 +109,10 @@
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": false, "fullyImplemented": false,
"id": 16, "id": 17,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
16, 17,
5 5
], ],
"name": "B", "name": "B",
@ -114,7 +121,7 @@
[ [
{ {
"functionSelector": "c2985578", "functionSelector": "c2985578",
"id": 10, "id": 11,
"implemented": false, "implemented": false,
"kind": "function", "kind": "function",
"modifiers": [], "modifiers": [],
@ -122,19 +129,19 @@
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"parameters": "parameters":
{ {
"id": 8, "id": 9,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "72:2:1" "src": "72:2:1"
}, },
"returnParameters": "returnParameters":
{ {
"id": 9, "id": 10,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "81:0:1" "src": "81:0:1"
}, },
"scope": 16, "scope": 17,
"src": "60:22:1", "src": "60:22:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
@ -147,13 +154,13 @@
], ],
"body": "body":
{ {
"id": 14, "id": 15,
"nodeType": "Block", "nodeType": "Block",
"src": "115:2:1", "src": "115:2:1",
"statements": [] "statements": []
}, },
"functionSelector": "a399b6a2", "functionSelector": "a399b6a2",
"id": 15, "id": 16,
"implemented": true, "implemented": true,
"kind": "function", "kind": "function",
"modifiers": [], "modifiers": [],
@ -161,33 +168,33 @@
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": "overrides":
{ {
"id": 12, "id": 13,
"nodeType": "OverrideSpecifier", "nodeType": "OverrideSpecifier",
"overrides": [], "overrides": [],
"src": "106:8:1" "src": "106:8:1"
}, },
"parameters": "parameters":
{ {
"id": 11, "id": 12,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "96:2:1" "src": "96:2:1"
}, },
"returnParameters": "returnParameters":
{ {
"id": 13, "id": 14,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "115:0:1" "src": "115:0:1"
}, },
"scope": 16, "scope": 17,
"src": "84:33:1", "src": "84:33:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 32, "scope": 36,
"src": "41:78:1" "src": "41:78:1"
}, },
{ {
@ -197,18 +204,25 @@
{ {
"baseName": "baseName":
{ {
"id": 17, "id": 19,
"name": "B",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"referencedDeclaration": 16, "pathNode":
{
"id": 18,
"name": "B",
"nodeType": "IdentifierPath",
"referencedDeclaration": 17,
"src": "134:1:1"
},
"referencedDeclaration": 17,
"src": "134:1:1", "src": "134:1:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_contract$_B_$16", "typeIdentifier": "t_contract$_B_$17",
"typeString": "contract B" "typeString": "contract B"
} }
}, },
"id": 18, "id": 20,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "134:1:1" "src": "134:1:1"
} }
@ -216,15 +230,15 @@
"contractDependencies": "contractDependencies":
[ [
5, 5,
16 17
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 31, "id": 35,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
31, 35,
16, 17,
5 5
], ],
"name": "C", "name": "C",
@ -234,17 +248,17 @@
{ {
"baseFunctions": "baseFunctions":
[ [
10 11
], ],
"body": "body":
{ {
"id": 22, "id": 24,
"nodeType": "Block", "nodeType": "Block",
"src": "170:3:1", "src": "170:3:1",
"statements": [] "statements": []
}, },
"functionSelector": "c2985578", "functionSelector": "c2985578",
"id": 23, "id": 25,
"implemented": true, "implemented": true,
"kind": "function", "kind": "function",
"modifiers": [], "modifiers": [],
@ -252,26 +266,26 @@
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": "overrides":
{ {
"id": 20, "id": 22,
"nodeType": "OverrideSpecifier", "nodeType": "OverrideSpecifier",
"overrides": [], "overrides": [],
"src": "161:8:1" "src": "161:8:1"
}, },
"parameters": "parameters":
{ {
"id": 19, "id": 21,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "151:2:1" "src": "151:2:1"
}, },
"returnParameters": "returnParameters":
{ {
"id": 21, "id": 23,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "170:0:1" "src": "170:0:1"
}, },
"scope": 31, "scope": 35,
"src": "139:34:1", "src": "139:34:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
@ -280,17 +294,17 @@
{ {
"baseFunctions": "baseFunctions":
[ [
15 16
], ],
"body": "body":
{ {
"id": 29, "id": 33,
"nodeType": "Block", "nodeType": "Block",
"src": "212:2:1", "src": "212:2:1",
"statements": [] "statements": []
}, },
"functionSelector": "a399b6a2", "functionSelector": "a399b6a2",
"id": 30, "id": 34,
"implemented": true, "implemented": true,
"kind": "function", "kind": "function",
"modifiers": [], "modifiers": [],
@ -298,14 +312,21 @@
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": "overrides":
{ {
"id": 27, "id": 31,
"nodeType": "OverrideSpecifier", "nodeType": "OverrideSpecifier",
"overrides": "overrides":
[ [
{ {
"id": 25, "id": 28,
"name": "A",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 27,
"name": "A",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "206:1:1"
},
"referencedDeclaration": 5, "referencedDeclaration": 5,
"src": "206:1:1", "src": "206:1:1",
"typeDescriptions": "typeDescriptions":
@ -315,14 +336,21 @@
} }
}, },
{ {
"id": 26, "id": 30,
"name": "B",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"referencedDeclaration": 16, "pathNode":
{
"id": 29,
"name": "B",
"nodeType": "IdentifierPath",
"referencedDeclaration": 17,
"src": "209:1:1"
},
"referencedDeclaration": 17,
"src": "209:1:1", "src": "209:1:1",
"typeDescriptions": "typeDescriptions":
{ {
"typeIdentifier": "t_contract$_B_$16", "typeIdentifier": "t_contract$_B_$17",
"typeString": "contract B" "typeString": "contract B"
} }
} }
@ -331,26 +359,26 @@
}, },
"parameters": "parameters":
{ {
"id": 24, "id": 26,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "187:2:1" "src": "187:2:1"
}, },
"returnParameters": "returnParameters":
{ {
"id": 28, "id": 32,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "212:0:1" "src": "212:0:1"
}, },
"scope": 31, "scope": 35,
"src": "175:39:1", "src": "175:39:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 32, "scope": 36,
"src": "120:96:1" "src": "120:96:1"
} }
], ],

View File

@ -10,11 +10,11 @@
], ],
"B": "B":
[ [
16 17
], ],
"C": "C":
[ [
31 35
] ]
} }
}, },
@ -39,7 +39,7 @@
5 5
], ],
"name": "A", "name": "A",
"scope": 32 "scope": 36
}, },
"children": "children":
[ [
@ -123,11 +123,11 @@
"fullyImplemented": false, "fullyImplemented": false,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
16, 17,
5 5
], ],
"name": "B", "name": "B",
"scope": 32 "scope": 36
}, },
"children": "children":
[ [
@ -138,16 +138,28 @@
{ {
"attributes": "attributes":
{ {
"name": "A",
"referencedDeclaration": 5, "referencedDeclaration": 5,
"type": "contract A" "type": "contract A"
}, },
"id": 6, "children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 6,
"name": "IdentifierPath",
"src": "55:1:1"
}
],
"id": 7,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "55:1:1" "src": "55:1:1"
} }
], ],
"id": 7, "id": 8,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "55:1:1" "src": "55:1:1"
}, },
@ -163,7 +175,7 @@
null null
], ],
"name": "foo", "name": "foo",
"scope": 16, "scope": 17,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
@ -179,7 +191,7 @@
] ]
}, },
"children": [], "children": [],
"id": 8, "id": 9,
"name": "ParameterList", "name": "ParameterList",
"src": "72:2:1" "src": "72:2:1"
}, },
@ -192,12 +204,12 @@
] ]
}, },
"children": [], "children": [],
"id": 9, "id": 10,
"name": "ParameterList", "name": "ParameterList",
"src": "81:0:1" "src": "81:0:1"
} }
], ],
"id": 10, "id": 11,
"name": "FunctionDefinition", "name": "FunctionDefinition",
"src": "60:22:1" "src": "60:22:1"
}, },
@ -217,7 +229,7 @@
null null
], ],
"name": "faa", "name": "faa",
"scope": 16, "scope": 17,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
@ -232,7 +244,7 @@
null null
] ]
}, },
"id": 12, "id": 13,
"name": "OverrideSpecifier", "name": "OverrideSpecifier",
"src": "106:8:1" "src": "106:8:1"
}, },
@ -245,7 +257,7 @@
] ]
}, },
"children": [], "children": [],
"id": 11, "id": 12,
"name": "ParameterList", "name": "ParameterList",
"src": "96:2:1" "src": "96:2:1"
}, },
@ -258,7 +270,7 @@
] ]
}, },
"children": [], "children": [],
"id": 13, "id": 14,
"name": "ParameterList", "name": "ParameterList",
"src": "115:0:1" "src": "115:0:1"
}, },
@ -271,17 +283,17 @@
] ]
}, },
"children": [], "children": [],
"id": 14, "id": 15,
"name": "Block", "name": "Block",
"src": "115:2:1" "src": "115:2:1"
} }
], ],
"id": 15, "id": 16,
"name": "FunctionDefinition", "name": "FunctionDefinition",
"src": "84:33:1" "src": "84:33:1"
} }
], ],
"id": 16, "id": 17,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "41:78:1" "src": "41:78:1"
}, },
@ -292,18 +304,18 @@
"contractDependencies": "contractDependencies":
[ [
5, 5,
16 17
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
31, 35,
16, 17,
5 5
], ],
"name": "C", "name": "C",
"scope": 32 "scope": 36
}, },
"children": "children":
[ [
@ -314,16 +326,28 @@
{ {
"attributes": "attributes":
{ {
"name": "B", "referencedDeclaration": 17,
"referencedDeclaration": 16,
"type": "contract B" "type": "contract B"
}, },
"id": 17, "children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 17
},
"id": 18,
"name": "IdentifierPath",
"src": "134:1:1"
}
],
"id": 19,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "134:1:1" "src": "134:1:1"
} }
], ],
"id": 18, "id": 20,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "134:1:1" "src": "134:1:1"
}, },
@ -332,7 +356,7 @@
{ {
"baseFunctions": "baseFunctions":
[ [
10 11
], ],
"functionSelector": "c2985578", "functionSelector": "c2985578",
"implemented": true, "implemented": true,
@ -343,7 +367,7 @@
null null
], ],
"name": "foo", "name": "foo",
"scope": 31, "scope": 35,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
@ -358,7 +382,7 @@
null null
] ]
}, },
"id": 20, "id": 22,
"name": "OverrideSpecifier", "name": "OverrideSpecifier",
"src": "161:8:1" "src": "161:8:1"
}, },
@ -371,7 +395,7 @@
] ]
}, },
"children": [], "children": [],
"id": 19, "id": 21,
"name": "ParameterList", "name": "ParameterList",
"src": "151:2:1" "src": "151:2:1"
}, },
@ -384,7 +408,7 @@
] ]
}, },
"children": [], "children": [],
"id": 21, "id": 23,
"name": "ParameterList", "name": "ParameterList",
"src": "170:0:1" "src": "170:0:1"
}, },
@ -397,12 +421,12 @@
] ]
}, },
"children": [], "children": [],
"id": 22, "id": 24,
"name": "Block", "name": "Block",
"src": "170:3:1" "src": "170:3:1"
} }
], ],
"id": 23, "id": 25,
"name": "FunctionDefinition", "name": "FunctionDefinition",
"src": "139:34:1" "src": "139:34:1"
}, },
@ -411,7 +435,7 @@
{ {
"baseFunctions": "baseFunctions":
[ [
15 16
], ],
"functionSelector": "a399b6a2", "functionSelector": "a399b6a2",
"implemented": true, "implemented": true,
@ -422,7 +446,7 @@
null null
], ],
"name": "faa", "name": "faa",
"scope": 31, "scope": 35,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
@ -435,27 +459,51 @@
{ {
"attributes": "attributes":
{ {
"name": "A",
"referencedDeclaration": 5, "referencedDeclaration": 5,
"type": "contract A" "type": "contract A"
}, },
"id": 25, "children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 27,
"name": "IdentifierPath",
"src": "206:1:1"
}
],
"id": 28,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "206:1:1" "src": "206:1:1"
}, },
{ {
"attributes": "attributes":
{ {
"name": "B", "referencedDeclaration": 17,
"referencedDeclaration": 16,
"type": "contract B" "type": "contract B"
}, },
"id": 26, "children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 17
},
"id": 29,
"name": "IdentifierPath",
"src": "209:1:1"
}
],
"id": 30,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "209:1:1" "src": "209:1:1"
} }
], ],
"id": 27, "id": 31,
"name": "OverrideSpecifier", "name": "OverrideSpecifier",
"src": "197:14:1" "src": "197:14:1"
}, },
@ -468,7 +516,7 @@
] ]
}, },
"children": [], "children": [],
"id": 24, "id": 26,
"name": "ParameterList", "name": "ParameterList",
"src": "187:2:1" "src": "187:2:1"
}, },
@ -481,7 +529,7 @@
] ]
}, },
"children": [], "children": [],
"id": 28, "id": 32,
"name": "ParameterList", "name": "ParameterList",
"src": "212:0:1" "src": "212:0:1"
}, },
@ -494,22 +542,22 @@
] ]
}, },
"children": [], "children": [],
"id": 29, "id": 33,
"name": "Block", "name": "Block",
"src": "212:2:1" "src": "212:2:1"
} }
], ],
"id": 30, "id": 34,
"name": "FunctionDefinition", "name": "FunctionDefinition",
"src": "175:39:1" "src": "175:39:1"
} }
], ],
"id": 31, "id": 35,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "120:96:1" "src": "120:96:1"
} }
], ],
"id": 32, "id": 36,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:217:1" "src": "0:217:1"
} }

View File

@ -12,10 +12,10 @@
], ],
"C": "C":
[ [
22 26
] ]
}, },
"id": 23, "id": 27,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -70,7 +70,7 @@
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 23, "scope": 27,
"src": "0:49:1" "src": "0:49:1"
}, },
{ {
@ -124,7 +124,7 @@
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 23, "scope": 27,
"src": "50:49:1" "src": "50:49:1"
}, },
{ {
@ -134,9 +134,16 @@
{ {
"baseName": "baseName":
{ {
"id": 11, "id": 12,
"name": "A",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 11,
"name": "A",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "114:1:1"
},
"referencedDeclaration": 5, "referencedDeclaration": 5,
"src": "114:1:1", "src": "114:1:1",
"typeDescriptions": "typeDescriptions":
@ -145,16 +152,23 @@
"typeString": "contract A" "typeString": "contract A"
} }
}, },
"id": 12, "id": 13,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "114:1:1" "src": "114:1:1"
}, },
{ {
"baseName": "baseName":
{ {
"id": 13, "id": 15,
"name": "B",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 14,
"name": "B",
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "117:1:1"
},
"referencedDeclaration": 10, "referencedDeclaration": 10,
"src": "117:1:1", "src": "117:1:1",
"typeDescriptions": "typeDescriptions":
@ -163,7 +177,7 @@
"typeString": "contract B" "typeString": "contract B"
} }
}, },
"id": 14, "id": 16,
"nodeType": "InheritanceSpecifier", "nodeType": "InheritanceSpecifier",
"src": "117:1:1" "src": "117:1:1"
} }
@ -175,10 +189,10 @@
], ],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 22, "id": 26,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
22, 26,
10, 10,
5 5
], ],
@ -194,13 +208,13 @@
], ],
"body": "body":
{ {
"id": 20, "id": 24,
"nodeType": "Block", "nodeType": "Block",
"src": "160:2:1", "src": "160:2:1",
"statements": [] "statements": []
}, },
"functionSelector": "26121ff0", "functionSelector": "26121ff0",
"id": 21, "id": 25,
"implemented": true, "implemented": true,
"kind": "function", "kind": "function",
"modifiers": [], "modifiers": [],
@ -208,14 +222,21 @@
"nodeType": "FunctionDefinition", "nodeType": "FunctionDefinition",
"overrides": "overrides":
{ {
"id": 18, "id": 22,
"nodeType": "OverrideSpecifier", "nodeType": "OverrideSpecifier",
"overrides": "overrides":
[ [
{ {
"id": 16, "id": 19,
"name": "A",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 18,
"name": "A",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "154:1:1"
},
"referencedDeclaration": 5, "referencedDeclaration": 5,
"src": "154:1:1", "src": "154:1:1",
"typeDescriptions": "typeDescriptions":
@ -225,9 +246,16 @@
} }
}, },
{ {
"id": 17, "id": 21,
"name": "B",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 20,
"name": "B",
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "157:1:1"
},
"referencedDeclaration": 10, "referencedDeclaration": 10,
"src": "157:1:1", "src": "157:1:1",
"typeDescriptions": "typeDescriptions":
@ -241,26 +269,26 @@
}, },
"parameters": "parameters":
{ {
"id": 15, "id": 17,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "135:2:1" "src": "135:2:1"
}, },
"returnParameters": "returnParameters":
{ {
"id": 19, "id": 23,
"nodeType": "ParameterList", "nodeType": "ParameterList",
"parameters": [], "parameters": [],
"src": "160:0:1" "src": "160:0:1"
}, },
"scope": 22, "scope": 26,
"src": "125:37:1", "src": "125:37:1",
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
} }
], ],
"scope": 23, "scope": 27,
"src": "100:64:1" "src": "100:64:1"
} }
], ],

View File

@ -14,7 +14,7 @@
], ],
"C": "C":
[ [
22 26
] ]
} }
}, },
@ -39,7 +39,7 @@
5 5
], ],
"name": "A", "name": "A",
"scope": 23 "scope": 27
}, },
"children": "children":
[ [
@ -130,7 +130,7 @@
10 10
], ],
"name": "B", "name": "B",
"scope": 23 "scope": 27
}, },
"children": "children":
[ [
@ -215,12 +215,12 @@
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
22, 26,
10, 10,
5 5
], ],
"name": "C", "name": "C",
"scope": 23 "scope": 27
}, },
"children": "children":
[ [
@ -231,16 +231,28 @@
{ {
"attributes": "attributes":
{ {
"name": "A",
"referencedDeclaration": 5, "referencedDeclaration": 5,
"type": "contract A" "type": "contract A"
}, },
"id": 11, "children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 11,
"name": "IdentifierPath",
"src": "114:1:1"
}
],
"id": 12,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "114:1:1" "src": "114:1:1"
} }
], ],
"id": 12, "id": 13,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "114:1:1" "src": "114:1:1"
}, },
@ -251,16 +263,28 @@
{ {
"attributes": "attributes":
{ {
"name": "B",
"referencedDeclaration": 10, "referencedDeclaration": 10,
"type": "contract B" "type": "contract B"
}, },
"id": 13, "children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 10
},
"id": 14,
"name": "IdentifierPath",
"src": "117:1:1"
}
],
"id": 15,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "117:1:1" "src": "117:1:1"
} }
], ],
"id": 14, "id": 16,
"name": "InheritanceSpecifier", "name": "InheritanceSpecifier",
"src": "117:1:1" "src": "117:1:1"
}, },
@ -281,7 +305,7 @@
null null
], ],
"name": "f", "name": "f",
"scope": 22, "scope": 26,
"stateMutability": "nonpayable", "stateMutability": "nonpayable",
"virtual": false, "virtual": false,
"visibility": "public" "visibility": "public"
@ -294,27 +318,51 @@
{ {
"attributes": "attributes":
{ {
"name": "A",
"referencedDeclaration": 5, "referencedDeclaration": 5,
"type": "contract A" "type": "contract A"
}, },
"id": 16, "children":
[
{
"attributes":
{
"name": "A",
"referencedDeclaration": 5
},
"id": 18,
"name": "IdentifierPath",
"src": "154:1:1"
}
],
"id": 19,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "154:1:1" "src": "154:1:1"
}, },
{ {
"attributes": "attributes":
{ {
"name": "B",
"referencedDeclaration": 10, "referencedDeclaration": 10,
"type": "contract B" "type": "contract B"
}, },
"id": 17, "children":
[
{
"attributes":
{
"name": "B",
"referencedDeclaration": 10
},
"id": 20,
"name": "IdentifierPath",
"src": "157:1:1"
}
],
"id": 21,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "157:1:1" "src": "157:1:1"
} }
], ],
"id": 18, "id": 22,
"name": "OverrideSpecifier", "name": "OverrideSpecifier",
"src": "145:14:1" "src": "145:14:1"
}, },
@ -327,7 +375,7 @@
] ]
}, },
"children": [], "children": [],
"id": 15, "id": 17,
"name": "ParameterList", "name": "ParameterList",
"src": "135:2:1" "src": "135:2:1"
}, },
@ -340,7 +388,7 @@
] ]
}, },
"children": [], "children": [],
"id": 19, "id": 23,
"name": "ParameterList", "name": "ParameterList",
"src": "160:0:1" "src": "160:0:1"
}, },
@ -353,22 +401,22 @@
] ]
}, },
"children": [], "children": [],
"id": 20, "id": 24,
"name": "Block", "name": "Block",
"src": "160:2:1" "src": "160:2:1"
} }
], ],
"id": 21, "id": 25,
"name": "FunctionDefinition", "name": "FunctionDefinition",
"src": "125:37:1" "src": "125:37:1"
} }
], ],
"id": 22, "id": 26,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "100:64:1" "src": "100:64:1"
} }
], ],
"id": 23, "id": 27,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:165:1" "src": "0:165:1"
} }

View File

@ -4,14 +4,14 @@
{ {
"C": "C":
[ [
5 6
], ],
"L": "L":
[ [
1 1
] ]
}, },
"id": 6, "id": 7,
"nodeType": "SourceUnit", "nodeType": "SourceUnit",
"nodes": "nodes":
[ [
@ -29,7 +29,7 @@
"name": "L", "name": "L",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": [], "nodes": [],
"scope": 6, "scope": 7,
"src": "0:12:1" "src": "0:12:1"
}, },
{ {
@ -38,22 +38,29 @@
"contractDependencies": [], "contractDependencies": [],
"contractKind": "contract", "contractKind": "contract",
"fullyImplemented": true, "fullyImplemented": true,
"id": 5, "id": 6,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
5 6
], ],
"name": "C", "name": "C",
"nodeType": "ContractDefinition", "nodeType": "ContractDefinition",
"nodes": "nodes":
[ [
{ {
"id": 4, "id": 5,
"libraryName": "libraryName":
{ {
"id": 2, "id": 3,
"name": "L",
"nodeType": "UserDefinedTypeName", "nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 2,
"name": "L",
"nodeType": "IdentifierPath",
"referencedDeclaration": 1,
"src": "32:1:1"
},
"referencedDeclaration": 1, "referencedDeclaration": 1,
"src": "32:1:1", "src": "32:1:1",
"typeDescriptions": "typeDescriptions":
@ -66,7 +73,7 @@
"src": "26:17:1", "src": "26:17:1",
"typeName": "typeName":
{ {
"id": 3, "id": 4,
"name": "uint", "name": "uint",
"nodeType": "ElementaryTypeName", "nodeType": "ElementaryTypeName",
"src": "38:4:1", "src": "38:4:1",
@ -78,7 +85,7 @@
} }
} }
], ],
"scope": 6, "scope": 7,
"src": "13:32:1" "src": "13:32:1"
} }
], ],

View File

@ -6,7 +6,7 @@
{ {
"C": "C":
[ [
5 6
], ],
"L": "L":
[ [
@ -39,7 +39,7 @@
[ [
null null
], ],
"scope": 6 "scope": 7
}, },
"id": 1, "id": 1,
"name": "ContractDefinition", "name": "ContractDefinition",
@ -61,10 +61,10 @@
"fullyImplemented": true, "fullyImplemented": true,
"linearizedBaseContracts": "linearizedBaseContracts":
[ [
5 6
], ],
"name": "C", "name": "C",
"scope": 6 "scope": 7
}, },
"children": "children":
[ [
@ -74,11 +74,23 @@
{ {
"attributes": "attributes":
{ {
"name": "L",
"referencedDeclaration": 1, "referencedDeclaration": 1,
"type": "library L" "type": "library L"
}, },
"id": 2, "children":
[
{
"attributes":
{
"name": "L",
"referencedDeclaration": 1
},
"id": 2,
"name": "IdentifierPath",
"src": "32:1:1"
}
],
"id": 3,
"name": "UserDefinedTypeName", "name": "UserDefinedTypeName",
"src": "32:1:1" "src": "32:1:1"
}, },
@ -88,22 +100,22 @@
"name": "uint", "name": "uint",
"type": "uint256" "type": "uint256"
}, },
"id": 3, "id": 4,
"name": "ElementaryTypeName", "name": "ElementaryTypeName",
"src": "38:4:1" "src": "38:4:1"
} }
], ],
"id": 4, "id": 5,
"name": "UsingForDirective", "name": "UsingForDirective",
"src": "26:17:1" "src": "26:17:1"
} }
], ],
"id": 5, "id": 6,
"name": "ContractDefinition", "name": "ContractDefinition",
"src": "13:32:1" "src": "13:32:1"
} }
], ],
"id": 6, "id": 7,
"name": "SourceUnit", "name": "SourceUnit",
"src": "0:46:1" "src": "0:46:1"
} }