Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2022-03-07 16:34:55 +01:00
259 changed files with 2810 additions and 1360 deletions
@@ -5,4 +5,4 @@ function f() {
function g(uint[] storage x) pure { x[0] = 1; }
// ----
// Warning 2018: (0-39): Function state mutability can be restricted to pure
// TypeError 8961: (76-80): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (76-80): Function cannot be declared as pure because this expression (potentially) modifies the state.
@@ -0,0 +1,5 @@
function f() pure {
assembly "evmasm" ("memory-safe", "memory-safe") {}
}
// ----
// SyntaxError 7026: (24-75): Inline assembly marked memory-safe multiple times.
@@ -0,0 +1,8 @@
function f() pure {
assembly "evmasm" ("a", "b", "c", "c") {}
}
// ----
// Warning 4430: (24-65): Unknown inline assembly flag: "a"
// Warning 4430: (24-65): Unknown inline assembly flag: "b"
// Warning 4430: (24-65): Unknown inline assembly flag: "c"
// Warning 4430: (24-65): Unknown inline assembly flag: "c"
@@ -0,0 +1,5 @@
function f() pure {
assembly " evmasm" {}
}
// ----
// ParserError 4531: (33-42): Only "evmasm" supported.
@@ -0,0 +1,5 @@
function f() pure {
assembly ("memory-safe", "memory-safe") {}
}
// ----
// SyntaxError 7026: (24-66): Inline assembly marked memory-safe multiple times.
@@ -0,0 +1,5 @@
function f() pure {
assembly () {}
}
// ----
// ParserError 2314: (34-35): Expected 'StringLiteral' but got ')'
@@ -0,0 +1,5 @@
function f() pure {
assembly "evmasm" () {}
}
// ----
// ParserError 2314: (43-44): Expected 'StringLiteral' but got ')'
@@ -0,0 +1,5 @@
function f() pure {
assembly ("a" "b") {}
}
// ----
// ParserError 2314: (35-38): Expected ')' but got 'StringLiteral'
@@ -0,0 +1,8 @@
function f() pure {
assembly ("a", "b", "c", "c") {}
}
// ----
// Warning 4430: (24-56): Unknown inline assembly flag: "a"
// Warning 4430: (24-56): Unknown inline assembly flag: "b"
// Warning 4430: (24-56): Unknown inline assembly flag: "c"
// Warning 4430: (24-56): Unknown inline assembly flag: "c"
@@ -0,0 +1,14 @@
contract C {
function f() public pure {
/// @test test
assembly {}
/// @solidity test
assembly {}
/// @param
assembly {}
}
}
// ----
// Warning 6269: (60-71): Unexpected NatSpec tag "test" with value "test" in inline assembly.
// Warning 8787: (95-106): Unexpected value for @solidity tag in inline assembly: test
// Warning 7828: (122-133): Inline assembly has invalid NatSpec documentation.
@@ -0,0 +1,7 @@
function f() pure {
/// @solidity memory-safe-assembly
assembly "evmasm" ("memory-safe") {
}
}
// ----
// Warning 8544: (63-104): Inline assembly marked as memory safe using both a NatSpec tag and an assembly flag. If you are not concerned with backwards compatibility, only use the assembly flag, otherwise only use the NatSpec tag.
@@ -0,0 +1,3 @@
function f() pure {
assembly "evmasm" ("memory-safe") {}
}
@@ -0,0 +1,6 @@
contract C {
function f() public pure {
// @solidity memory-safe-assembly
assembly {}
}
}
@@ -0,0 +1,23 @@
function f() pure {
/// @unrelated bogus-value
/// @before bogus-value
///
/// @solidity a memory-safe-assembly b c
/// d
/// @after bogus-value
assembly {}
/// @solidity memory-safe-assembly a a a
/// memory-safe-assembly
assembly {}
}
// ----
// Warning 6269: (189-200): Unexpected NatSpec tag "after" with value "bogus-value" in inline assembly.
// Warning 6269: (189-200): Unexpected NatSpec tag "before" with value "bogus-value" in inline assembly.
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: a
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: b
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: c
// Warning 8787: (189-200): Unexpected value for @solidity tag in inline assembly: d
// Warning 8787: (289-300): Unexpected value for @solidity tag in inline assembly: a
// Warning 4377: (289-300): Value for @solidity tag in inline assembly specified multiple times: a
// Warning 4377: (289-300): Value for @solidity tag in inline assembly specified multiple times: memory-safe-assembly
@@ -0,0 +1,19 @@
function f() pure {
/// @unrelated bogus-value
/// @before
///
/// @solidity a memory-safe-assembly b c
/// d
/// @after bogus-value
assembly {}
/// @solidity memory-safe-assembly a a a
/// memory-safe-assembly
assembly {}
}
// ----
// Warning 6269: (177-188): Unexpected NatSpec tag "after" with value "bogus-value" in inline assembly.
// Warning 6269: (177-188): Unexpected NatSpec tag "before" with value "@solidity a memory-safe-assembly b c d" in inline assembly.
// Warning 8787: (277-288): Unexpected value for @solidity tag in inline assembly: a
// Warning 4377: (277-288): Value for @solidity tag in inline assembly specified multiple times: a
// Warning 4377: (277-288): Value for @solidity tag in inline assembly specified multiple times: memory-safe-assembly
@@ -4,4 +4,4 @@ contract A {
function f() public pure { x = 42; }
}
// ----
// TypeError 8961: (SourceName:53-54): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (SourceName:53-54): Function cannot be declared as pure because this expression (potentially) modifies the state.
@@ -8,4 +8,4 @@ contract B is A {
}
}
// ----
// TypeError 8961: (100-105): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (100-105): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -15,7 +15,7 @@ contract B is A {
}
}
// ----
// TypeError 8961: (107-110): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (166-171): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (107-110): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (166-171): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 2527: (244-247): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 2527: (244-249): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
@@ -12,4 +12,4 @@ contract B is A {
}
// ----
// TypeError 2527: (107-110): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 8961: (157-160): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (157-160): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -5,4 +5,4 @@ contract A {
}
}
// ----
// TypeError 8961: (88-96): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (88-96): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -20,8 +20,8 @@ contract C {
}
}
// ----
// TypeError 8961: (52-77): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (132-153): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (201-228): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (293-323): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (414-436): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (52-77): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (132-153): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (201-228): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (293-323): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (414-436): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -7,4 +7,4 @@ contract C {
}
// ----
// TypeError 2527: (56-59): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 8961: (130-133): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (130-133): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -3,4 +3,4 @@ contract C {
function f() public view { new D(); }
}
// ----
// TypeError 8961: (58-65): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (58-65): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -13,6 +13,6 @@ contract C {
}
}
// ----
// TypeError 8961: (92-103): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (92-103): Function cannot be declared as pure because this expression (potentially) modifies the state.
// TypeError 2527: (193-202): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 8961: (289-300): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (289-300): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -8,5 +8,5 @@ contract C {
}
}
// ----
// TypeError 8961: (90-109): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (180-197): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (90-109): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (180-197): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -12,4 +12,4 @@ contract C {
}
// ----
// TypeError 2527: (100-101): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 8961: (184-187): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (184-187): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -9,4 +9,4 @@ contract C is D {
}
// ----
// TypeError 2527: (154-162): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 8961: (195-209): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (195-209): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -8,5 +8,5 @@ contract C {
}
}
// ----
// TypeError 8961: (90-111): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (182-201): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (90-111): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (182-201): Function cannot be declared as view because this expression (potentially) modifies the state.
@@ -3,4 +3,4 @@ contract C {
function f() view public { x = 2; }
}
// ----
// TypeError 8961: (56-57): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
// TypeError 8961: (56-57): Function cannot be declared as view because this expression (potentially) modifies the state.