elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.3k stars 3.35k forks source link

Dialyzer warnings #1569

Closed fishcakez closed 10 years ago

fishcakez commented 11 years ago

@alexrp opened #1568 and #1564, here is a list tracking all warnings generated by analysing elixir with a R16B01 based plt:

lib/elixir/lib/code.ex:261: Function load_file/2 has no local return
lib/elixir/lib/code.ex:261: Function load_file/1 has no local return
lib/elixir/lib/code.ex:264: The call elixir_compiler:file(file@1::[atom() | [any()] | char()]) will never return since it differs in the 1st argument from the success typing arguments: (binary())
lib/elixir/lib/code.ex:291: The call elixir_compiler:file(file@1::[atom() | [any()] | char()]) will never return since it differs in the 1st argument from the success typing arguments: (binary())
lib/elixir/lib/dict.ex:483: Function unsupported_dict/1 has no local return
lib/elixir/lib/file.ex:903: Function 'cd!'/2 has no local return
lib/elixir/lib/file.ex:909: The call 'Elixir.File':'cd!'(old::binary() | {'error',binary(),binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | char(),binary() | [])} | {'incomplete',binary(),binary()}) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()])
lib/elixir/lib/inspect/algebra.ex:246: Fun application with arguments (d::any(),'doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}}) will fail since the function has type fun((_,['doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}}]) -> 'doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}})
lib/elixir/lib/kernel.ex:2121: The call 'Elixir.Inspect.Algebra':pretty('doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}},'infinity') will never return since it differs in the 2nd argument from the success typing arguments: ('doc_nil' | binary() | {_,_} | {_,_,_},integer())
lib/elixir/lib/kernel/cli.ex:36: Function run/1 has no local return
lib/elixir/lib/kernel/cli.ex:36: The call 'Elixir.Kernel.CLI':run(_@D0::any(),'true') will never return since it differs in the 2nd argument from the success typing arguments: (fun(() -> any()),'false' | 'nil')
lib/elixir/lib/kernel/cli.ex:298: The call filelib:is_regular(file::binary()) breaks the contract (Name) -> boolean() when is_subtype(Name,filename())
lib/elixir/lib/kernel/typespec.ex:686: Function compile_error/2 has no local return
lib/elixir/lib/module/dispatch_tracker.ex:45: Overloaded contract for 'Elixir.Module.DispatchTracker':dispatches_to/2 has overlapping domains; such contracts are currently unsupported and are simply ignored
lib/elixir/lib/module/dispatch_tracker.ex:272: Clause guard cannot succeed. The variable _@1 was matched against the type [any()]
lib/elixir/lib/set.ex:230: Function unsupported_set/1 has no local return
lib/elixir/lib/system.ex:17: Function strip_re/2 will never be called
lib/elixir/lib/system.ex:21: Function read_stripped/1 will never be called
lib/ex_unit/lib/ex_unit.ex:116: The created fun has no local return
lib/ex_unit/lib/ex_unit/capture_io.ex:317: Function do_get_until/5 will never be called
lib/mix/lib/mix/archive.ex:44: Function create/2 has no local return
lib/mix/lib/mix/archive.ex:44: Function create/1 has no local return
lib/mix/lib/mix/archive.ex:53: Function files_to_add/2 has no local return
lib/mix/lib/mix/cli.ex:18: Function load_mixfile/1 has no local return
lib/mix/lib/mix/cli.ex:21: The call 'Elixir.File':'regular?'(file::<<_:56>>) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()])
lib/mix/lib/mix/cli.ex:28: Function get_task/1 will never be called
lib/mix/lib/mix/cli.ex:54: Function proceed/1 has no local return
lib/mix/lib/mix/cli.ex:71: Function change_env/1 will never be called
lib/mix/lib/mix/deps/converger.ex:70: Clause guard cannot succeed. The variable _@3 was matched against the type {[any()],_}
lib/mix/lib/mix/deps/retriever.ex:29: The created fun has no local return
lib/mix/lib/mix/deps/retriever.ex:59: Function rebar_children/1 has no local return
lib/mix/lib/mix/deps/retriever.ex:211: The call 'Elixir.Mix.Version':'match?'(actual::binary(),req::binary()) will never return since it differs in the 1st argument from the success typing arguments: ({'Elixir.Mix.Version.Schema',_,_,_,_,_,_},binary() | {'Elixir.Mix.Version.Requirement',_,[{atom() | tuple(),[any()],[any()]}]})
lib/mix/lib/mix/deps/retriever.ex:232: Function invalid_dep_format/1 has no local return
lib/mix/lib/mix/project.ex:218: The call 'Elixir.File':'regular?'(<<_:56>>) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()])
lib/mix/lib/mix/rebar.ex:76: Function recur/2 has no local return
lib/mix/lib/mix/rebar.ex:85: The created fun has no local return
lib/mix/lib/mix/rebar.ex:131: Function eval_script/2 has no local return
lib/mix/lib/mix/rebar.ex:142: Call to missing or unexported function 'Elixir.Mix.Shell':error/1
lib/mix/lib/mix/scm/git.ex:38: Function checkout/1 has no local return
lib/mix/lib/mix/scm/git.ex:47: Function update/1 has no local return
lib/mix/lib/mix/scm/path.ex:41: Function checkout/1 has no local return
lib/mix/lib/mix/tasks/archive.ex:24: Function run/1 has no local return
lib/mix/lib/mix/tasks/compile.app.ex:138: Function invalid/1 has no local return
lib/mix/lib/mix/tasks/compile.ex:50: Clause guard cannot succeed. The variable _@1 was matched against the type binary() | string()
lib/mix/lib/mix/tasks/loadpaths.ex:34: The call 'Elixir.Mix.Version':'match?'(<<_:80>>,requirement::any()) will never return since it differs in the 1st argument from the success typing arguments: ({'Elixir.Mix.Version.Schema',_,_,_,_,_,_},binary() | {'Elixir.Mix.Version.Requirement',_,[{atom() | tuple(),[any()],[any()]}]})
lib/mix/lib/mix/tasks/new.ex:39: Function run/1 has no local return
lib/mix/lib/mix/utils.ex:346: Function read_file/1 will never be called
lib/mix/lib/mix/utils.ex:367: Function 'is_file?'/1 has no local return
lib/mix/lib/mix/utils.ex:368: The call 'Elixir.File':'regular?'(path::binary()) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()])
lib/mix/lib/mix/version.ex:95: The call 'Elixir.Mix.Version':'match?'({'error',_} | {'ok',{'Elixir.Mix.Version.Schema',_,_,_,_,_,_}},requirement::any()) will never return since the success typing is ({'Elixir.Mix.Version.Schema',_,_,_,_,_,_},binary() | {'Elixir.Mix.Version.Requirement',_,[{atom() | tuple(),[any()],[any()]}]}) -> boolean() and the contract is (t(),requirement()) -> boolean()
lib/mix/lib/mix/version.ex:156: The call 'Elixir.Mix.Version':to_matchable({'error',_} | {'ok',{'Elixir.Mix.Version.Schema',_,_,_,_,_,_}}) will never return since the success typing is ({'Elixir.Mix.Version.Schema',_,_,_,_,_,_}) -> {_,_,_,[any()]} and the contract is ('Elixir.String':t() | 'Elixir.Mix.Version.Schema':t()) -> 'Elixir.Mix.Version':matchable()
src/elixir_compiler.erl:254: The created fun has no local return
src/elixir_compiler.erl:254: The call elixir_errors:handle_file_error(File::binary(),Error::any()) will never return since the success typing is ([byte()],{[any()] | non_neg_integer(),atom() | tuple(),_}) -> no_return() and the contract is (file:filename(),{non_neg_integer(),module(),any()}) -> no_return()
src/elixir_module.erl:116: The call elixir_errors:form_error(Line::any(),File::binary(),'elixir_module',{'module_in_definition',atom()}) breaks the contract (non_neg_integer() | [any()],file:filename(),module(),any()) -> no_return()
src/elixir_module.erl:303: The call elixir_errors:form_error(Line::integer(),File::binary(),'elixir_module',{'internal_function_overridden',{'__info__',1}}) breaks the contract (non_neg_integer() | [any()],file:filename(),module(),any()) -> no_return()
src/elixir_parser.erl:2116: Function yeccpars2_79/7 has no local return
src/elixir_parser.erl:3792: Function yeccpars2_283/7 has no local return
src/elixir_parser.erl:4647: Function yeccpars2_354/7 has no local return
src/elixir_parser.erl:4696: Function yeccpars2_364/7 has no local return
src/elixir_parser.erl:4706: Function yeccpars2_366/7 has no local return
src/elixir_parser.yrl:374: Function yeccpars2_283_/1 has no local return
src/elixir_parser.yrl:391: Function yeccpars2_354_/1 has no local return
src/elixir_parser.yrl:392: Function yeccpars2_364_/1 has no local return
src/elixir_parser.yrl:393: Function yeccpars2_366_/1 has no local return
src/elixir_parser.yrl:404: Function yeccpars2_373_/1 has no local return
src/elixir_parser.yrl:404: Function yeccpars2_79_/1 has no local return
src/elixir_parser.yrl:629: Function throw_no_parens_strict/1 has no local return
src/elixir_parser.yrl:634: Function throw_no_parens_many_strict/1 has no local return
josevalim commented 11 years ago

