Anyone knows why this branch collapses into the parent type if more than two siblings of a parent type is specified?
# This works as expected, the type checker can differentiate between the types case entity when Ast::Module, Ast::Store ... end # The entity here gets resolved to Ast::Node (which is the parent type) case entity when Ast::Module, Ast::Store, Ast::Provider ... end
Is it related to this PR https://github.com/crystal-lang/crystal/pull/6024? I know there was a feature for this which got reverted (https://github.com/crystal-lang/crystal/pull/6351) but for me this seems a weird behavior I would expect both to work the same.
You can see the full source here: https://github.com/mint-lang/mint/blob/js/src/type_checkers/module_call.cr#L27