mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update expectations for uninitialized internal function.
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
contract Test {
|
||||
function() internal x;
|
||||
function f() public returns (bool) {
|
||||
function() internal t = x;
|
||||
// The legacy codegen would use a specific function
|
||||
// entry tag that always panics.
|
||||
// Via Yul, the internal dispatch will panic instead.
|
||||
uint z;
|
||||
assembly { z := t }
|
||||
assert(z != 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: false
|
||||
// ----
|
||||
// f() -> true
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
contract Test {
|
||||
function() internal x;
|
||||
function f() public returns (bool) {
|
||||
function() internal t = x;
|
||||
// The legacy codegen would use a specific function
|
||||
// entry tag that always panics.
|
||||
// Via Yul, the internal dispatch will panic instead.
|
||||
uint z;
|
||||
assembly { z := t }
|
||||
assert(z == 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> true
|
||||
Reference in New Issue
Block a user