Thanks @fishcakez and @alexrp. Fixing the typespecs has very low priority on my own to-do list. So if someone else is interested in tackling this, pull requests are very welcome. I am afraid some of those are coming directly from erlang.

fishcakez commented 10 years ago

Updated dialyzer warnings using Elixir 0.10.4-dev (8785313413) and R16B03 maint branch (erlang/otp@9676a78c5c):

lib/eex/lib/eex/compiler.ex:50: Guard test is_binary(_@2::'Elixir.EEx.SyntaxError') can never succeed
lib/eex/lib/eex/compiler.ex:58: Guard test is_binary(_@2::'Elixir.EEx.SyntaxError') can never succeed
lib/eex/lib/eex/tokenizer.ex:79: Guard test is_binary(_@2::'Elixir.EEx.SyntaxError') can never succeed
lib/elixir/lib/access.ex:3: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/access.ex:56: The call _@1:'exception'([]) requires that _@1 is of type atom() | tuple() not <<_:8,_:_*1>>
lib/elixir/lib/behaviour.ex:72: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/behaviour.ex:81: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/behaviour.ex:103: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/code.ex:172: The call 'Elixir.ArgumentError':exception(<<_:8,_:_*1>>) will never return since it differs in the 1st argument from the success typing arguments: ([{'__exception__' | 'message' | binary(),_}])
lib/elixir/lib/code.ex:172: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/code.ex:182: The call 'Elixir.ArgumentError':exception(<<_:8,_:_*1>>) will never return since it differs in the 1st argument from the success typing arguments: ([{'__exception__' | 'message' | binary(),_}])
lib/elixir/lib/code.ex:182: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/code.ex:194: The call 'Elixir.ArgumentError':exception(<<_:8,_:_*1>>) will never return since it differs in the 1st argument from the success typing arguments: ([{'__exception__' | 'message' | binary(),_}])
lib/elixir/lib/code.ex:194: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/code.ex:449: Guard test is_binary(_@4::'Elixir.Code.LoadError') can never succeed
lib/elixir/lib/dict.ex:504: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/enum.ex:1: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/enum.ex:445: Guard test is_binary(_@2::'Elixir.Enum.OutOfBoundsError') can never succeed
lib/elixir/lib/enum.ex:795: Guard test is_binary(_@2::'Elixir.Enum.EmptyError') can never succeed
lib/elixir/lib/enum.ex:805: Guard test is_binary(_@2::'Elixir.Enum.EmptyError') can never succeed
lib/elixir/lib/enum.ex:1206: Guard test is_binary(_@2::'Elixir.Enum.EmptyError') can never succeed
lib/elixir/lib/enum.ex:1219: Guard test is_binary(_@2::'Elixir.Enum.EmptyError') can never succeed
lib/elixir/lib/enum.ex:1260: Guard test is_binary(_@2::'Elixir.Enum.EmptyError') can never succeed
lib/elixir/lib/enum.ex:1273: Guard test is_binary(_@2::'Elixir.Enum.EmptyError') can never succeed
lib/elixir/lib/enum.ex:1299: Function chunks/2 has no local return
lib/elixir/lib/enum.ex:1299: The call 'Elixir.Enum':chunks(coll::any(),n::any(),n::any(),'nil') breaks the contract (t(),non_neg_integer(),non_neg_integer(),[any()]) -> [[any()]]
lib/elixir/lib/enum.ex:1325: Function chunks/3 has no local return
lib/elixir/lib/enum.ex:1325: The call 'Elixir.Enum':chunks(_@D0::any(),_@D1::any(),_@D2::any(),'nil') breaks the contract (t(),non_neg_integer(),non_neg_integer(),[any()]) -> [[any()]]
lib/elixir/lib/file.ex:163: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:188: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:221: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:256: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:276: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:302: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:340: Guard test is_binary(_@2::'Elixir.File.CopyError') can never succeed
lib/elixir/lib/file.ex:387: Guard test is_binary(_@2::'Elixir.File.CopyError') can never succeed
lib/elixir/lib/file.ex:462: Guard test is_binary(_@2::'Elixir.File.CopyError') can never succeed
lib/elixir/lib/file.ex:575: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:612: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:640: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:740: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:856: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:868: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:892: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:911: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:954: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:1024: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:1044: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/file.ex:1064: Guard test is_binary(_@2::'Elixir.File.Error') can never succeed
lib/elixir/lib/hash_dict.ex:11: Guard test is_binary(_@5::'Elixir.KeyError') can never succeed
lib/elixir/lib/hash_dict.ex:115: Guard test is_binary(_@2::'Elixir.KeyError') can never succeed
lib/elixir/lib/inspect.ex:6: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/inspect/algebra.ex:97: Function do_is_doc/1 will never be called
lib/elixir/lib/inspect/algebra.ex:279: Fun application with arguments (d::any(),'doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}}) will fail since the function has type fun((_,['doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}}]) -> 'doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}})
lib/elixir/lib/integer.ex:42: The pattern 'error' can never match the type {integer(),bitstring()}
lib/elixir/lib/io.ex:253: Guard test is_binary(_@2::'Elixir.IO.StreamError') can never succeed
lib/elixir/lib/io.ex:265: Guard test is_binary(_@2::'Elixir.IO.StreamError') can never succeed
lib/elixir/lib/io/ansi.ex:137: The call 'Elixir.String':split(other::binary(),{'Elixir.Regex',{'re_pattern',1,0,<<_:560>>},<<_:48>>,<<>>,'nil'}) will never return since the success typing is (binary(),binary() | [binary()] | {'Elixir.Regex',_,binary(),binary(),[atom()]}) -> [binary()] and the contract is (t(),t() | [t()] | 'Elixir.Regex':t()) -> [t()]
lib/elixir/lib/kernel.ex:2022: The call 'Elixir.Inspect.Algebra':pretty('doc_nil' | binary() | {'doc_break',binary()} | {'doc_group','doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_cons','doc_nil' | binary() | {_,_} | {_,_,_},'doc_nil' | binary() | {_,_} | {_,_,_}} | {'doc_nest',non_neg_integer(),'doc_nil' | binary() | {_,_} | {_,_,_}},'infinity') will never return since it differs in the 2nd argument from the success typing arguments: ('doc_nil' | binary() | {_,_} | {_,_,_},integer())
lib/elixir/lib/kernel.ex:3406: The call 'Elixir.Macro':escape(regex::{'Elixir.Regex',{'re_pattern',_,_,_},binary(),binary(),'nil' | [atom()]}) will never return since the success typing is (atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}} | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},[{atom(),_}],atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}}) -> atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}} | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},[{atom(),_}],atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}} and the contract is ('Elixir.Macro':t()) -> 'Elixir.Macro':t()
lib/elixir/lib/kernel.ex:3424: Function 'MACRO-sigil_R'/3 has no local return
lib/elixir/lib/kernel.ex:3426: The call 'Elixir.Macro':escape(regex::{'Elixir.Regex',{'re_pattern',_,_,_},binary(),binary(),'nil' | [atom()]}) will never return since the success typing is (atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}} | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},[{atom(),_}],atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}}) -> atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}} | {atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}},[{atom(),_}],atom() | binary() | [any()] | number() | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},atom() | binary() | [any()] | number() | {_,_} | {_,_,_}} | {atom() | binary() | [any()] | number() | {_,_} | {_,_,_},[{_,_}],atom() | binary() | [any()] | number() | {_,_} | {_,_,_}}} and the contract is ('Elixir.Macro':t()) -> 'Elixir.Macro':t()
lib/elixir/lib/kernel/cli.ex:37: Function run/1 has no local return
lib/elixir/lib/kernel/cli.ex:37: The call 'Elixir.Kernel.CLI':run(_@D0::any(),'true') will never return since it differs in the 2nd argument from the success typing arguments: (fun(() -> any()),'false' | 'nil')
lib/elixir/lib/kernel/typespec.ex:733: Guard test is_binary(_@2::'Elixir.CompileError') can never succeed
lib/elixir/lib/keyword.ex:156: Guard test is_binary(_@2::'Elixir.KeyError') can never succeed
lib/elixir/lib/keyword.ex:382: Guard test is_binary(_@2::'Elixir.KeyError') can never succeed
lib/elixir/lib/list/chars.ex:1: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/list/chars.ex:28: Guard test is_binary(_@2::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/list_dict.ex:62: Guard test is_binary(_@2::'Elixir.KeyError') can never succeed
lib/elixir/lib/list_dict.ex:123: Guard test is_binary(_@2::'Elixir.KeyError') can never succeed
lib/elixir/lib/module.ex:670: The call _@1:'exception'([]) requires that _@1 is of type atom() | tuple() not <<_:8,_:_*1>>
lib/elixir/lib/module.ex:905: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/module.ex:927: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/module/dispatch_tracker.ex:76: Overloaded contract for 'Elixir.Module.DispatchTracker':dispatches_to/2 has overlapping domains; such contracts are currently unsupported and are simply ignored
lib/elixir/lib/module/dispatch_tracker.ex:272: Clause guard cannot succeed. The variable _@1 was matched against the type [any()]
lib/elixir/lib/protocol.ex:144: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/protocol.ex:151: Guard test is_binary(_@6::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/protocol.ex:247: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/protocol.ex:283: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/protocol/consolidation.ex:142: The variable _other can never match since previous clauses completely covered the type {'ok',atom()}
lib/elixir/lib/range.ex:7: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/record.ex:255: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:424: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:454: Guard test is_binary(_@5::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:490: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:499: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:503: Guard test is_binary(_@6::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:513: Guard test is_binary(_@9::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:528: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:538: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:549: Guard test is_binary(_@5::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:864: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:879: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record.ex:885: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record/extractor.ex:22: The call code:lib_dir(app::binary() | string()) breaks the contract (Name) -> file:filename() | {'error','bad_name'} when is_subtype(Name,atom())
lib/elixir/lib/record/extractor.ex:37: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/record/extractor.ex:54: The call _@1:'exception'([]) requires that _@1 is of type atom() | tuple() not <<_:8,_:_*1>>
lib/elixir/lib/regex.ex:69: Invalid type specification for function 'Elixir.Regex':compile/2. The success typing is (_,binary() | [any()]) -> {'error',{'invalid_option' | string(),binary() | non_neg_integer()}} | {'ok',{'Elixir.Regex',{'re_pattern',_,_,_},binary(),binary(),'nil' | [atom()]}}
lib/elixir/lib/regex.ex:105: Guard test is_binary(_@2::'Elixir.Regex.CompileError') can never succeed
lib/elixir/lib/regex.ex:148: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/regex.ex:254: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/set.ex:231: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/string.ex:225: The call 'Elixir.String':split(binary::any(),{'Elixir.Regex', {'re_pattern', 0, 1, #{#<69>(8, 1, 'integer', ['unsigned', 'big']), #<82>(8, 1, 'integer', ['unsigned', 'big']), #<67>(8, 1, 'integer', ['unsigned', 'big']), #<80>(8, 1, 'integer', ['unsigned', 'big']), #<55>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<8>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<48>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<93>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<3>(8, 1, 'integer', ['unsigned', 'big']), #<84>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<3>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big'])}#}, #{}#, #{#<117>(8, 1, 'integer', ['unsigned', 'big'])}#, 'nil'},options::any()) breaks the contract (t(),t() | [t()] | 'Elixir.Regex':t(),'Elixir.Keyword':t()) -> [t()]
lib/elixir/lib/string.ex:993: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/string.ex:1032: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/string.ex:1068: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/string.ex:1133: Guard test is_binary(_@2::'Elixir.String.UnicodeConversionError') can never succeed
lib/elixir/lib/string.ex:1136: Guard test is_binary(_@4::'Elixir.String.UnicodeConversionError') can never succeed
lib/elixir/lib/string.ex:1185: Guard test is_binary(_@2::'Elixir.String.UnicodeConversionError') can never succeed
lib/elixir/lib/string.ex:1188: Guard test is_binary(_@4::'Elixir.String.UnicodeConversionError') can never succeed
lib/elixir/lib/string/chars.ex:3: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/string/chars.ex:43: Guard test is_binary(_@2::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/supervisor/behaviour.ex:84: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/elixir/lib/system.ex:17: Function strip_re/2 will never be called
lib/elixir/lib/system.ex:21: Function read_stripped/1 will never be called
lib/elixir/lib/system.ex:105: Guard test is_binary(_@3::'Elixir.System.NoAccessCwdError') can never succeed
lib/elixir/lib/system.ex:124: Guard test is_binary(_@3::'Elixir.System.NoHomeError') can never succeed
lib/elixir/lib/system.ex:166: Guard test is_binary(_@3::'Elixir.System.NoTmpDirError') can never succeed
lib/elixir/lib/version.ex:90: Guard test is_binary(_@2::'Elixir.Version.InvalidRequirement') can never succeed
lib/elixir/lib/version.ex:95: The call 'Elixir.Version':'match?'({'error',_} | {'ok',{'Elixir.Version.Schema',_,_,_,_,_,_}},requirement::any()) will never return since the success typing is ({'Elixir.Version.Schema',_,_,_,_,_,_},binary() | {'Elixir.Version.Requirement',_,[{atom() | tuple(),[any()],[any()]}]}) -> boolean() and the contract is (t(),requirement()) -> boolean()
lib/elixir/lib/version.ex:103: Guard test is_binary(_@2::'Elixir.Version.InvalidRequirement') can never succeed
lib/elixir/lib/version.ex:156: The call 'Elixir.Version':to_matchable({'error',_} | {'ok',{'Elixir.Version.Schema',_,_,_,_,_,_}}) will never return since the success typing is ({'Elixir.Version.Schema',_,_,_,_,_,_}) -> {_,_,_,[any()]} and the contract is ('Elixir.String':t() | 'Elixir.Version.Schema':t()) -> 'Elixir.Version':matchable()
lib/ex_unit/lib/ex_unit.ex:115: The created fun has no local return
lib/ex_unit/lib/ex_unit/assertions.ex:222: Guard test is_binary(_@3::'Elixir.ExUnit.AssertionError') can never succeed
lib/ex_unit/lib/ex_unit/assertions.ex:242: Guard test is_binary(_@3::'Elixir.ExUnit.ExpectationError') can never succeed
lib/ex_unit/lib/ex_unit/assertions.ex:353: Guard test is_binary(_@8::tuple()) can never succeed
lib/ex_unit/lib/ex_unit/assertions.ex:516: Guard test is_binary(_@2::'Elixir.ExUnit.AssertionError') can never succeed
lib/ex_unit/lib/ex_unit/callbacks.ex:164: The call _@1:'exception'([]) requires that _@1 is of type atom() | tuple() not <<_:8,_:_*1>>
lib/ex_unit/lib/ex_unit/capture_io.ex:104: The call _@2:'exception'([]) requires that _@2 is of type atom() | tuple() not <<_:8,_:_*1>>
lib/ex_unit/lib/ex_unit/capture_io.ex:317: Function do_get_until/5 will never be called
lib/ex_unit/lib/ex_unit/case.ex:35: The variable _ can never match since previous clauses completely covered the type <<_:984>>
lib/ex_unit/lib/ex_unit/doc_test.ex:185: Guard test is_binary(_@2::'Elixir.ExUnit.DocTest.Error') can never succeed
lib/ex_unit/lib/ex_unit/doc_test.ex:333: Function extract_tests/2 has no local return
lib/ex_unit/lib/ex_unit/doc_test.ex:334: The call 'Elixir.String':split(doc::any(),{'Elixir.Regex', {'re_pattern', 0, 0, #{#<69>(8, 1, 'integer', ['unsigned', 'big']), #<82>(8, 1, 'integer', ['unsigned', 'big']), #<67>(8, 1, 'integer', ['unsigned', 'big']), #<80>(8, 1, 'integer', ['unsigned', 'big']), #<57>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<34>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<10>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<48>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<93>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<5>(8, 1, 'integer', ['unsigned', 'big']), #<27>(8, 1, 'integer', ['unsigned', 'big']), #<10>(8, 1, 'integer', ['unsigned', 'big']), #<84>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big']), #<5>(8, 1, 'integer', ['unsigned', 'big']), #<0>(8, 1, 'integer', ['unsigned', 'big'])}#}, #{#<10>(8, 1, 'integer', ['unsigned', 'big'])}#, #{}#, 'nil'},[{'trim','false'},...]) breaks the contract (t(),t() | [t()] | 'Elixir.Regex':t(),'Elixir.Keyword':t()) -> [t()]
lib/ex_unit/lib/ex_unit/doc_test.ex:338: Function adjust_indent/1 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:342: Function adjust_indent/5 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:378: Function set_indent/2 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:385: Function strip_indent/2 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:389: Function extract_tests/6 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:463: Function extract_error/2 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:471: Function skip_iex_number/1 will never be called
lib/ex_unit/lib/ex_unit/doc_test.ex:479: Function reverse_last_test/1 will never be called
lib/ex_unit/lib/ex_unit/formatter.ex:141: The call 'Elixir.String':split(str::binary(),{'Elixir.Regex',{'re_pattern',0,0,<<_:456>>},<<_:8>>,<<>>,'nil'}) will never return since the success typing is (binary(),binary() | [binary()] | {'Elixir.Regex',_,binary(),binary(),[atom()]}) -> [binary()] and the contract is (t(),t() | [t()] | 'Elixir.Regex':t()) -> [t()]
lib/iex/lib/iex/ansi_docs.ex:166: Function write_text/3 has no local return
lib/iex/lib/iex/ansi_docs.ex:171: The call 'Elixir.String':split(binary(),{'Elixir.Regex',{'re_pattern',0,0,<<_:448>>},<<_:16>>,<<>>,'nil'}) will never return since the success typing is (binary(),binary() | [binary()] | {'Elixir.Regex',_,binary(),binary(),[atom()]}) -> [binary()] and the contract is (t(),t() | [t()] | 'Elixir.Regex':t()) -> [t()]
lib/iex/lib/iex/ansi_docs.ex:208: Function write_with_wrap/4 will never be called
lib/iex/lib/iex/ansi_docs.ex:218: Function take_words/3 will never be called
lib/iex/lib/iex/ansi_docs.ex:240: Function length_without_escape/2 will never be called
lib/iex/lib/iex/autocomplete.ex:7: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/iex/lib/iex/autocomplete.ex:251: Clause guard cannot succeed. The variable _@1 was matched against the type binary()
lib/iex/lib/iex/cli.ex:68: The call 'Elixir.Port':open({'spawn', 'tty_sl -c -e'},['eof',...]) will never return since it differs in the 1st argument from the success typing arguments: ({'spawn',string()} | {'spawn_driver',[byte()]} | {'spawn_executable',atom() | [atom() | [any()] | char()]} | {'fd',non_neg_integer(),non_neg_integer()},['binary' | 'eof' | 'exit_status' | 'hide' | 'in' | 'nouse_stdio' | 'out' | 'stderr_to_stdout' | 'stream' | 'use_stdio' | {'arg0' | 'args' | 'cd' | 'env' | 'line' | 'packet' | 'parallelism',boolean() | binary() | [binary() | [any()] | char() | {_,_}] | non_neg_integer()}])
lib/iex/lib/iex/cli.ex:127: The created fun has no local return
lib/iex/lib/iex/evaluator.ex:119: The call elixir_errors:parse_error(any(),#{#<105>(8, 1, 'integer', ['unsigned', 'big']), #<101>(8, 1, 'integer', ['unsigned', 'big']), #<120>(8, 1, 'integer', ['unsigned', 'big'])}#,"incomplete expression",[]) breaks the contract (non_neg_integer() | [any()],file:filename(),iolist() | atom(),[] | iolist()) -> no_return()
lib/iex/lib/iex/evaluator.ex:144: The call elixir_errors:parse_error(line@1::any(),#{#<105>(8, 1, 'integer', ['unsigned', 'big']), #<101>(8, 1, 'integer', ['unsigned', 'big']), #<120>(8, 1, 'integer', ['unsigned', 'big'])}#,error::any(),token::any()) breaks the contract (non_neg_integer() | [any()],file:filename(),iolist() | atom(),[] | iolist()) -> no_return()
lib/iex/lib/iex/helpers.ex:69: Guard test is_binary(_@3::'Elixir.ArgumentError') can never succeed
lib/iex/lib/iex/helpers.ex:360: Function cd/1 has no local return
lib/iex/lib/iex/helpers.ex:361: The call 'Elixir.File':cd(binary()) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()])
lib/iex/lib/iex/helpers.ex:468: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/iex/lib/iex/helpers.ex:480: Guard test is_binary(_@2::'Elixir.CompileError') can never succeed
lib/iex/lib/iex/history.ex:157: The call _@1:'exception'([]) requires that _@1 is of type atom() | tuple() not <<_:8,_:_*1>>
lib/iex/lib/iex/introspection.ex:225: The pattern 'nil' can never match the type maybe_improper_list()
lib/iex/lib/iex/introspection.ex:236: The pattern 'nil' can never match the type maybe_improper_list()
lib/iex/lib/iex/introspection.ex:255: The pattern 'nil' can never match the type maybe_improper_list()
lib/iex/lib/iex/introspection.ex:274: Clause guard cannot succeed. The variable _@6 was matched against the type [any()]
lib/iex/lib/iex/introspection.ex:274: Clause guard cannot succeed. The variable _@5 was matched against the type [any()]
lib/iex/lib/iex/options.ex:181: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/iex/lib/iex/options.ex:185: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/iex/lib/iex/options.ex:189: Guard test is_binary(_@2::'Elixir.ArgumentError') can never succeed
lib/mix/lib/mix/deps/retriever.ex:28: The created fun has no local return
lib/mix/lib/mix/deps/retriever.ex:54: Function rebar_children/0 has no local return
lib/mix/lib/mix/deps/retriever.ex:57: The call 'Elixir.Mix.Rebar':recur(#{#<46>(8, 1, 'integer', ['unsigned', 'big'])}#,fun((_) -> [any()])) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()],any())
lib/mix/lib/mix/deps/retriever.ex:152: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/deps/retriever.ex:205: The call 'Elixir.Version':'match?'(actual::binary(),req::binary()) will never return since it differs in the 1st argument from the success typing arguments: ({'Elixir.Version.Schema',_,_,_,_,_,_},binary() | {'Elixir.Version.Requirement',_,[{atom() | tuple(),[any()],[any()]}]})
lib/mix/lib/mix/deps/retriever.ex:227: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/deps/umbrella.ex:54: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/project.ex:96: Guard test is_binary(_@3::'Elixir.Mix.NoProjectError') can never succeed
lib/mix/lib/mix/rebar.ex:50: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/rebar.ex:127: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/rebar.ex:144: Call to missing or unexported function 'Elixir.Mix.Shell':error/1
lib/mix/lib/mix/scm/git.ex:145: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/scm/path.ex:43: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/shell/process.ex:85: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/task.ex:129: Guard test is_binary(_@3::'Elixir.Mix.InvalidTaskError') can never succeed
lib/mix/lib/mix/task.ex:132: Guard test is_binary(_@5::'Elixir.Mix.NoTaskError') can never succeed
lib/mix/lib/mix/tasks/app.start.ex:50: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/archive.ex:37: Guard test is_binary(_@5::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/compile.app.ex:77: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/compile.app.ex:80: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/compile.app.ex:139: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/compile.erlang.ex:276: Guard test is_binary(_@8::'Elixir.CompileError') can never succeed
lib/mix/lib/mix/tasks/compile.ex:50: Clause guard cannot succeed. The variable _@1 was matched against the type binary()
lib/mix/lib/mix/tasks/deps.check.ex:31: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.clean.ex:28: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.compile.ex:94: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.compile.ex:136: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.compile.ex:141: Guard test is_binary(_@6::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.compile.ex:146: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.compile.ex:159: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.unlock.ex:29: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.update.ex:40: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/deps.update.ex:84: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/do.ex:20: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/escriptize.ex:73: Guard test is_binary(_@19::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/escriptize.ex:133: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/loadpaths.ex:34: The call 'Elixir.Version':'match?'(<<_:80>>,requirement::any()) will never return since it differs in the 1st argument from the success typing arguments: ({'Elixir.Version.Schema',_,_,_,_,_,_},binary() | {'Elixir.Version.Requirement',_,[{atom() | tuple(),[any()],[any()]}]})
lib/mix/lib/mix/tasks/local.install.ex:39: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/local.install.ex:45: Guard test is_binary(_@6::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/local.uninstall.ex:29: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/new.ex:45: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/new.ex:129: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/new.ex:137: The call 'Elixir.Mix.Project':in_project('umbrella_check',#{#<46>(8, 1, 'integer', ['unsigned', 'big']), #<46>(8, 1, 'integer', ['unsigned', 'big']), #<47>(8, 1, 'integer', ['unsigned', 'big']), #<46>(8, 1, 'integer', ['unsigned', 'big']), #<46>(8, 1, 'integer', ['unsigned', 'big'])}#,fun((_) -> 'false' | 'nil' | 'true')) will never return since it differs in the 2nd argument from the success typing arguments: (any(),atom() | <<_:8>> | [atom() | [any()] | char()],any())
lib/mix/lib/mix/tasks/test.ex:91: Guard test is_binary(_@5::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/tasks/test.ex:134: Guard test is_binary(_@3::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/utils.ex:330: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/utils.ex:349: Guard test is_binary(_@2::'Elixir.Mix.Error') can never succeed
lib/mix/lib/mix/utils.ex:351: Guard test is_binary(_@4::'Elixir.Mix.Error') can never succeed
src/elixir_parser.erl:3410: Function yeccpars2_239/7 has no local return
src/elixir_parser.erl:4207: Function yeccpars2_309/7 has no local return
src/elixir_parser.erl:4256: Function yeccpars2_319/7 has no local return
src/elixir_parser.erl:4266: Function yeccpars2_321/7 has no local return
src/elixir_parser.erl:4469: Function yeccpars2_338/7 has no local return
src/elixir_parser.yrl:368: Function yeccpars2_239_/1 has no local return
src/elixir_parser.yrl:385: Function yeccpars2_309_/1 has no local return
src/elixir_parser.yrl:386: Function yeccpars2_319_/1 has no local return
src/elixir_parser.yrl:387: Function yeccpars2_321_/1 has no local return
src/elixir_parser.yrl:398: Function yeccpars2_327_/1 has no local return
src/elixir_parser.yrl:398: Function yeccpars2_338_/1 has no local return
src/elixir_parser.yrl:618: Function throw_no_parens_strict/1 has no local return
src/elixir_parser.yrl:623: Function throw_no_parens_many_strict/1 has no local return

A quick glance through these suggests that only a couple of warnings are due to OTP (OTP has under specced what is allowed as a file name). The guard test is_binary warning that is repeated many times is due to the raise/1,2 macro, infering type information from the AST where possible rather than at runtime would solve this one.

fishcakez commented 10 years ago

erlang/otp#112 fixes warnings based on File.cd/1 and File.cd/2 as :file.set_cwd/1 was under specced. A sample of these warnings are:

lib/iex/lib/iex/helpers.ex:360: Function cd/1 has no local return
lib/iex/lib/iex/helpers.ex:361: The call 'Elixir.File':cd(binary()) will never return since it differs in the 1st argument from the success typing arguments: (atom() | [atom() | [any()] | char()])
josevalim commented 10 years ago

Awesome! Good job!

fishcakez commented 10 years ago

Using the branch mentioned in the OTP PR above we now get:

lib/elixir/lib/inspect/algebra.ex:97: Function do_is_doc/1 will never be called
lib/elixir/lib/kernel/cli.ex:37: Function run/1 has no local return
lib/elixir/lib/kernel/cli.ex:37: The call 'Elixir.Kernel.CLI':run(_@D0::any(),'true') will never return since it differs in the 2nd argument from the success typing arguments: (fun(() -> any()),'false' | 'nil')
lib/elixir/lib/module/dispatch_tracker.ex:76: Overloaded contract for 'Elixir.Module.DispatchTracker':dispatches_to/2 has overlapping domains; such contracts are currently unsupported and are simply ignored
lib/elixir/lib/module/dispatch_tracker.ex:272: Clause guard cannot succeed. The variable _@1 was matched against the type [any()]
lib/elixir/lib/protocol/consolidation.ex:142: The variable _other can never match since previous clauses completely covered the type {'ok',atom()}
lib/elixir/lib/record/extractor.ex:22: The call code:lib_dir(app::binary() | string()) breaks the contract (Name) -> file:filename() | {'error','bad_name'} when is_subtype(Name,atom())
lib/elixir/lib/system.ex:17: Function strip_re/2 will never be called
lib/elixir/lib/system.ex:21: Function read_stripped/1 will never be called
lib/ex_unit/lib/ex_unit.ex:115: The created fun has no local return
lib/ex_unit/lib/ex_unit/assertions.ex:353: Guard test is_binary(_@8::tuple()) can never succeed
lib/ex_unit/lib/ex_unit/capture_io.ex:317: Function do_get_until/5 will never be called
lib/iex/lib/iex/autocomplete.ex:251: Clause guard cannot succeed. The variable _@1 was matched against the type binary()
lib/iex/lib/iex/cli.ex:68: The call 'Elixir.Port':open({'spawn', 'tty_sl -c -e'},['eof',...]) will never return since it differs in the 1st argument from the success typing arguments: ({'spawn',string()} | {'spawn_driver',[byte()]} | {'spawn_executable',atom() | [atom() | [any()] | char()]} | {'fd',non_neg_integer(),non_neg_integer()},['binary' | 'eof' | 'exit_status' | 'hide' | 'in' | 'nouse_stdio' | 'out' | 'stderr_to_stdout' | 'stream' | 'use_stdio' | {'arg0' | 'args' | 'cd' | 'env' | 'line' | 'packet' | 'parallelism',boolean() | binary() | [binary() | [any()] | char() | {_,_}] | non_neg_integer()}])
lib/iex/lib/iex/cli.ex:127: The created fun has no local return
lib/mix/lib/mix/tasks/compile.ex:50: Clause guard cannot succeed. The variable _@1 was matched against the type binary()
src/elixir_parser.erl:3410: Function yeccpars2_239/7 has no local return
src/elixir_parser.erl:4207: Function yeccpars2_309/7 has no local return
src/elixir_parser.erl:4256: Function yeccpars2_319/7 has no local return
src/elixir_parser.erl:4266: Function yeccpars2_321/7 has no local return
src/elixir_parser.erl:4469: Function yeccpars2_338/7 has no local return
src/elixir_parser.yrl:368: Function yeccpars2_239_/1 has no local return
src/elixir_parser.yrl:385: Function yeccpars2_309_/1 has no local return
src/elixir_parser.yrl:386: Function yeccpars2_319_/1 has no local return
src/elixir_parser.yrl:387: Function yeccpars2_321_/1 has no local return
src/elixir_parser.yrl:398: Function yeccpars2_338_/1 has no local return
src/elixir_parser.yrl:398: Function yeccpars2_327_/1 has no local return
src/elixir_parser.yrl:618: Function throw_no_parens_strict/1 has no local return
src/elixir_parser.yrl:623: Function throw_no_parens_many_strict/1 has no local return

The following warnings occur because a private function is only used in a private macro:

lib/elixir/lib/inspect/algebra.ex:97: Function do_is_doc/1 will never be called
lib/elixir/lib/system.ex:17: Function strip_re/2 will never be called
lib/elixir/lib/system.ex:21: Function read_stripped/1 will never be called

The following warnings occur because dialyzer knows more than the compiler when doing a list comprehension:

lib/elixir/lib/module/dispatch_tracker.ex:272: Clause guard cannot succeed. The variable _@1 was matched against the type [any()]
lib/iex/lib/iex/autocomplete.ex:251: Clause guard cannot succeed. The variable _@1 was matched against the type binary()
lib/mix/lib/mix/tasks/compile.ex:50: Clause guard cannot succeed. The variable _@1 was matched against the type binary()

For the first case, dialyzer "knows" that :digraph.out_neighbours/2 always returns a list so the check for a nil is not required.

The following warnings are due to yecc:

src/elixir_parser.erl:3410: Function yeccpars2_239/7 has no local return
src/elixir_parser.erl:4207: Function yeccpars2_309/7 has no local return
src/elixir_parser.erl:4256: Function yeccpars2_319/7 has no local return
src/elixir_parser.erl:4266: Function yeccpars2_321/7 has no local return
src/elixir_parser.erl:4469: Function yeccpars2_338/7 has no local return
src/elixir_parser.yrl:368: Function yeccpars2_239_/1 has no local return
src/elixir_parser.yrl:385: Function yeccpars2_309_/1 has no local return
src/elixir_parser.yrl:386: Function yeccpars2_319_/1 has no local return
src/elixir_parser.yrl:387: Function yeccpars2_321_/1 has no local return
src/elixir_parser.yrl:398: Function yeccpars2_338_/1 has no local return
src/elixir_parser.yrl:398: Function yeccpars2_327_/1 has no local return
src/elixir_parser.yrl:618: Function throw_no_parens_strict/1 has no local return
src/elixir_parser.yrl:623: Function throw_no_parens_many_strict/1 has no local return

The following warning is not handled by the raise optimisation in #1786 because a variable is passed to raise:

lib/ex_unit/lib/ex_unit/assertions.ex:353: Guard test is_binary(_@8::tuple()) can never succeed

I will look at doing PRs for the remaining warnings, I think they are just incorrect spec declarations.

fishcakez commented 10 years ago

The following warning occurs when a private function has two (or more) default values and it is only called without the default arguments:

lib/ex_unit/lib/ex_unit/capture_io.ex:317: Function do_get_until/5 will never be called
josevalim commented 10 years ago

Thank you! That was a fantastic work and bugs were uncovered in the process!

josevalim commented 10 years ago

Closing this. We have closed a couple more dialyzer issues in master but it seems we can't do much about the other ones, as dialyzer has more information than Elixir. In the future, we will be able to mark clauses as generated by the compiler and as such skip those warnings.

Thank you @fishcakez !