Merge pull request #11914 from ethereum/userdefined-move-test

User defined value types: moved a syntax test to semantic test.
This commit is contained in:
chriseth authored and GitHub committed 2021-09-09 14:19:32 +02:00
commit 5de276cb75
2 files changed
+13 -7

No files matched your search

@@ -0,0 +1,13 @@
type MyInt is int;
contract C {
function f() public returns (MyInt a, int b) {
(MyInt).wrap;
a = (MyInt).wrap(5);
(MyInt).unwrap;
b = (MyInt).unwrap((MyInt).wrap(10));
}
}
// ====
// compileViaYul: also
// ----
// f() -> 5, 10
@@ -1,7 +0,0 @@
type MyInt is int;
function f() pure {
(MyInt).wrap;
(MyInt).wrap(5);
(MyInt).unwrap;
(MyInt).unwrap(MyInt.wrap(5));
}