diff --git a/src/services/services.ts b/src/services/services.ts index 19fcb46552c..748141dcf55 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3798,6 +3798,10 @@ module ts { // Try getting just type at this position and show switch (node.kind) { case SyntaxKind.Identifier: + if(isLabelName(node)){ + return undefined; + } + // Fall through. case SyntaxKind.PropertyAccessExpression: case SyntaxKind.QualifiedName: case SyntaxKind.ThisKeyword: diff --git a/tests/cases/fourslash/noQuickInfoForLabel.ts b/tests/cases/fourslash/noQuickInfoForLabel.ts new file mode 100644 index 00000000000..16ae6ef5f61 --- /dev/null +++ b/tests/cases/fourslash/noQuickInfoForLabel.ts @@ -0,0 +1,11 @@ +/// + +//// /*1*/label : while(true){ +//// break /*2*/label; +//// } + +goTo.marker('1'); +verify.not.quickInfoExists(); + +goTo.marker('2'); +verify.not.quickInfoExists();