Repository navigation
Add related span pointing to this-shadowing location for implicitly-any this - #28299
Merged
Wesley Wigham (weswigham) merged 5 commits intoNov 6, 2018
Merged
Conversation
Wesley Wigham (weswigham)
requested a review
from Daniel Rosenwasser (DanielRosenwasser)
November 1, 2018 22:46
| this.m(); | ||
| ~~~~ | ||
| !!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. | ||
| !!! related TS2735 tests/cases/compiler/thisShadowingErrorSpans.ts:4:18: There is a 'this' type shadowed by this container. |
There was a problem hiding this comment.
As a side note...I think we need better baselines for related information.. Just looking at this baseline first thing I see from message is I don't think message clearly states that its talking about f but then later I saw span. May be it would be good idea to use pretty formatting of related information instead because that's how its going to emerge anyways?
Member
Author
There was a problem hiding this comment.
If you set the pretty flag in the test options, it actually does get recorded like that. I was told that it wasn't typically necessary though, esp. since pretty also has a bunch of formatting characters which don't translate to plaintext well.
Daniel Rosenwasser (DanielRosenwasser)
requested changes
Nov 3, 2018
Daniel Rosenwasser (DanielRosenwasser)
approved these changes
Nov 6, 2018
ghost
pushed a commit
that referenced
this pull request
Nov 7, 2018
…ny this (#28299) * Add diagnostic pointing to this-shadowing location * Fix almost-top-level-this case * Change message on span
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26461