Overly broad error span when function field not assignable to its annotation inside class #23515
Labels
Bug
A bug in TypeScript
Domain: Error Messages
The issue relates to error messaging
Fixed
A PR has been merged for this issue
Good First Issue
Well scoped, documented and has the green light
Help Wanted
You can do this
Milestone
TypeScript Version: 2.9.0-dev.20180414
Search Terms:
class error span, not assignable to type
Code
Expected behavior:
Error on
insideClass
field would look similar to one onoutsideClass
variable.Actual behavior:
Error on
insideClass
spans the entire function implementation.Playground Link:
Link (Must turn on strictNullChecks to see error)
Related Issues:
Did not notice any duplicates when looking through
Domain: Error Messages
tagThe text was updated successfully, but these errors were encountered: