Tests for using enums and fixed-point types as user-defined types

This commit is contained in:
Kamil Śliwak 2023-02-07 17:37:17 +01:00
parent 38b5ae578b
commit fa0d3a44a7
2 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,8 @@ type MyInt is int;
type MyUInt is uint;
type MyInt128 is int128;
type MyUInt128 is uint128;
// TODO add fixed point type, when it's implemented
type MyFixed is fixed;
type MyUfixed is ufixed;
type MyFixedBytes32 is bytes32;
type MyFixedBytes1 is bytes1;
type MyBool is bool;

View File

@ -0,0 +1,5 @@
enum E {A, B, C}
type MyType is E;
// ----
// TypeError 8657: (33-34): The underlying type for a user defined value type has to be an elementary value type.