Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when scanning: Unsupported guards format #174

Open
l3nz opened this issue May 18, 2023 · 2 comments
Open

Crash when scanning: Unsupported guards format #174

l3nz opened this issue May 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@l3nz
Copy link

l3nz commented May 18, 2023

Tried to run on an existing project - it spits out a few warnings, then crashes.

I get:

11:35:33.717 [error] Unsupported guards format [{:call, [generated: true, location: 529], {:remote, [generated: true, location: 529], {:atom, [generated: true, location: 529], :erlang}, {:atom, [generated: true, location: 529], :is_atom}}, [{:var, [generated: true, location: 529], :_@1}]}, {:op, [generated: true, location: 529], :"=/=", {:var, [generated: true, location: 529], :_@1}, {:atom, [generated: true, location: 529], nil}}, {:op, [generated: true, location: 529], :"=/=", {:var, [generated: true, location: 529], :_@1}, {:atom, [generated: true, location: 529], true}}, {:op, [generated: true, location: 529], :"=/=", {:var, [generated: true, location: 529], :_@1}, {:atom, [generated: true, location: 529], false}}]
** (CaseClauseError) no case clause matching: {:call, [generated: true, location: 199], {:remote, [generated: true, location: 199], {:atom, [generated: true, location: 199], :erlang}, {:atom, [generated: true, location: 199], :is_atom}}, [{:var, [generated: true, location: 199], :_@1}]}
    (stdlib 4.3) lists.erl:1314: :lists.map/2
    (stdlib 4.3) lists.erl:1315: :lists.map/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:3368: :typechecker.infer_clause/2
    (stdlib 4.3) lists.erl:1320: :lists.map_1/2
    (stdlib 4.3) lists.erl:1315: :lists.map/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:3354: :typechecker.infer_clauses/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1516: :typechecker.do_type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1490: :typechecker.type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1514: :typechecker.do_type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1490: :typechecker.type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1503: :typechecker.do_type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1490: :typechecker.type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:3221: :typechecker.type_check_block/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:3373: :typechecker.infer_clause/2
    (stdlib 4.3) lists.erl:1315: :lists.map/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:3354: :typechecker.infer_clauses/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1516: :typechecker.do_type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:1490: :typechecker.type_check_expr/2
    (gradualizer 0.1.3+build.1080.ref9e629ad) /Users/lenz/dev/LogFwd/deps/gradualizer/src/typechecker.erl:3373: :typechecker.infer_clause/2
    (stdlib 4.3) lists.erl:1315: :lists.map/2

With no further indication of what/where/which file the issue could be.

@l3nz
Copy link
Author

l3nz commented May 18, 2023

Maybe related to #171 ?

@erszcz erszcz added the bug Something isn't working label May 18, 2023
@erszcz
Copy link
Member

erszcz commented May 18, 2023

Thanks for the report, @l3nz!

Indeed, it seems related to the issue you mention 👍 We'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants