mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
parent
50a015acf0
commit
c74b1daef2
@ -5,4 +5,4 @@
|
||||
"compiler-fixed": "off",
|
||||
"no-inline-assembly": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,17 +12,33 @@ contract C {
|
||||
x = true;
|
||||
require(true);
|
||||
}
|
||||
/* Not properly supported by test system yet
|
||||
function f2(bool a) public pure returns (bool x) {
|
||||
x = a;
|
||||
string memory message;
|
||||
message = "fancy message!";
|
||||
require(a, message);
|
||||
}*/
|
||||
}
|
||||
function f3(bool a) public pure returns (bool x) {
|
||||
x = a;
|
||||
require(a, "msg");
|
||||
}
|
||||
function f4(bool a) public pure returns (bool x) {
|
||||
x = a;
|
||||
string memory message;
|
||||
require(a, message);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// compileViaYul: also
|
||||
// EVMVersion: >=byzantium
|
||||
// ----
|
||||
// f(bool): true -> true
|
||||
// f(bool): false -> FAILURE
|
||||
// fail() -> FAILURE
|
||||
// succeed() -> true
|
||||
// f2(bool): true -> true
|
||||
// f2(bool): false -> FAILURE, hex"08c379a0", 0x20, 14, "fancy message!"
|
||||
// f3(bool): true -> true
|
||||
// f3(bool): false -> FAILURE, hex"08c379a0", 0x20, 3, "msg"
|
||||
// f4(bool): true -> true
|
||||
// f4(bool): false -> FAILURE, hex"08c379a0", 0x20, 0
|
||||
|
Loading…
Reference in New Issue
Block a user