/ test / contracts / builtin_bug.aes
builtin_bug.aes
 1  
 2  // Compiler failed to detect the map lookup nested in the state update and
 3  // generate the appropriate builtin for it.
 4  contract BuiltinBug =
 5  
 6    record state = {proofs : map(address, list(string))}
 7  
 8    entrypoint init() = {proofs = {}}
 9  
10    stateful entrypoint createProof(hash : string) =
11      put( state{ proofs[Call.caller] = hash :: state.proofs[Call.caller] } )
12