Fix issue #2677 : Labels should not get quick info

This commit is contained in:
Guillaume Salles 2015-04-12 16:04:32 -04:00
parent 96995e705a
commit 7119165bd0
2 changed files with 15 additions and 0 deletions

View File

@ -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:

View File

@ -0,0 +1,11 @@
/// <reference path='fourslash.ts'/>
//// /*1*/label : while(true){
//// break /*2*/label;
//// }
goTo.marker('1');
verify.not.quickInfoExists();
goTo.marker('2');
verify.not.quickInfoExists();