Restore test.aes

This commit is contained in:
Gaith Hallak 2022-05-11 17:13:25 +04:00
parent 94c8bc3671
commit 3b3e24fb83
3 changed files with 22 additions and 4 deletions

View File

@ -205,6 +205,7 @@ compilable_contracts() ->
"contract_polymorphism", "contract_polymorphism",
"contract_polymorphism_multi_interface", "contract_polymorphism_multi_interface",
"contract_interface_polymorphism", "contract_interface_polymorphism",
"contract_polymorphism_interface_extensions",
"contract_interface_polymorphism_same_decl_multi_interface", "contract_interface_polymorphism_same_decl_multi_interface",
"contract_interface_polymorphism_same_name_same_type", "contract_interface_polymorphism_same_name_same_type",
"test" % Custom general-purpose test file. Keep it last on the list. "test" % Custom general-purpose test file. Keep it last on the list.

View File

@ -0,0 +1,9 @@
contract interface I0 =
entrypoint f : () => int
contract interface I1 : I0 =
entrypoint f : () => int
entrypoint something_else : () => int
main contract C =
entrypoint f(x : I1) = x.f() // Here we should know that x has f

View File

@ -1,4 +1,12 @@
contract ShareTwo = // This is a custom test file if you need to run a compiler without
record state = {s1 : int, s2 : int} // changing aeso_compiler_tests.erl
entrypoint init() = {s1 = 0, s2 = 0}
stateful entrypoint buy() = () 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)