Skip to content

Commit 7119165

Browse files
Fix issue #2677 : Labels should not get quick info
1 parent 96995e7 commit 7119165

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/services/services.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,6 +3798,10 @@ module ts {
37983798
// Try getting just type at this position and show
37993799
switch (node.kind) {
38003800
case SyntaxKind.Identifier:
3801+
if(isLabelName(node)){
3802+
return undefined;
3803+
}
3804+
// Fall through.
38013805
case SyntaxKind.PropertyAccessExpression:
38023806
case SyntaxKind.QualifiedName:
38033807
case SyntaxKind.ThisKeyword:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
//// /*1*/label : while(true){
4+
//// break /*2*/label;
5+
//// }
6+
7+
goTo.marker('1');
8+
verify.not.quickInfoExists();
9+
10+
goTo.marker('2');
11+
verify.not.quickInfoExists();

0 commit comments

Comments
 (0)