Skip to content

Report implicit any errors on destructuring declarations#7969

Merged
sheetalkamat merged 1 commit into
masterfrom
bindingPatternImplicitAny
Apr 8, 2016
Merged

Report implicit any errors on destructuring declarations#7969
sheetalkamat merged 1 commit into
masterfrom
bindingPatternImplicitAny

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

Handles #6935

@DanielRosenwasser
Copy link
Copy Markdown
Member

👍

Comment thread src/compiler/checker.ts
if (element.initializer) {
return getWidenedType(checkExpressionCached(element.initializer));
const type = checkExpressionCached(element.initializer);
reportErrorsFromWidening(element, type);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this needed to make the new tests fail properly? If not, then does there need to be some test case that does need it to get the correct error message?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is needed for new test cases it gets covered by scenarios like

f([a=undefined]) {
}

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.

4 participants