Issue warning when using deprecated SELFDESTRUCT

This commit is contained in:
Nikola Matic
2023-01-25 16:55:11 +01:00
parent fd9ac9abed
commit e7543d487d
15 changed files with 32 additions and 1 deletions
@@ -19,3 +19,4 @@ contract C {
receive() payable external {}
}
// ----
// Warning 5159: (122-134): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
@@ -20,6 +20,7 @@ contract C {
}
}
// ----
// Warning 5159: (201-213): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
// 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.
@@ -85,6 +85,7 @@ contract C {
// ====
// EVMVersion: >=paris
// ----
// Warning 1699: (1754-1766): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
// Warning 5740: (89-1716): Unreachable code.
// Warning 5740: (1729-1741): Unreachable code.
// Warning 5740: (1754-1769): Unreachable code.
@@ -35,6 +35,7 @@ contract C {
}
}
// ----
// Warning 1699: (498-510): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
// Warning 5740: (526-853): Unreachable code.
// TypeError 2527: (79-87): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
// TypeError 8961: (101-113): Function cannot be declared as pure because this expression (potentially) modifies the state.
@@ -23,6 +23,7 @@ contract C {
// ====
// EVMVersion: >=london
// ----
// Warning 1699: (308-320): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
// Warning 5740: (336-468): Unreachable code.
// TypeError 8961: (75-87): Function cannot be declared as view because this expression (potentially) modifies the state.
// TypeError 8961: (104-119): Function cannot be declared as view because this expression (potentially) modifies the state.