Solve GH suggestions
This commit is contained in:
parent
077aa584b5
commit
19d8f63131
@ -51,8 +51,6 @@ The **pp_** options all print to standard output the following:
|
|||||||
|
|
||||||
`pp_assembler` - print the generated assembler code
|
`pp_assembler` - print the generated assembler code
|
||||||
|
|
||||||
`pp_bytecode` - print the bytecode instructions
|
|
||||||
|
|
||||||
#### check_call(ContractString, Options) -> CheckRet
|
#### check_call(ContractString, Options) -> CheckRet
|
||||||
|
|
||||||
Types
|
Types
|
||||||
|
@ -363,7 +363,7 @@ to_fcode(Env, [{Contract, Attrs, Con = {con, _, Name}, Decls}|Rest])
|
|||||||
to_fcode(Env1, Rest)
|
to_fcode(Env1, Rest)
|
||||||
end;
|
end;
|
||||||
to_fcode(_Env, [NotMain = {NotMainHead, _ ,_ , _}]) when NotMainHead =/= contract_def ->
|
to_fcode(_Env, [NotMain = {NotMainHead, _ ,_ , _}]) when NotMainHead =/= contract_def ->
|
||||||
fcode_error({last_declaration_must_be_contract_def, NotMain});
|
fcode_error({last_declaration_must_be_main_contract, NotMain});
|
||||||
to_fcode(Env, [{namespace, _, {con, _, Con}, Decls} | Code]) ->
|
to_fcode(Env, [{namespace, _, {con, _, Con}, Decls} | Code]) ->
|
||||||
Env1 = decls_to_fcode(Env#{ context => {namespace, Con} }, Decls),
|
Env1 = decls_to_fcode(Env#{ context => {namespace, Con} }, Decls),
|
||||||
to_fcode(Env1, Code).
|
to_fcode(Env1, Code).
|
||||||
|
@ -49,12 +49,6 @@ format({invalid_aens_resolve_type, Ann, T}) ->
|
|||||||
"It must be a string or a pubkey type (address, oracle, etc).",
|
"It must be a string or a pubkey type (address, oracle, etc).",
|
||||||
[pp_type(2, T)]),
|
[pp_type(2, T)]),
|
||||||
mk_err(pos(Ann), Msg);
|
mk_err(pos(Ann), Msg);
|
||||||
format({invalid_map_key_type, Why, Ann, Type}) ->
|
|
||||||
Msg = io_lib:format("Invalid map key type\n~s", [pp_type(2, Type)]),
|
|
||||||
Cxt = case Why of
|
|
||||||
function -> "Map keys cannot be higher-order."
|
|
||||||
end,
|
|
||||||
mk_err(pos(Ann), Msg, Cxt);
|
|
||||||
format({invalid_oracle_type, Why, What, Ann, Type}) ->
|
format({invalid_oracle_type, Why, What, Ann, Type}) ->
|
||||||
WhyS = case Why of higher_order -> "higher-order (contain function types)";
|
WhyS = case Why of higher_order -> "higher-order (contain function types)";
|
||||||
polymorphic -> "polymorphic (contain type variables)" end,
|
polymorphic -> "polymorphic (contain type variables)" end,
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
| pp_types
|
| pp_types
|
||||||
| pp_typed_ast
|
| pp_typed_ast
|
||||||
| pp_assembler
|
| pp_assembler
|
||||||
| pp_bytecode
|
|
||||||
| no_code
|
| no_code
|
||||||
| keep_included
|
| keep_included
|
||||||
| debug_mode
|
| debug_mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user