mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Issue warning when using deprecated SELFDESTRUCT
This commit is contained in:
@@ -2,4 +2,5 @@ contract C {
|
||||
function f() pure public { selfdestruct; }
|
||||
}
|
||||
// ----
|
||||
// Warning 5159: (44-56): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
|
||||
// Warning 6133: (44-56): Statement has no effect.
|
||||
|
||||
@@ -4,4 +4,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 5159: (56-68): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
|
||||
// TypeError 9553: (69-70): Invalid type for argument in function call. Invalid implicit conversion from address to address payable requested.
|
||||
|
||||
@@ -4,3 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 5159: (64-76): "selfdestruct" has been deprecated. The underlying opcode will eventually undergo breaking changes, and its use is not recommended.
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
@@ -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.
|
||||
|
||||
+1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user