File tree 7 files changed +259
-0
lines changed
7 files changed +259
-0
lines changed Original file line number Diff line number Diff line change
1
+ pragma experimental ABIEncoderV2;
2
+ struct S { uint a; }
3
+ contract C {
4
+ function f (S calldata s ) external view {}
5
+ function g (S memory s ) public view {}
6
+ }
7
+ // ----
8
+ // :C
9
+ // [
10
+ // {
11
+ // "constant": true,
12
+ // "inputs":
13
+ // [
14
+ // {
15
+ // "components":
16
+ // [
17
+ // {
18
+ // "internalType": "uint256",
19
+ // "name": "a",
20
+ // "type": "uint256"
21
+ // }
22
+ // ],
23
+ // "internalType": "struct S",
24
+ // "name": "s",
25
+ // "type": "tuple"
26
+ // }
27
+ // ],
28
+ // "name": "g",
29
+ // "outputs": [],
30
+ // "payable": false,
31
+ // "stateMutability": "view",
32
+ // "type": "function"
33
+ // },
34
+ // {
35
+ // "constant": true,
36
+ // "inputs":
37
+ // [
38
+ // {
39
+ // "components":
40
+ // [
41
+ // {
42
+ // "internalType": "uint256",
43
+ // "name": "a",
44
+ // "type": "uint256"
45
+ // }
46
+ // ],
47
+ // "internalType": "struct S",
48
+ // "name": "s",
49
+ // "type": "tuple"
50
+ // }
51
+ // ],
52
+ // "name": "f",
53
+ // "outputs": [],
54
+ // "payable": false,
55
+ // "stateMutability": "view",
56
+ // "type": "function"
57
+ // }
58
+ // ]
Original file line number Diff line number Diff line change
1
+ {
2
+ "absolutePath" : " a" ,
3
+ "exportedSymbols" :
4
+ {
5
+ "E" :
6
+ [
7
+ 2
8
+ ]
9
+ },
10
+ "id" : 3 ,
11
+ "nodeType" : " SourceUnit" ,
12
+ "nodes" :
13
+ [
14
+ {
15
+ "canonicalName" : " E" ,
16
+ "id" : 2 ,
17
+ "members" :
18
+ [
19
+ {
20
+ "id" : 1 ,
21
+ "name" : " A" ,
22
+ "nodeType" : " EnumValue" ,
23
+ "src" : " 9:1:1"
24
+ }
25
+ ],
26
+ "name" : " E" ,
27
+ "nodeType" : " EnumDefinition" ,
28
+ "src" : " 0:12:1"
29
+ }
30
+ ],
31
+ "src" : " 0:13:1"
32
+ }
Original file line number Diff line number Diff line change
1
+ enum E { A }
2
+
3
+ // ----
Original file line number Diff line number Diff line change
1
+ {
2
+ "attributes" :
3
+ {
4
+ "absolutePath" : " a" ,
5
+ "exportedSymbols" :
6
+ {
7
+ "E" :
8
+ [
9
+ 2
10
+ ]
11
+ }
12
+ },
13
+ "children" :
14
+ [
15
+ {
16
+ "attributes" :
17
+ {
18
+ "canonicalName" : " E" ,
19
+ "name" : " E"
20
+ },
21
+ "children" :
22
+ [
23
+ {
24
+ "attributes" :
25
+ {
26
+ "name" : " A"
27
+ },
28
+ "id" : 1 ,
29
+ "name" : " EnumValue" ,
30
+ "src" : " 9:1:1"
31
+ }
32
+ ],
33
+ "id" : 2 ,
34
+ "name" : " EnumDefinition" ,
35
+ "src" : " 0:12:1"
36
+ }
37
+ ],
38
+ "id" : 3 ,
39
+ "name" : " SourceUnit" ,
40
+ "src" : " 0:13:1"
41
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "absolutePath" : " a" ,
3
+ "exportedSymbols" :
4
+ {
5
+ "S" :
6
+ [
7
+ 3
8
+ ]
9
+ },
10
+ "id" : 4 ,
11
+ "nodeType" : " SourceUnit" ,
12
+ "nodes" :
13
+ [
14
+ {
15
+ "canonicalName" : " S" ,
16
+ "id" : 3 ,
17
+ "members" :
18
+ [
19
+ {
20
+ "constant" : false ,
21
+ "id" : 2 ,
22
+ "name" : " a" ,
23
+ "nodeType" : " VariableDeclaration" ,
24
+ "overrides" : null ,
25
+ "scope" : 3 ,
26
+ "src" : " 11:9:1" ,
27
+ "stateVariable" : false ,
28
+ "storageLocation" : " default" ,
29
+ "typeDescriptions" :
30
+ {
31
+ "typeIdentifier" : " t_uint256" ,
32
+ "typeString" : " uint256"
33
+ },
34
+ "typeName" :
35
+ {
36
+ "id" : 1 ,
37
+ "name" : " uint256" ,
38
+ "nodeType" : " ElementaryTypeName" ,
39
+ "src" : " 11:7:1" ,
40
+ "typeDescriptions" :
41
+ {
42
+ "typeIdentifier" : " t_uint256" ,
43
+ "typeString" : " uint256"
44
+ }
45
+ },
46
+ "value" : null ,
47
+ "visibility" : " internal"
48
+ }
49
+ ],
50
+ "name" : " S" ,
51
+ "nodeType" : " StructDefinition" ,
52
+ "scope" : 4 ,
53
+ "src" : " 0:23:1" ,
54
+ "visibility" : " public"
55
+ }
56
+ ],
57
+ "src" : " 0:24:1"
58
+ }
Original file line number Diff line number Diff line change
1
+ struct S { uint256 a; }
2
+
3
+ // ----
Original file line number Diff line number Diff line change
1
+ {
2
+ "attributes" :
3
+ {
4
+ "absolutePath" : " a" ,
5
+ "exportedSymbols" :
6
+ {
7
+ "S" :
8
+ [
9
+ 3
10
+ ]
11
+ }
12
+ },
13
+ "children" :
14
+ [
15
+ {
16
+ "attributes" :
17
+ {
18
+ "canonicalName" : " S" ,
19
+ "name" : " S" ,
20
+ "scope" : 4 ,
21
+ "visibility" : " public"
22
+ },
23
+ "children" :
24
+ [
25
+ {
26
+ "attributes" :
27
+ {
28
+ "constant" : false ,
29
+ "name" : " a" ,
30
+ "overrides" : null ,
31
+ "scope" : 3 ,
32
+ "stateVariable" : false ,
33
+ "storageLocation" : " default" ,
34
+ "type" : " uint256" ,
35
+ "value" : null ,
36
+ "visibility" : " internal"
37
+ },
38
+ "children" :
39
+ [
40
+ {
41
+ "attributes" :
42
+ {
43
+ "name" : " uint256" ,
44
+ "type" : " uint256"
45
+ },
46
+ "id" : 1 ,
47
+ "name" : " ElementaryTypeName" ,
48
+ "src" : " 11:7:1"
49
+ }
50
+ ],
51
+ "id" : 2 ,
52
+ "name" : " VariableDeclaration" ,
53
+ "src" : " 11:9:1"
54
+ }
55
+ ],
56
+ "id" : 3 ,
57
+ "name" : " StructDefinition" ,
58
+ "src" : " 0:23:1"
59
+ }
60
+ ],
61
+ "id" : 4 ,
62
+ "name" : " SourceUnit" ,
63
+ "src" : " 0:24:1"
64
+ }
You can’t perform that action at this time.
0 commit comments