mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12652 from ethereum/moveTest
Move stray semantics test to proper directory.
This commit is contained in:
commit
f1be7e1e23
@ -1,12 +1,12 @@
|
|||||||
contract A {
|
contract A {
|
||||||
uint public x;
|
uint public x = 2;
|
||||||
constructor(uint) {}
|
constructor(uint) {}
|
||||||
function f() public { x = 4; }
|
function f() public returns(uint) { x = 4; }
|
||||||
}
|
}
|
||||||
contract B is A {
|
contract B is A {
|
||||||
constructor() A(f()) {}
|
constructor() A(f()) {}
|
||||||
}
|
}
|
||||||
// ====
|
// ====
|
||||||
// compileViaYul: also
|
// compileViaYul: false
|
||||||
// ----
|
// ----
|
||||||
// x() -> 4
|
// x() -> 4
|
@ -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
|
Loading…
Reference in New Issue
Block a user