mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
415 B
Solidity
12 lines
415 B
Solidity
contract C {
|
|
function f(C c) pure public returns (C) {
|
|
return c;
|
|
}
|
|
function g() pure public returns (bytes4) {
|
|
// By passing `this`, we read from the state, even if f itself is pure.
|
|
return f(this).f.selector;
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 2527: (228-232): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
|