sophia/test/contracts/builtin_bug.aes
2018-12-22 01:23:40 +01:00

13 lines
374 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))}
public function init() = {proofs = {}}
public stateful function createProof(hash : string) =
put( state{ proofs[Call.caller] = hash :: state.proofs[Call.caller] } )