Add new test.

This commit is contained in:
Daniel Kirchner 2019-12-05 03:29:56 +01:00
parent 7fab1c5e4a
commit d3ba65968c
3 changed files with 659 additions and 0 deletions

View File

@ -0,0 +1,270 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
5
],
"B":
[
10
],
"C":
[
22
]
},
"id": 23,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "A",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "45:2:1",
"statements": []
},
"documentation": null,
"id": 4,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "45:0:1"
},
"scope": 5,
"src": "17:30:1",
"stateMutability": "nonpayable",
"visibility": "public"
}
],
"scope": 23,
"src": "0:49:1"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 10,
"linearizedBaseContracts":
[
10
],
"name": "B",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 8,
"nodeType": "Block",
"src": "95:2:1",
"statements": []
},
"documentation": null,
"id": 9,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters": [],
"src": "77:2:1"
},
"returnParameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters": [],
"src": "95:0:1"
},
"scope": 10,
"src": "67:30:1",
"stateMutability": "nonpayable",
"visibility": "public"
}
],
"scope": 23,
"src": "50:49:1"
},
{
"abstract": false,
"baseContracts":
[
{
"arguments": null,
"baseName":
{
"contractScope": null,
"id": 11,
"name": "A",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5,
"src": "114:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_A_$5",
"typeString": "contract A"
}
},
"id": 12,
"nodeType": "InheritanceSpecifier",
"src": "114:1:1"
},
{
"arguments": null,
"baseName":
{
"contractScope": null,
"id": 13,
"name": "B",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10,
"src": "117:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_B_$10",
"typeString": "contract B"
}
},
"id": 14,
"nodeType": "InheritanceSpecifier",
"src": "117:1:1"
}
],
"contractDependencies":
[
5,
10
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 22,
"linearizedBaseContracts":
[
22,
10,
5
],
"name": "C",
"nodeType": "ContractDefinition",
"nodes":
[
{
"baseFunctions":
[
4,
9
],
"body":
{
"id": 20,
"nodeType": "Block",
"src": "160:2:1",
"statements": []
},
"documentation": null,
"id": 21,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nodeType": "FunctionDefinition",
"overrides":
[
{
"contractScope": null,
"id": 16,
"name": "A",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5,
"src": "154:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_A_$5",
"typeString": "contract A"
}
},
{
"contractScope": null,
"id": 17,
"name": "B",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10,
"src": "157:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_B_$10",
"typeString": "contract B"
}
}
],
"parameters":
{
"id": 15,
"nodeType": "ParameterList",
"parameters": [],
"src": "135:2:1"
},
"returnParameters":
{
"id": 19,
"nodeType": "ParameterList",
"parameters": [],
"src": "160:0:1"
},
"scope": 22,
"src": "125:37:1",
"stateMutability": "nonpayable",
"visibility": "public"
}
],
"scope": 23,
"src": "100:64:1"
}
],
"src": "0:165:1"
}

View File

@ -0,0 +1,11 @@
contract A {
function f() public virtual {}
}
contract B {
function f() public virtual {}
}
contract C is A, B {
function f() public override(A, B) {}
}
// ----

View File

@ -0,0 +1,378 @@
{
"attributes":
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
5
],
"B":
[
10
],
"C":
[
22
]
}
},
"children":
[
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts":
[
5
],
"name": "A",
"scope": 23
},
"children":
[
{
"attributes":
{
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"overrides": null,
"scope": 5,
"stateMutability": "nonpayable",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 1,
"name": "ParameterList",
"src": "27:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 2,
"name": "ParameterList",
"src": "45:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 3,
"name": "Block",
"src": "45:2:1"
}
],
"id": 4,
"name": "FunctionDefinition",
"src": "17:30:1"
}
],
"id": 5,
"name": "ContractDefinition",
"src": "0:49:1"
},
{
"attributes":
{
"abstract": false,
"baseContracts":
[
null
],
"contractDependencies":
[
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts":
[
10
],
"name": "B",
"scope": 23
},
"children":
[
{
"attributes":
{
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"overrides": null,
"scope": 10,
"stateMutability": "nonpayable",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 6,
"name": "ParameterList",
"src": "77:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 7,
"name": "ParameterList",
"src": "95:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 8,
"name": "Block",
"src": "95:2:1"
}
],
"id": 9,
"name": "FunctionDefinition",
"src": "67:30:1"
}
],
"id": 10,
"name": "ContractDefinition",
"src": "50:49:1"
},
{
"attributes":
{
"abstract": false,
"contractDependencies":
[
5,
10
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts":
[
22,
10,
5
],
"name": "C",
"scope": 23
},
"children":
[
{
"attributes":
{
"arguments": null
},
"children":
[
{
"attributes":
{
"contractScope": null,
"name": "A",
"referencedDeclaration": 5,
"type": "contract A"
},
"id": 11,
"name": "UserDefinedTypeName",
"src": "114:1:1"
}
],
"id": 12,
"name": "InheritanceSpecifier",
"src": "114:1:1"
},
{
"attributes":
{
"arguments": null
},
"children":
[
{
"attributes":
{
"contractScope": null,
"name": "B",
"referencedDeclaration": 10,
"type": "contract B"
},
"id": 13,
"name": "UserDefinedTypeName",
"src": "117:1:1"
}
],
"id": 14,
"name": "InheritanceSpecifier",
"src": "117:1:1"
},
{
"attributes":
{
"baseFunctions":
[
4,
9
],
"documentation": null,
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers":
[
null
],
"name": "f",
"scope": 22,
"stateMutability": "nonpayable",
"visibility": "public"
},
"children":
[
{
"attributes":
{
"contractScope": null,
"name": "A",
"referencedDeclaration": 5,
"type": "contract A"
},
"id": 16,
"name": "UserDefinedTypeName",
"src": "154:1:1"
},
{
"attributes":
{
"contractScope": null,
"name": "B",
"referencedDeclaration": 10,
"type": "contract B"
},
"id": 17,
"name": "UserDefinedTypeName",
"src": "157:1:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 15,
"name": "ParameterList",
"src": "135:2:1"
},
{
"attributes":
{
"parameters":
[
null
]
},
"children": [],
"id": 19,
"name": "ParameterList",
"src": "160:0:1"
},
{
"attributes":
{
"statements":
[
null
]
},
"children": [],
"id": 20,
"name": "Block",
"src": "160:2:1"
}
],
"id": 21,
"name": "FunctionDefinition",
"src": "125:37:1"
}
],
"id": 22,
"name": "ContractDefinition",
"src": "100:64:1"
}
],
"id": 23,
"name": "SourceUnit",
"src": "0:165:1"
}