mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Parse override keyword
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
"id" : 4,
|
||||
"name" : "m",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 37,
|
||||
"src" : "17:44:1",
|
||||
"stateVariable" : true,
|
||||
@@ -99,6 +100,7 @@
|
||||
"id" : 12,
|
||||
"name" : "a",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 35,
|
||||
"src" : "144:17:1",
|
||||
"stateVariable" : false,
|
||||
@@ -239,6 +241,7 @@
|
||||
"id" : 22,
|
||||
"name" : "c",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 35,
|
||||
"src" : "197:9:1",
|
||||
"stateVariable" : false,
|
||||
@@ -467,6 +470,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 7,
|
||||
@@ -478,6 +482,7 @@
|
||||
"id" : 6,
|
||||
"name" : "arg",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 36,
|
||||
"src" : "78:19:1",
|
||||
"stateVariable" : false,
|
||||
@@ -517,6 +522,7 @@
|
||||
"id" : 9,
|
||||
"name" : "r",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 36,
|
||||
"src" : "115:17:1",
|
||||
"stateVariable" : false,
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "m",
|
||||
"overrides" : null,
|
||||
"scope" : 37,
|
||||
"stateVariable" : true,
|
||||
"storageLocation" : "default",
|
||||
@@ -99,6 +100,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 37,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -114,6 +116,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "arg",
|
||||
"overrides" : null,
|
||||
"scope" : 36,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -152,6 +155,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "r",
|
||||
"overrides" : null,
|
||||
"scope" : 36,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -200,6 +204,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "a",
|
||||
"overrides" : null,
|
||||
"scope" : 35,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -352,6 +357,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "c",
|
||||
"overrides" : null,
|
||||
"scope" : 35,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
"id" : 3,
|
||||
"name" : "i",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 4,
|
||||
"src" : "13:8:1",
|
||||
"stateVariable" : true,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract C { uint[] i; }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "i",
|
||||
"overrides" : null,
|
||||
"scope" : 4,
|
||||
"stateVariable" : true,
|
||||
"storageLocation" : "default",
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -2,3 +2,5 @@ contract C {
|
||||
constructor() public {
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "",
|
||||
"overrides" : null,
|
||||
"scope" : 5,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "fn",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 11,
|
||||
|
||||
@@ -15,3 +15,5 @@ contract C {
|
||||
/** Some comment on mod.*/ modifier mod() { _; }
|
||||
/** Some comment on fn.*/ function fn() public {}
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "fn",
|
||||
"overrides" : null,
|
||||
"scope" : 15,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -2,3 +2,5 @@ contract C {
|
||||
function() external payable {
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "",
|
||||
"overrides" : null,
|
||||
"scope" : 5,
|
||||
"stateMutability" : "payable",
|
||||
"superFunction" : null,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
contract C {
|
||||
function() external {}
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "",
|
||||
"overrides" : null,
|
||||
"scope" : 5,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 7,
|
||||
@@ -52,6 +53,7 @@
|
||||
"id" : 6,
|
||||
"name" : "x",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 16,
|
||||
"src" : "24:44:1",
|
||||
"stateVariable" : false,
|
||||
@@ -83,6 +85,7 @@
|
||||
"id" : 3,
|
||||
"name" : "",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 5,
|
||||
"src" : "61:4:1",
|
||||
"stateVariable" : false,
|
||||
@@ -136,6 +139,7 @@
|
||||
"id" : 13,
|
||||
"name" : "",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 16,
|
||||
"src" : "79:40:1",
|
||||
"stateVariable" : false,
|
||||
@@ -167,6 +171,7 @@
|
||||
"id" : 10,
|
||||
"name" : "",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 12,
|
||||
"src" : "113:4:1",
|
||||
"stateVariable" : false,
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 17,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -62,6 +63,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "x",
|
||||
"overrides" : null,
|
||||
"scope" : 16,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -101,6 +103,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "",
|
||||
"overrides" : null,
|
||||
"scope" : 5,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -153,6 +156,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "",
|
||||
"overrides" : null,
|
||||
"scope" : 16,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -192,6 +196,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "",
|
||||
"overrides" : null,
|
||||
"scope" : 12,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"id" : 4,
|
||||
"name" : "a",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 9,
|
||||
"src" : "35:6:1",
|
||||
"stateVariable" : false,
|
||||
@@ -146,6 +147,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract c { function f() public { uint a = 2 + 3; } }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 11,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -98,6 +99,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "a",
|
||||
"overrides" : null,
|
||||
"scope" : 9,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
"id" : 3,
|
||||
"name" : "a",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 14,
|
||||
"src" : "13:8:1",
|
||||
"stateVariable" : true,
|
||||
@@ -87,6 +88,7 @@
|
||||
"id" : 9,
|
||||
"name" : "b",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 12,
|
||||
"src" : "45:16:1",
|
||||
"stateVariable" : false,
|
||||
@@ -152,6 +154,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 4,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract c { uint[] a; function f() public { uint[] storage b = a; } }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "a",
|
||||
"overrides" : null,
|
||||
"scope" : 14,
|
||||
"stateVariable" : true,
|
||||
"storageLocation" : "default",
|
||||
@@ -89,6 +90,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 14,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -140,6 +142,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "b",
|
||||
"overrides" : null,
|
||||
"scope" : 12,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "storage",
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
"id" : 2,
|
||||
"name" : "i",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 6,
|
||||
"src" : "24:6:1",
|
||||
"stateVariable" : false,
|
||||
@@ -145,6 +146,7 @@
|
||||
],
|
||||
"name" : "F",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 7,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract C { modifier M(uint i) { _; } function F() M(1) public {} }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "i",
|
||||
"overrides" : null,
|
||||
"scope" : 6,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -107,6 +108,7 @@
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"name" : "F",
|
||||
"overrides" : null,
|
||||
"scope" : 14,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
"id" : 2,
|
||||
"name" : "i",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 6,
|
||||
"src" : "24:6:1",
|
||||
"stateVariable" : false,
|
||||
@@ -145,6 +146,7 @@
|
||||
],
|
||||
"name" : "F",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 7,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract C { modifier M(uint i) { _; } function F() M(1) public {} }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "i",
|
||||
"overrides" : null,
|
||||
"scope" : 6,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
@@ -107,6 +108,7 @@
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"name" : "F",
|
||||
"overrides" : null,
|
||||
"scope" : 14,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"id" : 3,
|
||||
"name" : "x",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 6,
|
||||
"src" : "35:5:1",
|
||||
"stateVariable" : false,
|
||||
@@ -93,6 +94,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract C { function f() public { var x = hex"ff"; } }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 8,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -98,6 +99,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "x",
|
||||
"overrides" : null,
|
||||
"scope" : 6,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
|
||||
@@ -0,0 +1,337 @@
|
||||
{
|
||||
"absolutePath" : "a",
|
||||
"exportedSymbols" :
|
||||
{
|
||||
"A" :
|
||||
[
|
||||
5
|
||||
],
|
||||
"B" :
|
||||
[
|
||||
16
|
||||
],
|
||||
"C" :
|
||||
[
|
||||
31
|
||||
]
|
||||
},
|
||||
"id" : 32,
|
||||
"nodeType" : "SourceUnit",
|
||||
"nodes" :
|
||||
[
|
||||
{
|
||||
"baseContracts" : [],
|
||||
"contractDependencies" : [],
|
||||
"contractKind" : "contract",
|
||||
"documentation" : null,
|
||||
"fullyImplemented" : true,
|
||||
"id" : 5,
|
||||
"linearizedBaseContracts" :
|
||||
[
|
||||
5
|
||||
],
|
||||
"name" : "A",
|
||||
"nodeType" : "ContractDefinition",
|
||||
"nodes" :
|
||||
[
|
||||
{
|
||||
"body" :
|
||||
{
|
||||
"id" : 3,
|
||||
"nodeType" : "Block",
|
||||
"src" : "36:2:1",
|
||||
"statements" : []
|
||||
},
|
||||
"documentation" : null,
|
||||
"id" : 4,
|
||||
"implemented" : true,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "faa",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "26:2:1"
|
||||
},
|
||||
"returnParameters" :
|
||||
{
|
||||
"id" : 2,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "36:0:1"
|
||||
},
|
||||
"scope" : 5,
|
||||
"src" : "14:24:1",
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
"visibility" : "public"
|
||||
}
|
||||
],
|
||||
"scope" : 32,
|
||||
"src" : "0:40:1"
|
||||
},
|
||||
{
|
||||
"baseContracts" :
|
||||
[
|
||||
{
|
||||
"arguments" : null,
|
||||
"baseName" :
|
||||
{
|
||||
"contractScope" : null,
|
||||
"id" : 6,
|
||||
"name" : "A",
|
||||
"nodeType" : "UserDefinedTypeName",
|
||||
"referencedDeclaration" : 5,
|
||||
"src" : "55:1:1",
|
||||
"typeDescriptions" :
|
||||
{
|
||||
"typeIdentifier" : "t_contract$_A_$5",
|
||||
"typeString" : "contract A"
|
||||
}
|
||||
},
|
||||
"id" : 7,
|
||||
"nodeType" : "InheritanceSpecifier",
|
||||
"src" : "55:1:1"
|
||||
}
|
||||
],
|
||||
"contractDependencies" :
|
||||
[
|
||||
5
|
||||
],
|
||||
"contractKind" : "contract",
|
||||
"documentation" : null,
|
||||
"fullyImplemented" : false,
|
||||
"id" : 16,
|
||||
"linearizedBaseContracts" :
|
||||
[
|
||||
16,
|
||||
5
|
||||
],
|
||||
"name" : "B",
|
||||
"nodeType" : "ContractDefinition",
|
||||
"nodes" :
|
||||
[
|
||||
{
|
||||
"body" : null,
|
||||
"documentation" : null,
|
||||
"id" : 10,
|
||||
"implemented" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "foo",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 8,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "72:2:1"
|
||||
},
|
||||
"returnParameters" :
|
||||
{
|
||||
"id" : 9,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "81:0:1"
|
||||
},
|
||||
"scope" : 16,
|
||||
"src" : "60:22:1",
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
"visibility" : "public"
|
||||
},
|
||||
{
|
||||
"body" :
|
||||
{
|
||||
"id" : 14,
|
||||
"nodeType" : "Block",
|
||||
"src" : "115:2:1",
|
||||
"statements" : []
|
||||
},
|
||||
"documentation" : null,
|
||||
"id" : 15,
|
||||
"implemented" : true,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "faa",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : [],
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 11,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "96:2:1"
|
||||
},
|
||||
"returnParameters" :
|
||||
{
|
||||
"id" : 13,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "115:0:1"
|
||||
},
|
||||
"scope" : 16,
|
||||
"src" : "84:33:1",
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : 4,
|
||||
"visibility" : "public"
|
||||
}
|
||||
],
|
||||
"scope" : 32,
|
||||
"src" : "41:78:1"
|
||||
},
|
||||
{
|
||||
"baseContracts" :
|
||||
[
|
||||
{
|
||||
"arguments" : null,
|
||||
"baseName" :
|
||||
{
|
||||
"contractScope" : null,
|
||||
"id" : 17,
|
||||
"name" : "B",
|
||||
"nodeType" : "UserDefinedTypeName",
|
||||
"referencedDeclaration" : 16,
|
||||
"src" : "134:1:1",
|
||||
"typeDescriptions" :
|
||||
{
|
||||
"typeIdentifier" : "t_contract$_B_$16",
|
||||
"typeString" : "contract B"
|
||||
}
|
||||
},
|
||||
"id" : 18,
|
||||
"nodeType" : "InheritanceSpecifier",
|
||||
"src" : "134:1:1"
|
||||
}
|
||||
],
|
||||
"contractDependencies" :
|
||||
[
|
||||
5,
|
||||
16
|
||||
],
|
||||
"contractKind" : "contract",
|
||||
"documentation" : null,
|
||||
"fullyImplemented" : true,
|
||||
"id" : 31,
|
||||
"linearizedBaseContracts" :
|
||||
[
|
||||
31,
|
||||
16,
|
||||
5
|
||||
],
|
||||
"name" : "C",
|
||||
"nodeType" : "ContractDefinition",
|
||||
"nodes" :
|
||||
[
|
||||
{
|
||||
"body" :
|
||||
{
|
||||
"id" : 22,
|
||||
"nodeType" : "Block",
|
||||
"src" : "170:3:1",
|
||||
"statements" : []
|
||||
},
|
||||
"documentation" : null,
|
||||
"id" : 23,
|
||||
"implemented" : true,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "foo",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : [],
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 19,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "151:2:1"
|
||||
},
|
||||
"returnParameters" :
|
||||
{
|
||||
"id" : 21,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "170:0:1"
|
||||
},
|
||||
"scope" : 31,
|
||||
"src" : "139:34:1",
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : 10,
|
||||
"visibility" : "public"
|
||||
},
|
||||
{
|
||||
"body" :
|
||||
{
|
||||
"id" : 29,
|
||||
"nodeType" : "Block",
|
||||
"src" : "212:2:1",
|
||||
"statements" : []
|
||||
},
|
||||
"documentation" : null,
|
||||
"id" : 30,
|
||||
"implemented" : true,
|
||||
"kind" : "function",
|
||||
"modifiers" : [],
|
||||
"name" : "faa",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" :
|
||||
[
|
||||
{
|
||||
"contractScope" : null,
|
||||
"id" : 25,
|
||||
"name" : "A",
|
||||
"nodeType" : "UserDefinedTypeName",
|
||||
"referencedDeclaration" : 5,
|
||||
"src" : "206:1:1",
|
||||
"typeDescriptions" :
|
||||
{
|
||||
"typeIdentifier" : "t_contract$_A_$5",
|
||||
"typeString" : "contract A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"contractScope" : null,
|
||||
"id" : 26,
|
||||
"name" : "B",
|
||||
"nodeType" : "UserDefinedTypeName",
|
||||
"referencedDeclaration" : 16,
|
||||
"src" : "209:1:1",
|
||||
"typeDescriptions" :
|
||||
{
|
||||
"typeIdentifier" : "t_contract$_B_$16",
|
||||
"typeString" : "contract B"
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 24,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "187:2:1"
|
||||
},
|
||||
"returnParameters" :
|
||||
{
|
||||
"id" : 28,
|
||||
"nodeType" : "ParameterList",
|
||||
"parameters" : [],
|
||||
"src" : "212:0:1"
|
||||
},
|
||||
"scope" : 31,
|
||||
"src" : "175:39:1",
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : 15,
|
||||
"visibility" : "public"
|
||||
}
|
||||
],
|
||||
"scope" : 32,
|
||||
"src" : "120:96:1"
|
||||
}
|
||||
],
|
||||
"src" : "0:217:1"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
contract A {
|
||||
function faa() public {}
|
||||
}
|
||||
contract B is A {
|
||||
function foo() public;
|
||||
function faa() public override {}
|
||||
}
|
||||
contract C is B {
|
||||
function foo() public override { }
|
||||
function faa() public override(A, B) {}
|
||||
}
|
||||
|
||||
// ----
|
||||
@@ -0,0 +1,492 @@
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"absolutePath" : "a",
|
||||
"exportedSymbols" :
|
||||
{
|
||||
"A" :
|
||||
[
|
||||
5
|
||||
],
|
||||
"B" :
|
||||
[
|
||||
16
|
||||
],
|
||||
"C" :
|
||||
[
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"baseContracts" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"contractDependencies" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"contractKind" : "contract",
|
||||
"documentation" : null,
|
||||
"fullyImplemented" : true,
|
||||
"linearizedBaseContracts" :
|
||||
[
|
||||
5
|
||||
],
|
||||
"name" : "A",
|
||||
"scope" : 32
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"name" : "faa",
|
||||
"overrides" : null,
|
||||
"scope" : 5,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
"visibility" : "public"
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 1,
|
||||
"name" : "ParameterList",
|
||||
"src" : "26:2:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 2,
|
||||
"name" : "ParameterList",
|
||||
"src" : "36:0:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"statements" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 3,
|
||||
"name" : "Block",
|
||||
"src" : "36:2:1"
|
||||
}
|
||||
],
|
||||
"id" : 4,
|
||||
"name" : "FunctionDefinition",
|
||||
"src" : "14:24:1"
|
||||
}
|
||||
],
|
||||
"id" : 5,
|
||||
"name" : "ContractDefinition",
|
||||
"src" : "0:40:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"contractDependencies" :
|
||||
[
|
||||
5
|
||||
],
|
||||
"contractKind" : "contract",
|
||||
"documentation" : null,
|
||||
"fullyImplemented" : false,
|
||||
"linearizedBaseContracts" :
|
||||
[
|
||||
16,
|
||||
5
|
||||
],
|
||||
"name" : "B",
|
||||
"scope" : 32
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"arguments" : null
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"contractScope" : null,
|
||||
"name" : "A",
|
||||
"referencedDeclaration" : 5,
|
||||
"type" : "contract A"
|
||||
},
|
||||
"id" : 6,
|
||||
"name" : "UserDefinedTypeName",
|
||||
"src" : "55:1:1"
|
||||
}
|
||||
],
|
||||
"id" : 7,
|
||||
"name" : "InheritanceSpecifier",
|
||||
"src" : "55:1:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"body" : null,
|
||||
"documentation" : null,
|
||||
"implemented" : false,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"name" : "foo",
|
||||
"overrides" : null,
|
||||
"scope" : 16,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
"visibility" : "public"
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 8,
|
||||
"name" : "ParameterList",
|
||||
"src" : "72:2:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 9,
|
||||
"name" : "ParameterList",
|
||||
"src" : "81:0:1"
|
||||
}
|
||||
],
|
||||
"id" : 10,
|
||||
"name" : "FunctionDefinition",
|
||||
"src" : "60:22:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"name" : "faa",
|
||||
"overrides" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"scope" : 16,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : 4,
|
||||
"visibility" : "public"
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 11,
|
||||
"name" : "ParameterList",
|
||||
"src" : "96:2:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 13,
|
||||
"name" : "ParameterList",
|
||||
"src" : "115:0:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"statements" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 14,
|
||||
"name" : "Block",
|
||||
"src" : "115:2:1"
|
||||
}
|
||||
],
|
||||
"id" : 15,
|
||||
"name" : "FunctionDefinition",
|
||||
"src" : "84:33:1"
|
||||
}
|
||||
],
|
||||
"id" : 16,
|
||||
"name" : "ContractDefinition",
|
||||
"src" : "41:78:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"contractDependencies" :
|
||||
[
|
||||
5,
|
||||
16
|
||||
],
|
||||
"contractKind" : "contract",
|
||||
"documentation" : null,
|
||||
"fullyImplemented" : true,
|
||||
"linearizedBaseContracts" :
|
||||
[
|
||||
31,
|
||||
16,
|
||||
5
|
||||
],
|
||||
"name" : "C",
|
||||
"scope" : 32
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"arguments" : null
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"contractScope" : null,
|
||||
"name" : "B",
|
||||
"referencedDeclaration" : 16,
|
||||
"type" : "contract B"
|
||||
},
|
||||
"id" : 17,
|
||||
"name" : "UserDefinedTypeName",
|
||||
"src" : "134:1:1"
|
||||
}
|
||||
],
|
||||
"id" : 18,
|
||||
"name" : "InheritanceSpecifier",
|
||||
"src" : "134:1:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"name" : "foo",
|
||||
"overrides" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"scope" : 31,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : 10,
|
||||
"visibility" : "public"
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 19,
|
||||
"name" : "ParameterList",
|
||||
"src" : "151:2:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 21,
|
||||
"name" : "ParameterList",
|
||||
"src" : "170:0:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"statements" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 22,
|
||||
"name" : "Block",
|
||||
"src" : "170:3:1"
|
||||
}
|
||||
],
|
||||
"id" : 23,
|
||||
"name" : "FunctionDefinition",
|
||||
"src" : "139:34:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"documentation" : null,
|
||||
"implemented" : true,
|
||||
"isConstructor" : false,
|
||||
"kind" : "function",
|
||||
"modifiers" :
|
||||
[
|
||||
null
|
||||
],
|
||||
"name" : "faa",
|
||||
"scope" : 31,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : 15,
|
||||
"visibility" : "public"
|
||||
},
|
||||
"children" :
|
||||
[
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"contractScope" : null,
|
||||
"name" : "A",
|
||||
"referencedDeclaration" : 5,
|
||||
"type" : "contract A"
|
||||
},
|
||||
"id" : 25,
|
||||
"name" : "UserDefinedTypeName",
|
||||
"src" : "206:1:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"contractScope" : null,
|
||||
"name" : "B",
|
||||
"referencedDeclaration" : 16,
|
||||
"type" : "contract B"
|
||||
},
|
||||
"id" : 26,
|
||||
"name" : "UserDefinedTypeName",
|
||||
"src" : "209:1:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 24,
|
||||
"name" : "ParameterList",
|
||||
"src" : "187:2:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"parameters" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 28,
|
||||
"name" : "ParameterList",
|
||||
"src" : "212:0:1"
|
||||
},
|
||||
{
|
||||
"attributes" :
|
||||
{
|
||||
"statements" :
|
||||
[
|
||||
null
|
||||
]
|
||||
},
|
||||
"children" : [],
|
||||
"id" : 29,
|
||||
"name" : "Block",
|
||||
"src" : "212:2:1"
|
||||
}
|
||||
],
|
||||
"id" : 30,
|
||||
"name" : "FunctionDefinition",
|
||||
"src" : "175:39:1"
|
||||
}
|
||||
],
|
||||
"id" : 31,
|
||||
"name" : "ContractDefinition",
|
||||
"src" : "120:96:1"
|
||||
}
|
||||
],
|
||||
"id" : 32,
|
||||
"name" : "SourceUnit",
|
||||
"src" : "0:217:1"
|
||||
}
|
||||
@@ -46,6 +46,7 @@
|
||||
"id" : 6,
|
||||
"name" : "x",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 8,
|
||||
"src" : "35:15:1",
|
||||
"stateVariable" : false,
|
||||
@@ -97,6 +98,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract c { function f() public { uint[] memory x; } }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 10,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -99,6 +100,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "x",
|
||||
"overrides" : null,
|
||||
"scope" : 8,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "memory",
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"id" : 7,
|
||||
"name" : "rows",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 9,
|
||||
"src" : "35:20:1",
|
||||
"stateVariable" : false,
|
||||
@@ -109,6 +110,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract c { function f() public { uint[][] memory rows; } }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 11,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -99,6 +100,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "rows",
|
||||
"overrides" : null,
|
||||
"scope" : 9,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "memory",
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"id" : 3,
|
||||
"name" : "x",
|
||||
"nodeType" : "VariableDeclaration",
|
||||
"overrides" : null,
|
||||
"scope" : 9,
|
||||
"src" : "28:5:1",
|
||||
"stateVariable" : false,
|
||||
@@ -131,6 +132,7 @@
|
||||
"modifiers" : [],
|
||||
"name" : "f",
|
||||
"nodeType" : "FunctionDefinition",
|
||||
"overrides" : null,
|
||||
"parameters" :
|
||||
{
|
||||
"id" : 1,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
contract C { function f() { var x = 2; x++; } }
|
||||
|
||||
// ----
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
null
|
||||
],
|
||||
"name" : "f",
|
||||
"overrides" : null,
|
||||
"scope" : 11,
|
||||
"stateMutability" : "nonpayable",
|
||||
"superFunction" : null,
|
||||
@@ -98,6 +99,7 @@
|
||||
{
|
||||
"constant" : false,
|
||||
"name" : "x",
|
||||
"overrides" : null,
|
||||
"scope" : 9,
|
||||
"stateVariable" : false,
|
||||
"storageLocation" : "default",
|
||||
|
||||
Reference in New Issue
Block a user