Handle qualified constructors in patterns

This commit is contained in:
Ulf Norell
2019-12-11 09:02:32 +01:00
parent b9f585ebaf
commit d4f291f252
4 changed files with 21 additions and 14 deletions
+2 -1
View File
@@ -161,7 +161,8 @@ compilable_contracts() ->
"list_comp",
"payable",
"unapplied_builtins",
"underscore_number_literals"
"underscore_number_literals",
"qualified_constructor"
].
not_yet_compilable(fate) -> [];
+8
View File
@@ -0,0 +1,8 @@
namespace Foo =
datatype x = A | B(int)
contract Bar =
entrypoint f(a : Foo.x) =
switch(a)
Foo.A => 0
Foo.B(n) => n