Update expectations for uninitialized internal function.

This commit is contained in:
chriseth
2021-01-19 12:37:30 +01:00
parent 87a68feea1
commit c3d3415207
4 changed files with 53 additions and 18 deletions
@@ -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
@@ -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