Closed mhanberg closed 5 months ago
It doesn't appear to work for me.
lib/code/common.ex:200:pattern_match
The pattern can never match the type.
Pattern:
{:ok, _env}
Type:
:error
| %{:attrs => [any()], :functions => _, :macros => _, :variables => [any()], _ => _}
________________________________________________________________________________
lib/code/common.ex:221:unused_fun
Function use_alias/2 will never be called.
________________________________________________________________________________
lib/code/common.ex:594:pattern_match
The pattern can never match the type.
Pattern:
{:ok, _env}
Type:
:error
| %{:attrs => [any()], :functions => _, :macros => _, :variables => [any()], _ => _}
________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2
wait, hang on, sorry, I tested main
not this branch 🤦
Ah, okay so I do still have an error, but the error is essentially on my end. The basic issue is that this env is technically safe to pass to expand_alias
, but dialyzer still complains 😆 so I will do something like struct!(Macro.Env, spitfire_cursor_env)
Yep, looks good to me 👍 The type is accurately reflecting the return, and struct(Macro.Env, spitfire_cursor_env)
satisfies everything else 👍
Fixes #42
cc @zachdaniel - try this branch out and let me know if it works for you, then I'll merge and publish a patch.