Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented May 22, 2018

Use a join for type of a conditional expression unless the type context
is a union type.

A recent change (#5041) modified the type to always use a union, but this
caused many problems in internal Dropbox repos that we aren't ready to
fix yet.

Use a join for type of a conditional expression unless the type context
is a union type.

A recent change (#5041) modified the type to always use a union, but this
caused many problems in internal Dropbox repos that we aren't ready to
fix yet.
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Just a comma in a comment.

else_type = self.analyze_cond_branch(else_map, e.else_expr, context=if_type)

res = UnionType.make_simplified_union([if_type, else_type])
# Only create a union type if the type context is a union to be mostly
Copy link
Member

Choose a reason for hiding this comment

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

comma before "to be mostly"

@msullivan
Copy link
Collaborator

Merging this, though I'd like to revert it at some point.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants