Skip to content

do not report cascading errors in instanceof operator#737

Merged
vladima merged 2 commits into
masterfrom
instanceof_cascading_errors
Sep 24, 2014
Merged

do not report cascading errors in instanceof operator#737
vladima merged 2 commits into
masterfrom
instanceof_cascading_errors

Conversation

@vladima
Copy link
Copy Markdown
Contributor

@vladima vladima commented Sep 24, 2014

fixes #733

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Sep 24, 2014

👍

Comment thread src/compiler/checker.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you rename this function to isAnyOrObjectTypeOrTypeParameter? I think it would be more readable that way.

@JsonFreeman
Copy link
Copy Markdown
Contributor

👍

Comment thread src/compiler/checker.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i don't mind this. But it does seem ike a very 1-off solution. It seems like preventing cascading in teh event of 'unknownType' is something we'd want to do in a lot more places.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We already use this approach almost everywhere in checker.

vladima added a commit that referenced this pull request Sep 24, 2014
do not report cascading errors in instanceof operator
@vladima vladima merged commit dae98be into master Sep 24, 2014
@vladima vladima deleted the instanceof_cascading_errors branch September 24, 2014 18:09
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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.

Cascading errors on right hand side of instanceof operator

5 participants