Conversation
sandersn
reviewed
Mar 29, 2017
Member
sandersn
left a comment
There was a problem hiding this comment.
Looks good, although the new fallback behaviour in getSymbolOfEntityNameOrPropertyAccess is somewhat confusing.
| //// } | ||
| //// var x: { | ||
| //// B : CTor | ||
| //// }; |
Member
There was a problem hiding this comment.
lines 1-9 don't seem necessary for this test
| //// } | ||
| //// var x: { | ||
| //// B : CTor | ||
| //// }; |
Member
There was a problem hiding this comment.
lines 1-9 don't seem necessary for this test
| //// } | ||
| //// var x: { | ||
| //// B : CTor | ||
| //// }; |
Member
There was a problem hiding this comment.
lines 1-9 don't seem necessary for this test
| //// class C extends (foo()).[|B|] {} | ||
| //// class C1 extends foo().[|B|] {} | ||
|
|
||
| const [def, ref1, ref2] = test.ranges(); |
Member
There was a problem hiding this comment.
Try this instead:
const rs = test.ranges();
for (const r of rs) {
verify.referencesOf(r, rs));
}| } | ||
| } | ||
| else if (name.kind === SyntaxKind.ParenthesizedExpression) { | ||
| // If the expression in parenthsizedExpression is not an entity-name (e.g. it is a call expression), it won't be able to successfully resolve the name. |
| // i.e class C extends foo()./*do language service operation here*/B {} | ||
| return isEntityNameExpression(name.expression) ? | ||
| resolveEntityName(name.expression as EntityNameOrEntityNameExpression, meaning, ignoreErrors, dontResolveAlias, location) : | ||
| undefined; |
Member
There was a problem hiding this comment.
should we also give an error in the undefined case?
Contributor
Author
There was a problem hiding this comment.
We shouldn't because the caller will already handle this case.
| } | ||
| var x: { | ||
| B : CTor | ||
| }; |
Member
There was a problem hiding this comment.
turns out lines 1-7 aren't used here either!
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.
While writing tests for dynamic import, I ran into
Debug.fail("Unknown entity name kind.");insideresolveEntityNamefunction, turned out that it not only causes failure when writing out ".types" files but also disable some language services features (see test files)