Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b321d50

Browse filesBrowse files
committed
Sub-subclasses can access protected constructor
1 parent e3fb305 commit b321d50
Copy full SHA for b321d50

1 file changed

+3-2Lines changed: 3 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/compiler/checker.ts‎

Copy file name to clipboardExpand all lines: src/compiler/checker.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13467,13 +13467,14 @@ namespace ts {
1346713467
const containingClass = getContainingClass(node);
1346813468
if (containingClass) {
1346913469
const containingType = getTypeOfNode(containingClass);
13470-
const baseTypes = getBaseTypes(<InterfaceType>containingType);
13471-
if (baseTypes.length) {
13470+
let baseTypes = getBaseTypes(containingType as InterfaceType);
13471+
while (baseTypes.length) {
1347213472
const baseType = baseTypes[0];
1347313473
if (modifiers & ModifierFlags.Protected &&
1347413474
baseType.symbol === declaration.parent.symbol) {
1347513475
return true;
1347613476
}
13477+
baseTypes = getBaseTypes(baseType as InterfaceType);
1347713478
}
1347813479
}
1347913480
if (modifiers & ModifierFlags.Private) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.