sophia/test/contracts/builtin_bug.aes
2019-06-28 09:42:28 +02:00

13 lines
364 B
Plaintext

// Compiler failed to detect the map lookup nested in the state update and
// generate the appropriate builtin for it.
contract BuiltinBug =
record state = {proofs : map(address, list(string))}
entrypoint init() = {proofs = {}}
stateful entrypoint createProof(hash : string) =
put( state{ proofs[Call.caller] = hash :: state.proofs[Call.caller] } )