Also make EnumMember have Type meaning

This commit is contained in:
Andy Hanson 2017-05-10 12:20:46 -07:00
parent e26d2ae139
commit f3fe0138a2
2 changed files with 8 additions and 2 deletions

View file

@ -21,7 +21,6 @@ namespace ts {
case SyntaxKind.PropertySignature:
case SyntaxKind.PropertyAssignment:
case SyntaxKind.ShorthandPropertyAssignment:
case SyntaxKind.EnumMember:
case SyntaxKind.MethodDeclaration:
case SyntaxKind.MethodSignature:
case SyntaxKind.Constructor:
@ -40,6 +39,7 @@ namespace ts {
case SyntaxKind.TypeLiteral:
return SemanticMeaning.Type;
case SyntaxKind.EnumMember:
case SyntaxKind.ClassDeclaration:
return SemanticMeaning.Value | SemanticMeaning.Type;
@ -63,7 +63,7 @@ namespace ts {
case SyntaxKind.ImportDeclaration:
case SyntaxKind.ExportAssignment:
case SyntaxKind.ExportDeclaration:
return SemanticMeaning.Value | SemanticMeaning.Type | SemanticMeaning.Namespace;
return SemanticMeaning.All;
// An external module can be a Value
case SyntaxKind.SourceFile:

View file

@ -0,0 +1,6 @@
/// <reference path="fourslash.ts"/>
////enum E { [|{| "isWriteAccess": true, "isDefinition": true |}A|], B }
////const e: E.[|A|] = E.[|A|];
verify.singleReferenceGroup("(enum member) E.A = 0");