Use quote function for all errors/warnings

This commit is contained in:
Mathias Baumann
2020-01-08 16:12:06 +01:00
parent 70a2902714
commit 593e2515e7
494 changed files with 1201 additions and 1157 deletions
@@ -8,4 +8,4 @@ contract B is A {
}
}
// ----
// TypeError: (100-105): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (100-105): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -15,7 +15,7 @@ contract B is A {
}
}
// ----
// TypeError: (107-110): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (166-171): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (244-247): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (244-249): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (107-110): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (166-171): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (244-247): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (244-249): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -11,5 +11,5 @@ contract B is A {
}
}
// ----
// TypeError: (107-110): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (157-160): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (107-110): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (157-160): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -5,4 +5,4 @@ contract A {
}
}
// ----
// TypeError: (88-96): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (88-96): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -11,7 +11,7 @@ contract B is A {
}
}
// ----
// TypeError: (109-112): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (109-119): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (188-191): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (188-194): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (109-112): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (109-119): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (188-191): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (188-194): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -17,5 +17,5 @@ contract C {
}
}
// ----
// Warning: (17-288): Function state mutability can be restricted to pure
// Warning: (293-559): Function state mutability can be restricted to pure
// Warning: (17-288): Function state mutability can be restricted to "pure".
// Warning: (293-559): Function state mutability can be restricted to "pure".
@@ -20,8 +20,8 @@ contract C {
}
}
// ----
// TypeError: (52-77): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (132-153): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (201-228): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (293-323): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (414-436): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (52-77): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (132-153): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (201-228): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (293-323): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (414-436): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -6,5 +6,5 @@ contract C {
function i() public { x = 2; }
}
// ----
// TypeError: (56-59): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (130-133): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (56-59): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (130-133): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -7,4 +7,4 @@ contract C
}
}
// ----
// Warning: (17-108): Function state mutability can be restricted to view
// Warning: (17-108): Function state mutability can be restricted to "view".
@@ -10,4 +10,4 @@ contract C
}
}
// ----
// Warning: (17-121): Function state mutability can be restricted to view
// Warning: (17-121): Function state mutability can be restricted to "view".
@@ -8,5 +8,5 @@ contract C {
}
}
// ----
// Warning: (42-107): Function state mutability can be restricted to pure
// Warning: (112-172): Function state mutability can be restricted to pure
// Warning: (42-107): Function state mutability can be restricted to "pure".
// Warning: (112-172): Function state mutability can be restricted to "pure".
@@ -3,4 +3,4 @@ contract C {
function f() public view { new D(); }
}
// ----
// TypeError: (58-65): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (58-65): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -13,6 +13,6 @@ contract C {
}
}
// ----
// TypeError: (92-103): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (193-202): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (289-300): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (92-103): Function declared as "pure", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (193-202): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (289-300): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -11,6 +11,6 @@ contract C {
}
}
// ----
// TypeError: (90-108): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (190-208): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (279-295): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (90-108): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (190-208): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (279-295): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -11,5 +11,5 @@ contract C {
}
}
// ----
// TypeError: (100-101): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (184-187): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (100-101): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (184-187): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -8,5 +8,5 @@ contract C is D {
function g() nonpayablem(0) view public {}
}
// ----
// TypeError: (154-162): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (195-209): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (154-162): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (195-209): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -3,4 +3,4 @@ contract C {
function f() m(1 ether, msg.value) public pure {}
}
// ----
// TypeError: (118-127): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (118-127): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -5,4 +5,4 @@ contract C {
}
}
// ----
// TypeError: (86-87): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (86-87): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -9,5 +9,5 @@ contract C {
}
}
// ----
// TypeError: (115-116): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (163-168): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (115-116): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (163-168): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -8,4 +8,4 @@ contract C {
}
}
// ----
// TypeError: (228-232): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError: (228-232): Function declared as "pure", but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -3,4 +3,4 @@ contract C {
function g() public returns (uint) { return x; }
}
// ----
// Warning: (29-77): Function state mutability can be restricted to view
// Warning: (29-77): Function state mutability can be restricted to "view".
@@ -11,6 +11,6 @@ contract C {
}
}
// ----
// TypeError: (90-110): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (192-212): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (283-301): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (90-110): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (192-212): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
// TypeError: (283-301): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".
@@ -3,4 +3,4 @@ contract C {
function f() view public { x = 2; }
}
// ----
// TypeError: (56-57): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError: (56-57): Function declared as "view", but this expression (potentially) modifies the state and thus requires non-payable (the default) or "payable".