diff --git a/src/aeso_tc_errors.erl b/src/aeso_tc_errors.erl index 06481fd..0af66b5 100644 --- a/src/aeso_tc_errors.erl +++ b/src/aeso_tc_errors.erl @@ -393,9 +393,6 @@ mk_error({using_undefined_namespace_parts, Ann, Namespace, Parts}) -> PartsStr = lists:concat(lists:join(", ", Parts)), Msg = io_lib:format("The namespace ~s does not define the following names: ~s", [Namespace, PartsStr]), mk_t_err(pos(Ann), Msg); -mk_error({unknown_warning, Warning}) -> - Msg = io_lib:format("Trying to report unknown warning: ~p", [Warning]), - mk_t_err(pos(0, 0), Msg); mk_error({empty_record_definition, Ann, Name}) -> Msg = io_lib:format("Empty record definitions are not allowed. Cannot define the record `~s`", [Name]), mk_t_err(pos(Ann), Msg); diff --git a/src/aeso_tc_options.erl b/src/aeso_tc_options.erl index eca3fd3..3273dda 100644 --- a/src/aeso_tc_options.erl +++ b/src/aeso_tc_options.erl @@ -8,12 +8,6 @@ %% -- Moved functions -------------------------------------------------------- -type_error(A) -> aeso_tc_errors:type_error(A). -create_type_errors() -> aeso_tc_errors:create_type_errors(). -destroy_and_report_type_errors(A) -> aeso_tc_env:destroy_and_report_type_errors(A). - -%% ------- - all_warnings() -> aeso_tc_warnings:all_warnings(). %% --------------------------------------------------------------------------- @@ -36,9 +30,9 @@ when_option(Opt, Do) -> when_warning(Warn, Do) -> case lists:member(Warn, all_warnings()) of false -> - create_type_errors(), - type_error({unknown_warning, Warn}), - destroy_and_report_type_errors(aeso_tc_env:init_env()); + %% TODO: An error for passing invalid wanring name should be thrown here. + %% Validation of compiler options might be done at an earlier stage. + ok; true -> case aeso_tc_ets_manager:ets_tab_exists(warnings) of true ->