mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Fix the union property kind if the property is union of exported variable of module
Fixes #929
This commit is contained in:
@@ -2784,10 +2784,10 @@ module ts {
|
||||
|
||||
if (flags & SymbolFlags.Property) {
|
||||
if (flags & SymbolFlags.UnionProperty) {
|
||||
// If union property is result of union of non method (property/accessors), it is labeled as property
|
||||
// If union property is result of union of non method (property/accessors/variables), it is labeled as property
|
||||
var unionPropertyKind = forEach(typeInfoResolver.getRootSymbols(symbol), rootSymbol => {
|
||||
var rootSymbolFlags = rootSymbol.getFlags();
|
||||
if (rootSymbolFlags & (SymbolFlags.Property | SymbolFlags.GetAccessor | SymbolFlags.SetAccessor)) {
|
||||
if (rootSymbolFlags & (SymbolFlags.PropertyOrAccessor | SymbolFlags.Variable)) {
|
||||
return ScriptElementKind.memberVariableElement;
|
||||
}
|
||||
Debug.assert(!!(rootSymbolFlags & SymbolFlags.Method));
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
////module E {
|
||||
//// export var n = 1;
|
||||
////}
|
||||
////module F {
|
||||
//// export var n = 1;
|
||||
////}
|
||||
////var q: typeof E | typeof F;
|
||||
////var j = q./*1*/
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('n', "(property) n: number");
|
||||
Reference in New Issue
Block a user