Skip to content

Conversation

@josevalim
Copy link
Member

No description provided.

do: Enum.any?(args, &has_unbound_var?(&1, context))

def has_unbound_var?({:union, args}, context),
do: Enum.any?(args, &has_unbound_var?(&1, context))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come we only check unions and types? What about the other complex types?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used subtype? as a reference so if something is missing here, it is missing there. What are they? lists and maps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should sit together and document the types and which functions we have to implement for each new type. :)

def to_union(types, context) when types != [] do
flat_types = flatten_union(types)

if :dynamic in flat_types do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we removing this because of the new def subtype?(_, :dynamic, _context), do: true clause?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct!

@josevalim josevalim merged commit 0c3aebb into master Sep 13, 2020
@josevalim josevalim deleted the jv-subtype-map-keys branch September 13, 2020 07:41
@josevalim
Copy link
Member Author

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants