Moving some struct tests to semanticTests

This commit is contained in:
Djordje Mijovic
2020-11-10 16:37:29 +01:00
parent 490064590a
commit 6915d9d2a8
9 changed files with 134 additions and 182 deletions
@@ -0,0 +1,16 @@
pragma experimental ABIEncoderV2;
contract C {
struct S { function () external returns (uint) f; uint b; }
function f(S memory s) public returns (uint, uint) {
return (s.f(), s.b);
}
function test() public returns (uint, uint) {
return this.f(S(this.g, 3));
}
function g() public returns (uint) { return 7; }
}
// ====
// compileViaYul: also
// ----
// test() -> 7, 3