Skip to content

Conversation

edwardw
Copy link
Contributor

@edwardw edwardw commented Jan 31, 2015

For "symmetric" binary operators, meaning the types of two sides must be
equal, if the type of LHS doesn't know yet but RHS does, use that as an
hint to infer LHS' type.

Closes #21634

@rust-highfive
Copy link
Contributor

r? @nick29581

(rust_highfive has picked a reviewer for you, use r? to override)

For "symmetric" binary operators, meaning the types of two side must be
equal, if the type of LHS doesn't know yet but RHS does, use that as an
hint to infer LHS' type.

Closes rust-lang#21634
@nrc
Copy link
Member

nrc commented Feb 2, 2015

@bors r+ 60fa1ff

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 2, 2015
For "symmetric" binary operators, meaning the types of two sides must be
equal, if the type of LHS doesn't know yet but RHS does, use that as an
hint to infer LHS' type.

Closes rust-lang#21634
@bors bors merged commit 60fa1ff into rust-lang:master Feb 3, 2015
@edwardw edwardw deleted the symmetric-binop branch February 3, 2015 08:15
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.

Type inference of floating point numbers through a comparison depends on the order of the operands
4 participants