Merge pull request #12652 from ethereum/moveTest

Move stray semantics test to proper directory.
This commit is contained in:
chriseth 2022-02-10 14:13:10 +01:00 committed by GitHub
commit f1be7e1e23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View File

@ -1,12 +1,12 @@
contract A {
uint public x;
uint public x = 2;
constructor(uint) {}
function f() public { x = 4; }
function f() public returns(uint) { x = 4; }
}
contract B is A {
constructor() A(f()) {}
}
// ====
// compileViaYul: also
// compileViaYul: false
// ----
// x() -> 4

View File

@ -0,0 +1,12 @@
contract A {
uint public x = 2;
constructor(uint) {}
function f() public returns(uint) { x = 4; }
}
contract B is A {
constructor() A(f()) {}
}
// ====
// compileViaYul: true
// ----
// x() -> 2