mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Yul codegen for immutables.
This commit is contained in:
@@ -4,5 +4,7 @@ contract A {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 2
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
contract C {
|
||||
uint immutable public x = 1;
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// x() -> 1
|
||||
|
||||
@@ -26,5 +26,7 @@ contract D is B, C {
|
||||
return (a, b, c, d);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 4, 3, 2, 1
|
||||
|
||||
@@ -10,6 +10,8 @@ contract C {
|
||||
return z();
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 7
|
||||
// callZ() -> 7
|
||||
|
||||
@@ -9,5 +9,7 @@ contract C {
|
||||
return (x+x,y);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 84, 23
|
||||
|
||||
@@ -13,6 +13,8 @@ contract C {
|
||||
return (x+x,y);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 3 ->
|
||||
// f() -> 84, 23
|
||||
|
||||
Reference in New Issue
Block a user