[Type propagation] - Support for :__block__ #49
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
How Type Propagation works
Currently type propagation works in the
type_propagation.ex
file by using theMacro.postwalk
function to go through all AST elements and solve their types. That means that to make type propagation work with new structures, all we need to do is to support them in the functions located inside theMacro.postwalk
. More specifically theget_typeset_from_segment
and it's function calls.What should be solved for this issue
We still don't support some native Elixir AST elements. One of these missing elements is the
:__block__
, responsible for blocks of code. As an example:Currently does not give any type to the
lhs
or to the:=
thanks to__block__
not showing up inextract_types_from_segment
, falling in the default empty case of the function. We wish that the metadata is updated with the correct type by assessing what is the type of the last segment in the block. It is up to the issue solver if it makes more sense to make the fix insideextract_types_from_segment
or its callerget_typeset_from_segment
, but ideally the fix is located inside one of these.The text was updated successfully, but these errors were encountered: