@@ -317,14 +317,14 @@ defmodule Module.Types.Of do
317317 match? ( { false , _ } , map_fetch ( left , :__struct__ ) ) or
318318 match? ( { false , _ } , map_fetch ( right , :__struct__ ) ) ->
319319 warning = { :struct_comparison , expr , context }
320- { result , error ( warning , elem ( expr , 1 ) , stack , context ) }
320+ { result , warn ( __MODULE__ , warning , elem ( expr , 1 ) , stack , context ) }
321321
322322 number_type? ( left ) and number_type? ( right ) ->
323323 { result , context }
324324
325325 disjoint? ( left , right ) ->
326326 warning = { :mismatched_comparison , expr , context }
327- { result , error ( warning , elem ( expr , 1 ) , stack , context ) }
327+ { result , warn ( __MODULE__ , warning , elem ( expr , 1 ) , stack , context ) }
328328
329329 true ->
330330 { result , context }
@@ -375,13 +375,13 @@ defmodule Module.Types.Of do
375375
376376 { :ok , mode , :defmacro , reason } ->
377377 context =
378- error ( __MODULE__ , { :unrequired_module , module , fun , arity } , meta , stack , context )
378+ warn ( __MODULE__ , { :unrequired_module , module , fun , arity } , meta , stack , context )
379379
380380 check_deprecated ( mode , module , fun , arity , reason , meta , stack , context )
381381
382382 { :error , :module } ->
383383 if warn_undefined? ( module , fun , arity , stack ) do
384- error ( __MODULE__ , { :undefined_module , module , fun , arity } , meta , stack , context )
384+ warn ( __MODULE__ , { :undefined_module , module , fun , arity } , meta , stack , context )
385385 else
386386 context
387387 end
@@ -390,7 +390,7 @@ defmodule Module.Types.Of do
390390 if warn_undefined? ( module , fun , arity , stack ) do
391391 exports = ParallelChecker . all_exports ( stack . cache , module )
392392 payload = { :undefined_function , module , fun , arity , exports }
393- error ( __MODULE__ , payload , meta , stack , context )
393+ warn ( __MODULE__ , payload , meta , stack , context )
394394 else
395395 context
396396 end
@@ -399,7 +399,7 @@ defmodule Module.Types.Of do
399399
400400 defp check_deprecated ( :elixir , module , fun , arity , reason , meta , stack , context ) do
401401 if reason do
402- error ( __MODULE__ , { :deprecated , module , fun , arity , reason } , meta , stack , context )
402+ warn ( __MODULE__ , { :deprecated , module , fun , arity , reason } , meta , stack , context )
403403 else
404404 context
405405 end
@@ -409,12 +409,12 @@ defmodule Module.Types.Of do
409409 case :otp_internal . obsolete ( module , fun , arity ) do
410410 { :deprecated , string } when is_list ( string ) ->
411411 reason = string |> List . to_string ( ) |> :string . titlecase ( )
412- error ( __MODULE__ , { :deprecated , module , fun , arity , reason } , meta , stack , context )
412+ warn ( __MODULE__ , { :deprecated , module , fun , arity , reason } , meta , stack , context )
413413
414414 { :deprecated , string , removal } when is_list ( string ) and is_list ( removal ) ->
415415 reason = string |> List . to_string ( ) |> :string . titlecase ( )
416416 reason = "It will be removed in #{ removal } . #{ reason } "
417- error ( __MODULE__ , { :deprecated , module , fun , arity , reason } , meta , stack , context )
417+ warn ( __MODULE__ , { :deprecated , module , fun , arity , reason } , meta , stack , context )
418418
419419 _ ->
420420 context
0 commit comments