mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -241,6 +241,9 @@ function nodeOrChildIsBlack(node) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isSymbolWithDeclarations(symbol) {
|
||||
return !!(symbol && symbol.declarations);
|
||||
}
|
||||
function markNodes(ts, languageService, options) {
|
||||
const program = languageService.getProgram();
|
||||
if (!program) {
|
||||
@@ -413,7 +416,7 @@ function markNodes(ts, languageService, options) {
|
||||
if (symbolImportNode) {
|
||||
setColor(symbolImportNode, 2 /* Black */);
|
||||
}
|
||||
if (symbol && !nodeIsInItsOwnDeclaration(nodeSourceFile, node, symbol)) {
|
||||
if (isSymbolWithDeclarations(symbol) && !nodeIsInItsOwnDeclaration(nodeSourceFile, node, symbol)) {
|
||||
for (let i = 0, len = symbol.declarations.length; i < len; i++) { // {{SQL CARBON EDIT}} Compile fixes
|
||||
const declaration = symbol.declarations[i]; // {{SQL CARBON EDIT}} Compile fixes
|
||||
if (ts.isSourceFile(declaration)) {
|
||||
@@ -686,7 +689,7 @@ function getRealNodeSymbol(ts, checker, node) {
|
||||
// get the aliased symbol instead. This allows for goto def on an import e.g.
|
||||
// import {A, B} from "mod";
|
||||
// to jump to the implementation directly.
|
||||
if (symbol && symbol.flags & ts.SymbolFlags.Alias && shouldSkipAlias(node, symbol.declarations[0])) { // {{SQL CARBON EDIT}} Compile fixes
|
||||
if (symbol && symbol.flags & ts.SymbolFlags.Alias && symbol.declarations && shouldSkipAlias(node, symbol.declarations[0])) { // {{SQL CARBON EDIT}} Compile fixes
|
||||
const aliased = checker.getAliasedSymbol(symbol);
|
||||
if (aliased.declarations) {
|
||||
// We should mark the import as visited
|
||||
|
||||
Reference in New Issue
Block a user