Skip to content

Fix 10408 : Better error message for set/get with noImplicitAny error#10597

Merged
yuit merged 5 commits into
masterfrom
fix10408
Aug 30, 2016
Merged

Fix 10408 : Better error message for set/get with noImplicitAny error#10597
yuit merged 5 commits into
masterfrom
fix10408

Conversation

@yuit
Copy link
Copy Markdown
Contributor

@yuit yuit commented Aug 29, 2016

Fix #10408

@yuit
Copy link
Copy Markdown
Contributor Author

yuit commented Aug 29, 2016

🔔 @MaceWindu @RyanCavanaugh

Comment thread src/compiler/checker.ts Outdated
if (setter) {
error(setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
}
else if (getter) {
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.

There has to be getter or setter, right? If so we should just make this else { and assert that getter exists

@RyanCavanaugh
Copy link
Copy Markdown
Member

👍

@yuit yuit merged commit 0b95731 into master Aug 30, 2016
@yuit yuit deleted the fix10408 branch August 30, 2016 23:07
@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.

4 participants