mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
User defined value types: moved a syntax test to semantic test.
This commit is contained in:
parent
8a37f56e98
commit
a03fbf7061
@ -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));
|
||||
}
|
Loading…
Reference in New Issue
Block a user