Skip to content

Commit 3d8c336

Browse files
committed
Merge pull request #4632 from Microsoft/fixCompletionAssert
Fix completion assert
2 parents 03d373d + 7a0c28c commit 3d8c336

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14172,7 +14172,10 @@ namespace ts {
1417214172
let symbols: Symbol[] = [];
1417314173
let name = symbol.name;
1417414174
forEach(getSymbolLinks(symbol).containingType.types, t => {
14175-
symbols.push(getPropertyOfType(t, name));
14175+
let symbol = getPropertyOfType(t, name);
14176+
if (symbol) {
14177+
symbols.push(symbol);
14178+
}
1417614179
});
1417714180
return symbols;
1417814181
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
//// type MixinCtor<A, B> = new () => A & B & { constructor: MixinCtor<A, B> };
4+
//// function merge<A, B>(a: { prototype: A }, b: { prototype: B }): MixinCtor<A, B> {
5+
//// let merged = function() { }
6+
//// Object.assign(merged.prototype, a.prototype, b.prototype);
7+
//// return <MixinCtor<A, B>><any>merged;
8+
//// }
9+
////
10+
//// class TreeNode {
11+
//// value: any;
12+
//// }
13+
////
14+
//// abstract class LeftSideNode extends TreeNode {
15+
//// abstract right(): TreeNode;
16+
//// left(): TreeNode {
17+
//// return null;
18+
//// }
19+
//// }
20+
////
21+
//// abstract class RightSideNode extends TreeNode {
22+
//// abstract left(): TreeNode;
23+
//// right(): TreeNode {
24+
//// return null;
25+
//// };
26+
//// }
27+
////
28+
//// var obj = new (merge(LeftSideNode, RightSideNode))();
29+
//// obj./**/
30+
31+
goTo.marker();
32+
verify.completionListContains("left");
33+
verify.completionListContains("right");

0 commit comments

Comments
 (0)