Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to infer static types for logical operators #1

Open
dibyendumajumdar opened this issue Jan 29, 2015 · 0 comments
Open

How to infer static types for logical operators #1

dibyendumajumdar opened this issue Jan 29, 2015 · 0 comments

Comments

@dibyendumajumdar
Copy link
Owner

The type of a logical operators and/or is determined based on the arguments - so this poses a problem when determining the return type statically.

Possible solutions:
We could specialise for situations where both operands of the boolean operator are of known type - because in this case the resulting type is going to be the same as that of the operands. However, when either operand is of a different type - only if the comparison is between constants can the resulting type be determined at compile time

@dibyendumajumdar dibyendumajumdar self-assigned this Jan 29, 2015
@dibyendumajumdar dibyendumajumdar changed the title How to handle logical operators How to infer static types for logical operators Mar 21, 2015
@dibyendumajumdar dibyendumajumdar removed their assignment Apr 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant