File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
tests/cases/conformance/es6/classDeclaration Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -1511,6 +1511,9 @@ namespace ts {
1511
1511
return undefined;
1512
1512
}
1513
1513
}
1514
+ else if (name.kind === SyntaxKind.ParenthesizedExpression) {
1515
+ return getSymbolOfNode(name.expression);
1516
+ }
1514
1517
else {
1515
1518
Debug.fail("Unknown entity name kind.");
1516
1519
}
@@ -21069,7 +21072,6 @@ namespace ts {
21069
21072
21070
21073
if (isHeritageClauseElementIdentifier(<EntityName>entityName)) {
21071
21074
let meaning = SymbolFlags.None;
21072
-
21073
21075
// In an interface or class, we're definitely interested in a type.
21074
21076
if (entityName.parent.kind === SyntaxKind.ExpressionWithTypeArguments) {
21075
21077
meaning = SymbolFlags.Type;
@@ -21084,9 +21086,13 @@ namespace ts {
21084
21086
}
21085
21087
21086
21088
meaning |= SymbolFlags.Alias;
21087
- return resolveEntityName(<EntityName>entityName, meaning);
21089
+ const entityNameSymbol = resolveEntityName(<EntityName>entityName, meaning);
21090
+ if (entityNameSymbol) {
21091
+ return entityNameSymbol;
21092
+ }
21088
21093
}
21089
- else if (isPartOfExpression(entityName)) {
21094
+
21095
+ if (isPartOfExpression(entityName)) {
21090
21096
if (nodeIsMissing(entityName)) {
21091
21097
// Missing entity name.
21092
21098
return undefined;
Original file line number Diff line number Diff line change @@ -1395,7 +1395,7 @@ namespace ts {
1395
1395
multiLine ?: boolean ;
1396
1396
}
1397
1397
1398
- export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression ;
1398
+ export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression ;
1399
1399
export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression ;
1400
1400
1401
1401
export interface PropertyAccessExpression extends MemberExpression , Declaration {
Original file line number Diff line number Diff line change
1
+ interface I { }
2
+ interface CTor {
3
+ new ( hour : number , minute : number ) : I
4
+ }
5
+ var x : {
6
+ B : CTor
7
+ } ;
8
+ class B { }
9
+ function foo ( ) {
10
+ return { B : B } ;
11
+ }
12
+ class C extends ( foo ( ) ) . B { }
You can’t perform that action at this time.
0 commit comments