Skip to content

Commit 56d0424

Browse files
committed
add commnet
1 parent 0bcbbbd commit 56d0424

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17107,6 +17107,8 @@ namespace ts {
1710717107
});
1710817108
// A protected property is accessible if the property is within the declaring class or classes derived from it
1710917109
if (!enclosingClass) {
17110+
// allow PropertyAccessibility if context is in function with this parameter
17111+
// static member access is disallow
1711017112
let thisParameter: ParameterDeclaration | undefined;
1711117113
const thisContainer = getThisContainer(node, /* includeArrowFunctions */ false);
1711217114
if (flags & ModifierFlags.Static || !thisContainer || !isFunctionLike(thisContainer) || !(thisParameter = getThisParameter(thisContainer)) || !thisParameter.type) {

0 commit comments

Comments
 (0)