Fix #11660: wrong reports that block-scoped variable used before its …#11692
Conversation
…fore its declaration
|
Hi @domchen, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
The continuous integration check seems failed. But I built it and tested it successfully on my computer, which part did I do wrong? |
|
it's lint error. Please fix code style in checker |
|
All checks have passed now, Thanks for the tip~ @HerringtonDarkholme |
|
thanks @domchen. looks good. can you please add a unit test to tests\cases\compiler. |
|
@mhegazy The unit test is added. I am not familiar with this, is the style of the unit test ok? |
|
Please accept-baseline. For guidance please read this https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#adding-a-test |
|
Finally! I will know the drill next time. Thanks again for your help. @HerringtonDarkholme |
|
Thanks @domchen and @HerringtonDarkholme! |
Fixes #11660
Add a call to the isUsedInFunctionOrNonStaticProperty function to check whether the usage is deferred when usage and declaration are not in the same file.