mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Minor changes after code review
This commit is contained in:
@@ -79,8 +79,6 @@ contract C {
|
||||
function test_geq(int128 x) public pure returns (bool) { return w(x) >= w(2); }
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test_bitor() -> 10
|
||||
// test_bitand() -> 10
|
||||
|
||||
@@ -18,7 +18,5 @@ contract C {
|
||||
return value + value * percentage;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// applyInterest(int128,int128): 500000000000000000000, 100000000000000000 -> 550000000000000000000
|
||||
|
||||
@@ -22,8 +22,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 1
|
||||
// g() -> 2
|
||||
|
||||
@@ -36,8 +36,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test1() -> 1
|
||||
// test2() -> 2
|
||||
|
||||
+1
-6
@@ -1,5 +1,4 @@
|
||||
==== Source: a.sol ====
|
||||
pragma abicoder v2;
|
||||
library L {
|
||||
type Int is int128;
|
||||
|
||||
@@ -8,21 +7,17 @@ library L {
|
||||
}
|
||||
}
|
||||
==== Source: b.sol ====
|
||||
pragma abicoder v2;
|
||||
import "a.sol" as a;
|
||||
==== Source: c.sol ====
|
||||
pragma abicoder v2;
|
||||
import "b.sol" as b;
|
||||
|
||||
contract C {
|
||||
using {b.a.L.add as +} for b.a.L.Int;
|
||||
|
||||
function f() pure public returns (b.a.L.Int) {
|
||||
return b.a.L.Int.wrap(0) + b.a.L.Int.wrap(0);
|
||||
return b.a.L.Int.wrap(0) + b.a.L.Int.wrap(0);
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 7
|
||||
|
||||
Reference in New Issue
Block a user