Address review, fix some dialyzer errors
This commit is contained in:
@@ -14,7 +14,7 @@ main contract C =
|
||||
let s1 = Chain.clone(ref=s)
|
||||
let Some(s2) = Chain.clone(ref=s, protected=true)
|
||||
let None = Chain.clone(ref=s, protected=true, gas=1)
|
||||
let None = Chain.clone(ref=l, protected=true, 123)
|
||||
let None = Chain.clone(ref=l, protected=true, 123) // since it should be HigherOrderState underneath
|
||||
let s3 = Chain.clone(ref=s1)
|
||||
require(s1.apply(2137) == 2137, "APPLY_S1_0")
|
||||
require(s2.apply(2137) == 2137, "APPLY_S2_0")
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// This is a custom test file if you need to run a compiler without
|
||||
// changing aeso_compiler_tests.erl
|
||||
|
||||
include "List.aes"
|
||||
|
||||
contract IntegerHolder =
|
||||
@@ -5,10 +8,5 @@ contract IntegerHolder =
|
||||
entrypoint init(x) = x
|
||||
entrypoint get() = state
|
||||
|
||||
main contract IntegerCollection =
|
||||
record state = {template: IntegerHolder, payload: list(IntegerHolder)}
|
||||
stateful entrypoint init() = {template = Chain.create(0), payload = []}
|
||||
stateful entrypoint add(x) =
|
||||
put(state{payload @ p = Chain.clone(ref=state.template, x) :: p})
|
||||
x
|
||||
entrypoint sum() = List.sum(List.map((h) => h.get(), state.payload))
|
||||
main contract Test =
|
||||
stateful entrypoint f(c) = Chain.clone(ref=c, 123)
|
||||
Reference in New Issue
Block a user