User defined value types: moved a syntax test to semantic test.

This commit is contained in:
hrkrshnn 2021-09-09 12:07:51 +02:00
parent 8a37f56e98
commit a03fbf7061
2 changed files with 13 additions and 7 deletions

View File

@ -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

View File

@ -1,7 +0,0 @@
type MyInt is int;
function f() pure {
(MyInt).wrap;
(MyInt).wrap(5);
(MyInt).unwrap;
(MyInt).unwrap(MyInt.wrap(5));
}