diff --git a/src/aeso_fcode_to_fate.erl b/src/aeso_fcode_to_fate.erl index 37788fe..9a4c5cb 100644 --- a/src/aeso_fcode_to_fate.erl +++ b/src/aeso_fcode_to_fate.erl @@ -19,6 +19,7 @@ -type scode() :: [sinstr()]. -type sinstr() :: {switch, arg(), stype(), [maybe_scode()], maybe_scode()} %% last arg is catch-all + | {loop, scode(), var(), scode(), reference(), reference()} | switch_body | loop | tuple() | atom(). %% FATE instruction diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 379daad..fe53c95 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -140,7 +140,74 @@ compile(Name, Options) -> %% The currently compilable contracts. compilable_contracts() -> - [ + ["complex_types", + "counter", + "dutch_auction", + "environment", + "factorial", + "functions", + "fundme", + "identity", + "maps", + "oracles", + "remote_call", + "remote_call_ambiguous_record", + "simple", + "simple_storage", + "spend_test", + "stack", + "test", + "builtin_bug", + "builtin_map_get_bug", + "lc_record_bug", + "nodeadcode", + "deadcode", + "variant_types", + "state_handling", + "events", + "include", + "basic_auth", + "basic_auth_tx", + "bitcoin_auth", + "address_literals", + "bytes_equality", + "address_chain", + "namespace_bug", + "bytes_to_x", + "bytes_concat", + "aens", + "aens_update", + "tuple_match", + "cyclic_include", + "stdlib_include", + "double_include", + "manual_stdlib_include", + "list_comp", + "payable", + "unapplied_builtins", + "underscore_number_literals", + "pairing_crypto", + "qualified_constructor", + "let_patterns", + "lhs_matching", + "more_strings", + "protected_call", + "hermetization_turnoff", + "multiple_contracts", + "clone", + "clone_simple", + "create", + "child_contract_init_bug", + "using_namespace", + "assign_patterns", + "patterns_guards", + "pipe_operator", + "polymorphism_contract_implements_interface", + "polymorphism_contract_multi_interface", + "polymorphism_contract_interface_extends_interface", + "polymorphism_contract_interface_extensions", + "polymorphism_contract_interface_same_decl_multi_interface", + "polymorphism_contract_interface_same_name_same_type", "test" % Custom general-purpose test file. Keep it last on the list. ]. diff --git a/test/contracts/test.aes b/test/contracts/test.aes index 5a90d06..d978179 100644 --- a/test/contracts/test.aes +++ b/test/contracts/test.aes @@ -1,5 +1,12 @@ // This is a custom test file if you need to run a compiler without // changing aeso_compiler_tests.erl -contract C = - entrypoint test() = [1..5] \ No newline at end of file +include "List.aes" + +contract IntegerHolder = + type state = int + entrypoint init(x) = x + entrypoint get() = state + +main contract Test = + stateful entrypoint f(c) = Chain.clone(ref=c, 123)