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

Disallow void branches #7261

Closed
wants to merge 7 commits into from
Closed

Disallow void branches #7261

wants to merge 7 commits into from

Conversation

DanielRosenwasser
Copy link
Member

Fixes #7256

Open questions:

Should we cover null/undefined types?

TODO:

  • Conditional expressions
  • Negation expressions.


==== tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts (10 errors) ====
// The && operator permits the operands to be of any type and produces a result of the same
// type as the second operand.
Copy link
Member Author

Choose a reason for hiding this comment

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

This might need to be updated. Should I split these tests up so we can observe the types of other expressions?

Copy link
Member

Choose a reason for hiding this comment

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

yes

@sandersn
Copy link
Member

Why didn't we check this before? This seems fundamental to the type of binary logical operators.

@jeffreymorlan
Copy link
Contributor

void expressions should also be disallowed on the right side of !, I think.

@DanielRosenwasser
Copy link
Member Author

@jeffreymorlan that's not a bad idea either. Thanks!

@RyanCavanaugh
Copy link
Member

👍 and ✅

@mhegazy
Copy link
Contributor

mhegazy commented Apr 26, 2016

@DanielRosenwasser can you update this PR.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 30, 2016

@DanielRosenwasser can you update and merge this time :)

@mhegazy
Copy link
Contributor

mhegazy commented May 22, 2017

Thanks for your contribution. This PR has failing CI tests and can not be merged in at the time being. For housekeeping purposes we are closing stale PRs. If you'd still like to merge this code in, please open a new PR that has been merged and rebased with the master branch.

@mhegazy mhegazy closed this May 22, 2017
@mhegazy mhegazy deleted the noVoidBranches branch November 2, 2017 21:02
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants