mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Additional tests for edge cases for mutability, visibility, location, experimental, global, indexed and anonymous
This commit is contained in:
@@ -1,26 +1,50 @@
|
||||
contract C {
|
||||
address view m_a;
|
||||
address pure m_b;
|
||||
address view[] m_c;
|
||||
mapping(uint => address view) m_d;
|
||||
function f() public pure {
|
||||
address view a;
|
||||
address pure b;
|
||||
a; b;
|
||||
}
|
||||
function g(address view) public pure {}
|
||||
function h(address pure) public pure {}
|
||||
function i() public pure returns (address view) {}
|
||||
function j() public pure returns (address pure) {}
|
||||
address view m_a;
|
||||
address pure m_b;
|
||||
address view[] m_c;
|
||||
mapping(uint => address view) m_d;
|
||||
function f() public pure {
|
||||
address view a;
|
||||
address pure b;
|
||||
a; b;
|
||||
}
|
||||
function g(address view) public pure {}
|
||||
function h(address pure) public pure {}
|
||||
function i() public pure returns (address view) {}
|
||||
function j() public pure returns (address pure) {}
|
||||
modifier m1(address view) {_;}
|
||||
modifier m2(address pure) {_;}
|
||||
event e1(address view);
|
||||
event e2(address pure);
|
||||
error err1(address view);
|
||||
error err2(address pure);
|
||||
function f2() public pure returns (address) {
|
||||
try this.f2() returns (address view res) {} catch {}
|
||||
}
|
||||
function f3() public pure returns (address) {
|
||||
try this.f3() returns (address pure res) {} catch {}
|
||||
}
|
||||
}
|
||||
address view constant f_a;
|
||||
address pure constant f_b;
|
||||
// ----
|
||||
// TypeError 2311: (14-26): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (33-45): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (52-64): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (89-101): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (138-150): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (156-168): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (195-207): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (236-248): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (300-312): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (352-364): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (17-29): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (39-51): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (61-73): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (101-113): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (159-171): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (183-195): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (234-246): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (278-290): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (345-357): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (400-412): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (433-445): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (468-480): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (500-512): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (528-540): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (558-570): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (588-600): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (684-696): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (801-813): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (839-851): Address types can only be payable or non-payable.
|
||||
// TypeError 2311: (866-878): Address types can only be payable or non-payable.
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
contract C {
|
||||
bool payable a;
|
||||
string payable b;
|
||||
int payable c;
|
||||
int256 payable d;
|
||||
uint payable e;
|
||||
uint256 payable f;
|
||||
bytes1 payable g;
|
||||
bytes payable h;
|
||||
bytes32 payable i;
|
||||
fixed payable j;
|
||||
fixed80x80 payable k;
|
||||
ufixed payable l;
|
||||
ufixed80x80 payable m;
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (22-29): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (44-51): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (63-70): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (85-92): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (105-112): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (128-135): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (150-157): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (171-178): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (194-201): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (215-222): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (241-248): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (263-270): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (290-297): State mutability can only be specified for address types.
|
||||
@@ -1,29 +0,0 @@
|
||||
contract C {
|
||||
function a(bool payable) public pure {}
|
||||
function b(string payable) public pure {}
|
||||
function c(int payable) public pure {}
|
||||
function d(int256 payable) public pure {}
|
||||
function e(uint payable) public pure {}
|
||||
function f(uint256 payable) public pure {}
|
||||
function g(bytes1 payable) public pure {}
|
||||
function h(bytes payable) public pure {}
|
||||
function i(bytes32 payable) public pure {}
|
||||
function j(fixed payable) public pure {}
|
||||
function k(fixed80x80 payable) public pure {}
|
||||
function l(ufixed payable) public pure {}
|
||||
function m(ufixed80x80 payable) public pure {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (33-40): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (79-86): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (122-129): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (168-175): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (212-219): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (259-266): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (305-312): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (350-357): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (397-404): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (442-449): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (492-499): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (538-545): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (589-596): State mutability can only be specified for address types.
|
||||
@@ -1,31 +0,0 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
bool payable a;
|
||||
string payable b;
|
||||
int payable c;
|
||||
int256 payable d;
|
||||
uint payable e;
|
||||
uint256 payable f;
|
||||
bytes1 payable g;
|
||||
bytes payable h;
|
||||
bytes32 payable i;
|
||||
fixed payable j;
|
||||
fixed80x80 payable k;
|
||||
ufixed payable l;
|
||||
ufixed80x80 payable m;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (57-64): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (83-90): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (106-113): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (132-139): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (156-163): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (183-190): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (209-216): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (234-241): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (261-268): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (286-293): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (316-323): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (342-349): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (373-380): State mutability can only be specified for address types.
|
||||
@@ -1,29 +0,0 @@
|
||||
contract C {
|
||||
function a() public pure returns (bool payable) {}
|
||||
function b() public pure returns (string payable) {}
|
||||
function c() public pure returns (int payable) {}
|
||||
function d() public pure returns (int256 payable) {}
|
||||
function e() public pure returns (uint payable) {}
|
||||
function f() public pure returns (uint256 payable) {}
|
||||
function g() public pure returns (bytes1 payable) {}
|
||||
function h() public pure returns (bytes payable) {}
|
||||
function i() public pure returns (bytes32 payable) {}
|
||||
function j() public pure returns (fixed payable) {}
|
||||
function k() public pure returns (fixed80x80 payable) {}
|
||||
function l() public pure returns (ufixed payable) {}
|
||||
function m() public pure returns (ufixed80x80 payable) {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (56-63): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (113-120): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (167-174): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (224-231): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (279-286): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (337-344): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (394-401): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (450-457): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (508-515): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (564-571): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (625-632): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (682-689): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (744-751): State mutability can only be specified for address types.
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
contract C {
|
||||
function a(bool payable) public pure {}
|
||||
function b(string payable) public pure {}
|
||||
function c(int payable) public pure {}
|
||||
function d(int256 payable) public pure {}
|
||||
function e(uint payable) public pure {}
|
||||
function f(uint256 payable) public pure {}
|
||||
function g(bytes1 payable) public pure {}
|
||||
function h(bytes payable) public pure {}
|
||||
function i(bytes32 payable) public pure {}
|
||||
function j(fixed payable) public pure {}
|
||||
function k(fixed80x80 payable) public pure {}
|
||||
function l(ufixed payable) public pure {}
|
||||
function m(ufixed80x80 payable) public pure {}
|
||||
}
|
||||
contract C1 {
|
||||
function a(bool view) public pure {}
|
||||
function b(string view) public pure {}
|
||||
function c(int view) public pure {}
|
||||
function d(int256 view) public pure {}
|
||||
function e(uint view) public pure {}
|
||||
function f(uint256 view) public pure {}
|
||||
function g(bytes1 view) public pure {}
|
||||
function h(bytes view) public pure {}
|
||||
function i(bytes32 view) public pure {}
|
||||
function j(fixed view) public pure {}
|
||||
function k(fixed80x80 view) public pure {}
|
||||
function l(ufixed view) public pure {}
|
||||
function m(ufixed80x80 view) public pure {}
|
||||
}
|
||||
contract C2 {
|
||||
function a(bool pure) public pure {}
|
||||
function b(string pure) public pure {}
|
||||
function c(int pure) public pure {}
|
||||
function d(int256 pure) public pure {}
|
||||
function e(uint pure) public pure {}
|
||||
function f(uint256 pure) public pure {}
|
||||
function g(bytes1 pure) public pure {}
|
||||
function h(bytes pure) public pure {}
|
||||
function i(bytes32 pure) public pure {}
|
||||
function j(fixed pure) public pure {}
|
||||
function k(fixed80x80 pure) public pure {}
|
||||
function l(ufixed pure) public pure {}
|
||||
function m(ufixed80x80 pure) public pure {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (33-40): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (79-86): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (122-129): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (168-175): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (212-219): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (259-266): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (305-312): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (350-357): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (397-404): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (442-449): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (492-499): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (538-545): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (589-596): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (649-653): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (692-696): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (732-736): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (775-779): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (816-820): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (860-864): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (903-907): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (945-949): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (989-993): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1031-1035): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1078-1082): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1121-1125): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1169-1173): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1226-1230): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1269-1273): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1309-1313): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1352-1356): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1393-1397): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1437-1441): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1480-1484): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1522-1526): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1566-1570): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1608-1612): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1655-1659): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1698-1702): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1746-1750): State mutability can only be specified for address types.
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
bool payable a;
|
||||
string payable b;
|
||||
int payable c;
|
||||
int256 payable d;
|
||||
uint payable e;
|
||||
uint256 payable f;
|
||||
bytes1 payable g;
|
||||
bytes payable h;
|
||||
bytes32 payable i;
|
||||
fixed payable j;
|
||||
fixed80x80 payable k;
|
||||
ufixed payable l;
|
||||
ufixed80x80 payable m;
|
||||
|
||||
bool view a2;
|
||||
string view b2;
|
||||
int view c2;
|
||||
int256 view d2;
|
||||
uint view e2;
|
||||
uint256 view f2;
|
||||
bytes1 view g2;
|
||||
bytes view h2;
|
||||
bytes32 view i2;
|
||||
fixed view j2;
|
||||
fixed80x80 view k2;
|
||||
ufixed view l2;
|
||||
ufixed80x80 view m2;
|
||||
|
||||
bool pure a3;
|
||||
string pure b3;
|
||||
int pure c3;
|
||||
int256 pure d3;
|
||||
uint pure e3;
|
||||
uint256 pure f3;
|
||||
bytes1 pure g3;
|
||||
bytes pure h3;
|
||||
bytes32 pure i3;
|
||||
fixed pure j3;
|
||||
fixed80x80 pure k3;
|
||||
ufixed pure l3;
|
||||
ufixed80x80 pure m3;
|
||||
// ----
|
||||
// ParserError 9106: (5-12): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (23-30): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (38-45): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (56-63): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (72-79): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (91-98): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (109-116): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (126-133): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (145-152): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (162-169): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (184-191): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (202-209): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (225-232): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (242-246): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (258-262): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (271-275): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (287-291): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (301-305): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (318-322): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (334-338): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (349-353): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (366-370): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (381-385): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (401-405): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (417-421): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (438-442): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (453-457): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (469-473): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (482-486): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (498-502): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (512-516): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (529-533): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (545-549): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (560-564): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (577-581): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (592-596): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (612-616): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (628-632): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (649-653): State mutability can only be specified for address types.
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
bool payable a;
|
||||
string payable b;
|
||||
int payable c;
|
||||
int256 payable d;
|
||||
uint payable e;
|
||||
uint256 payable f;
|
||||
bytes1 payable g;
|
||||
bytes payable h;
|
||||
bytes32 payable i;
|
||||
fixed payable j;
|
||||
fixed80x80 payable k;
|
||||
ufixed payable l;
|
||||
ufixed80x80 payable m;
|
||||
}
|
||||
}
|
||||
contract C2 {
|
||||
function f() public pure {
|
||||
bool view a;
|
||||
string view b;
|
||||
int view c;
|
||||
int256 view d;
|
||||
uint view e;
|
||||
uint256 view f;
|
||||
bytes1 view g;
|
||||
bytes view h;
|
||||
bytes32 view i;
|
||||
fixed view j;
|
||||
fixed80x80 view k;
|
||||
ufixed view l;
|
||||
ufixed80x80 view m;
|
||||
}
|
||||
}
|
||||
contract C3 {
|
||||
function f() public pure {
|
||||
bool pure a;
|
||||
string pure b;
|
||||
int pure c;
|
||||
int256 pure d;
|
||||
uint pure e;
|
||||
uint256 pure f;
|
||||
bytes1 pure g;
|
||||
bytes pure h;
|
||||
bytes32 pure i;
|
||||
fixed pure j;
|
||||
fixed80x80 pure k;
|
||||
ufixed pure l;
|
||||
ufixed80x80 pure m;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (57-64): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (83-90): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (106-113): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (132-139): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (156-163): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (183-190): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (209-216): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (234-241): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (261-268): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (286-293): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (316-323): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (342-349): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (373-380): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (450-454): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (473-477): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (493-497): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (516-520): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (537-541): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (561-565): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (584-588): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (606-610): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (630-634): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (652-656): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (679-683): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (702-706): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (730-734): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (804-808): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (827-831): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (847-851): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (870-874): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (891-895): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (915-919): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (938-942): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (960-964): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (984-988): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1006-1010): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1033-1037): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1056-1060): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1084-1088): State mutability can only be specified for address types.
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
contract C {
|
||||
function a() public pure returns (bool payable) {}
|
||||
function b() public pure returns (string payable) {}
|
||||
function c() public pure returns (int payable) {}
|
||||
function d() public pure returns (int256 payable) {}
|
||||
function e() public pure returns (uint payable) {}
|
||||
function f() public pure returns (uint256 payable) {}
|
||||
function g() public pure returns (bytes1 payable) {}
|
||||
function h() public pure returns (bytes payable) {}
|
||||
function i() public pure returns (bytes32 payable) {}
|
||||
function j() public pure returns (fixed payable) {}
|
||||
function k() public pure returns (fixed80x80 payable) {}
|
||||
function l() public pure returns (ufixed payable) {}
|
||||
function m() public pure returns (ufixed80x80 payable) {}
|
||||
}
|
||||
contract C1 {
|
||||
function a() public pure returns (bool view) {}
|
||||
function b() public pure returns (string view) {}
|
||||
function c() public pure returns (int view) {}
|
||||
function d() public pure returns (int256 view) {}
|
||||
function e() public pure returns (uint view) {}
|
||||
function f() public pure returns (uint256 view) {}
|
||||
function g() public pure returns (bytes1 view) {}
|
||||
function h() public pure returns (bytes view) {}
|
||||
function i() public pure returns (bytes32 view) {}
|
||||
function j() public pure returns (fixed view) {}
|
||||
function k() public pure returns (fixed80x80 view) {}
|
||||
function l() public pure returns (ufixed view) {}
|
||||
function m() public pure returns (ufixed80x80 view) {}
|
||||
}
|
||||
contract C2 {
|
||||
function a() public pure returns (bool pure) {}
|
||||
function b() public pure returns (string pure) {}
|
||||
function c() public pure returns (int pure) {}
|
||||
function d() public pure returns (int256 pure) {}
|
||||
function e() public pure returns (uint pure) {}
|
||||
function f() public pure returns (uint256 pure) {}
|
||||
function g() public pure returns (bytes1 pure) {}
|
||||
function h() public pure returns (bytes pure) {}
|
||||
function i() public pure returns (bytes32 pure) {}
|
||||
function j() public pure returns (fixed pure) {}
|
||||
function k() public pure returns (fixed80x80 pure) {}
|
||||
function l() public pure returns (ufixed pure) {}
|
||||
function m() public pure returns (ufixed80x80 pure) {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (56-63): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (113-120): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (167-174): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (224-231): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (279-286): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (337-344): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (394-401): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (450-457): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (508-515): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (564-571): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (625-632): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (682-689): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (744-751): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (815-819): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (869-873): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (920-924): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (974-978): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1026-1030): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1081-1085): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1135-1139): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1188-1192): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1243-1247): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1296-1300): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1354-1358): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1408-1412): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1467-1471): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1535-1539): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1589-1593): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1640-1644): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1694-1698): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1746-1750): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1801-1805): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1855-1859): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1908-1912): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (1963-1967): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (2016-2020): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (2074-2078): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (2128-2132): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (2187-2191): State mutability can only be specified for address types.
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
contract C {
|
||||
bool payable a;
|
||||
string payable b;
|
||||
int payable c;
|
||||
int256 payable d;
|
||||
uint payable e;
|
||||
uint256 payable f;
|
||||
bytes1 payable g;
|
||||
bytes payable h;
|
||||
bytes32 payable i;
|
||||
fixed payable j;
|
||||
fixed80x80 payable k;
|
||||
ufixed payable l;
|
||||
ufixed80x80 payable m;
|
||||
}
|
||||
contract C2 {
|
||||
bool view a;
|
||||
string view b;
|
||||
int view c;
|
||||
int256 view d;
|
||||
uint view e;
|
||||
uint256 view f;
|
||||
bytes1 view g;
|
||||
bytes view h;
|
||||
bytes32 view i;
|
||||
fixed view j;
|
||||
fixed80x80 view k;
|
||||
ufixed view l;
|
||||
ufixed80x80 view m;
|
||||
}
|
||||
contract C3 {
|
||||
bool pure a;
|
||||
string pure b;
|
||||
int pure c;
|
||||
int256 pure d;
|
||||
uint pure e;
|
||||
uint256 pure f;
|
||||
bytes1 pure g;
|
||||
bytes pure h;
|
||||
bytes32 pure i;
|
||||
fixed pure j;
|
||||
fixed80x80 pure k;
|
||||
ufixed pure l;
|
||||
ufixed80x80 pure m;
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (22-29): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (44-51): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (63-70): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (85-92): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (105-112): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (128-135): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (150-157): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (171-178): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (194-201): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (215-222): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (241-248): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (263-270): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (290-297): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (326-330): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (345-349): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (361-365): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (380-384): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (397-401): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (417-421): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (436-440): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (454-458): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (474-478): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (492-496): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (515-519): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (534-538): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (558-562): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (591-595): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (610-614): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (626-630): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (645-649): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (662-666): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (682-686): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (701-705): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (719-723): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (739-743): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (757-761): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (780-784): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (799-803): State mutability can only be specified for address types.
|
||||
// ParserError 9106: (823-827): State mutability can only be specified for address types.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
==== Source: A ====
|
||||
contract test {
|
||||
function f1(uint indexed a) public returns (uint) { }
|
||||
}
|
||||
==== Source: B ====
|
||||
contract test {
|
||||
function f1(uint a) public returns (uint indexed) { }
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (A:37-44): Expected ',' but got 'indexed'
|
||||
// ParserError 2314: (B:61-68): Expected ',' but got 'indexed'
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
contract test {
|
||||
function f1(uint immutable a) public returns (uint immutable) { }
|
||||
function f2(uint constant a) public returns (uint constant) { }
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 8297: (32-48): The "immutable" keyword can only be used for state variables.
|
||||
// DeclarationError 8297: (66-80): The "immutable" keyword can only be used for state variables.
|
||||
// DeclarationError 1788: (102-117): The "constant" keyword can only be used for state variables or variables at file level.
|
||||
// DeclarationError 1788: (135-148): The "constant" keyword can only be used for state variables or variables at file level.
|
||||
@@ -0,0 +1,11 @@
|
||||
==== Source: A ====
|
||||
contract test {
|
||||
string memory a;
|
||||
}
|
||||
==== Source: B ====
|
||||
contract test {
|
||||
string calldata a;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (A:27-33): Expected identifier but got 'memory'
|
||||
// ParserError 2314: (B:27-35): Expected identifier but got 'calldata'
|
||||
@@ -0,0 +1,16 @@
|
||||
==== Source: A ====
|
||||
uint indexed a;
|
||||
==== Source: B ====
|
||||
contract test {
|
||||
function f(uint a) public {
|
||||
uint indexed a;
|
||||
}
|
||||
}
|
||||
==== Source: C ====
|
||||
contract test {
|
||||
uint indexed a;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (A:5-12): Expected identifier but got 'indexed'
|
||||
// ParserError 2314: (B:61-68): Expected ';' but got 'indexed'
|
||||
// ParserError 2314: (C:25-32): Expected identifier but got 'indexed'
|
||||
@@ -0,0 +1,15 @@
|
||||
==== Source: A ====
|
||||
contract test {
|
||||
function f(uint a) public {
|
||||
uint constant a;
|
||||
}
|
||||
}
|
||||
==== Source: B ====
|
||||
contract test {
|
||||
function f(uint a) public {
|
||||
uint immutable a;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (A:61-69): Expected ';' but got 'constant'
|
||||
// ParserError 2314: (B:61-70): Expected ';' but got 'immutable'
|
||||
@@ -0,0 +1,10 @@
|
||||
==== Source: A ====
|
||||
uint[] storage a;
|
||||
==== Source: B ====
|
||||
uint[] memory b;
|
||||
==== Source: C ====
|
||||
uint[] calldata c;
|
||||
// ----
|
||||
// ParserError 2314: (A:7-14): Expected identifier but got 'storage'
|
||||
// ParserError 2314: (B:7-13): Expected identifier but got 'memory'
|
||||
// ParserError 2314: (C:7-15): Expected identifier but got 'calldata'
|
||||
@@ -0,0 +1,21 @@
|
||||
contract Foo {
|
||||
function f1() returns (string calldata calldata) {}
|
||||
function f2() returns (string calldata memory) {}
|
||||
function f3() returns (string calldata storage) {}
|
||||
function f4() returns (string memory calldata) {}
|
||||
function f5() returns (string memory memory) {}
|
||||
function f6() returns (string memory storage) {}
|
||||
function f7() returns (string storage calldata) {}
|
||||
function f8() returns (string storage memory) {}
|
||||
function f9() returns (string storage storage) {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 3548: (58-66): Location already specified.
|
||||
// ParserError 3548: (114-120): Location already specified.
|
||||
// ParserError 3548: (168-175): Location already specified.
|
||||
// ParserError 3548: (221-229): Location already specified.
|
||||
// ParserError 3548: (275-281): Location already specified.
|
||||
// ParserError 3548: (327-334): Location already specified.
|
||||
// ParserError 3548: (381-389): Location already specified.
|
||||
// ParserError 3548: (436-442): Location already specified.
|
||||
// ParserError 3548: (489-496): Location already specified.
|
||||
@@ -3,6 +3,14 @@ contract Foo {
|
||||
function f() public view {
|
||||
uint[] storage memory x = m_x;
|
||||
uint[] memory storage calldata y;
|
||||
uint[] storage calldata x2;
|
||||
uint[] storage storage x3;
|
||||
uint[] calldata memory x4;
|
||||
uint[] calldata calldata x5;
|
||||
uint[] calldata storage x6;
|
||||
uint[] storage memory x4;
|
||||
uint[] storage calldata x5;
|
||||
uint[] storage storage x6;
|
||||
x; y;
|
||||
}
|
||||
}
|
||||
@@ -10,3 +18,11 @@ contract Foo {
|
||||
// ParserError 3548: (85-91): Location already specified.
|
||||
// ParserError 3548: (123-130): Location already specified.
|
||||
// ParserError 3548: (131-139): Location already specified.
|
||||
// ParserError 3548: (166-174): Location already specified.
|
||||
// ParserError 3548: (202-209): Location already specified.
|
||||
// ParserError 3548: (238-244): Location already specified.
|
||||
// ParserError 3548: (273-281): Location already specified.
|
||||
// ParserError 3548: (310-317): Location already specified.
|
||||
// ParserError 3548: (345-351): Location already specified.
|
||||
// ParserError 3548: (379-387): Location already specified.
|
||||
// ParserError 3548: (415-422): Location already specified.
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
contract Foo {
|
||||
function f(uint[] storage memory constant x, uint[] memory calldata y) internal { }
|
||||
function f2(uint[] storage storage x) internal { }
|
||||
function f3(uint[] storage calldata x) internal { }
|
||||
function f4(uint[] memory storage x) internal { }
|
||||
function f5(uint[] memory memory x) internal { }
|
||||
function f6(uint[] calldata storage x) internal { }
|
||||
function f7(uint[] calldata memory x) internal { }
|
||||
function f8(uint[] calldata calldata x) internal { }
|
||||
}
|
||||
// ----
|
||||
// ParserError 3548: (45-51): Location already specified.
|
||||
// ParserError 3548: (78-86): Location already specified.
|
||||
// ParserError 3548: (134-141): Location already specified.
|
||||
// ParserError 3548: (189-197): Location already specified.
|
||||
// ParserError 3548: (244-251): Location already specified.
|
||||
// ParserError 3548: (298-304): Location already specified.
|
||||
// ParserError 3548: (353-360): Location already specified.
|
||||
// ParserError 3548: (409-415): Location already specified.
|
||||
// ParserError 3548: (464-472): Location already specified.
|
||||
|
||||
+7
-1
@@ -1,5 +1,11 @@
|
||||
==== Source: A ====
|
||||
contract Foo {
|
||||
uint[] memory storage calldata x;
|
||||
}
|
||||
==== Source: B ====
|
||||
contract Foo {
|
||||
uint[] storage storage x;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (23-29): Expected identifier but got 'memory'
|
||||
// ParserError 2314: (A:23-29): Expected identifier but got 'memory'
|
||||
// ParserError 2314: (B:23-30): Expected identifier but got 'storage'
|
||||
@@ -0,0 +1,11 @@
|
||||
contract C {
|
||||
uint constant constant a;
|
||||
uint immutable immutable b;
|
||||
uint constant immutable c;
|
||||
uint immutable constant d;
|
||||
}
|
||||
// ----
|
||||
// ParserError 3109: (31-39): Mutability already set to "constant"
|
||||
// ParserError 3109: (62-71): Mutability already set to "immutable"
|
||||
// ParserError 3109: (93-102): Mutability already set to "constant"
|
||||
// ParserError 3109: (125-133): Mutability already set to "immutable"
|
||||
@@ -0,0 +1,103 @@
|
||||
==== Source: A ====
|
||||
contract c1 {
|
||||
function f() payable payable {}
|
||||
}
|
||||
contract c2 {
|
||||
function f() view view {}
|
||||
}
|
||||
contract c3 {
|
||||
function f() pure pure {}
|
||||
}
|
||||
contract c4 {
|
||||
function f() pure view {}
|
||||
}
|
||||
contract c5 {
|
||||
function f() payable view {}
|
||||
}
|
||||
contract c6 {
|
||||
function f() pure payable {}
|
||||
}
|
||||
contract c7 {
|
||||
function f() view payable {}
|
||||
}
|
||||
contract c8 {
|
||||
function f() payable pure {}
|
||||
}
|
||||
contract c9 {
|
||||
function f() view pure {}
|
||||
}
|
||||
==== Source: B ====
|
||||
contract c {
|
||||
address payable payable v;
|
||||
}
|
||||
==== Source: C ====
|
||||
contract c {
|
||||
function fn(address payable payable) public { }
|
||||
}
|
||||
==== Source: D ====
|
||||
contract c {
|
||||
function fn() public returns (address payable payable) { }
|
||||
}
|
||||
==== Source: E ====
|
||||
contract c {
|
||||
function fn() public {
|
||||
address payable payable v;
|
||||
}
|
||||
}
|
||||
==== Source: F ====
|
||||
contract c {
|
||||
function fn(address payable payable v) public { }
|
||||
}
|
||||
==== Source: G ====
|
||||
contract c {
|
||||
function fn() public returns (address payable payable res) { }
|
||||
}
|
||||
==== Source: H ====
|
||||
address payable payable v;
|
||||
==== Source: I ====
|
||||
contract c {
|
||||
modifier m(address payable payable x) { _; }
|
||||
}
|
||||
==== Source: J ====
|
||||
contract c {
|
||||
event e(address payable payable x);
|
||||
}
|
||||
==== Source: K ====
|
||||
contract c {
|
||||
error e1(address payable payable x);
|
||||
}
|
||||
==== Source: L ====
|
||||
contract c {
|
||||
function f() public returns (address payable) {
|
||||
try this.f() returns (address payable payable) { } catch { }
|
||||
}
|
||||
}
|
||||
==== Source: M ====
|
||||
contract c {
|
||||
function f() public returns (address payable) {
|
||||
try this.f() returns (address payable) { } catch Error(address payable payable) { }
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9680: (A:39-46): State mutability already specified as "payable".
|
||||
// ParserError 9680: (A:88-92): State mutability already specified as "view".
|
||||
// ParserError 9680: (A:134-138): State mutability already specified as "pure".
|
||||
// ParserError 9680: (A:180-184): State mutability already specified as "pure".
|
||||
// ParserError 9680: (A:229-233): State mutability already specified as "payable".
|
||||
// ParserError 9680: (A:275-282): State mutability already specified as "pure".
|
||||
// ParserError 9680: (A:324-331): State mutability already specified as "view".
|
||||
// ParserError 9680: (A:376-380): State mutability already specified as "payable".
|
||||
// ParserError 9680: (A:422-426): State mutability already specified as "view".
|
||||
// ParserError 2314: (B:33-40): Expected identifier but got 'payable'
|
||||
// ParserError 2314: (C:45-52): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (D:63-70): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (E:64-71): Expected identifier but got 'payable'
|
||||
// ParserError 2314: (F:45-52): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (G:63-70): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (H:16-23): Expected identifier but got 'payable'
|
||||
// ParserError 2314: (I:44-51): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (J:41-48): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (K:42-49): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (L:111-118): Expected ',' but got 'payable'
|
||||
// ParserError 2314: (M:144-151): Expected ',' but got 'payable'
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
contract c1 {
|
||||
function f() payable payable {}
|
||||
}
|
||||
contract c2 {
|
||||
function f() view view {}
|
||||
}
|
||||
contract c3 {
|
||||
function f() pure pure {}
|
||||
}
|
||||
contract c4 {
|
||||
function f() pure view {}
|
||||
}
|
||||
contract c5 {
|
||||
function f() payable view {}
|
||||
}
|
||||
contract c6 {
|
||||
function f() pure payable {}
|
||||
}
|
||||
contract c7 {
|
||||
function f() view payable {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 9680: (39-46): State mutability already specified as "payable".
|
||||
// ParserError 9680: (88-92): State mutability already specified as "view".
|
||||
// ParserError 9680: (134-138): State mutability already specified as "pure".
|
||||
// ParserError 9680: (180-184): State mutability already specified as "pure".
|
||||
// ParserError 9680: (229-233): State mutability already specified as "payable".
|
||||
// ParserError 9680: (275-282): State mutability already specified as "pure".
|
||||
// ParserError 9680: (324-331): State mutability already specified as "view".
|
||||
@@ -1,7 +0,0 @@
|
||||
contract C {
|
||||
uint private internal a;
|
||||
function f() private external {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 4110: (30-38): Visibility already specified as "private".
|
||||
// ParserError 9439: (67-75): Visibility already specified as "private".
|
||||
@@ -1,5 +0,0 @@
|
||||
contract test {
|
||||
uint payable x;
|
||||
}
|
||||
// ----
|
||||
// ParserError 9106: (22-29): State mutability can only be specified for address types.
|
||||
Reference in New Issue
Block a user