Skip to content

Commit 57b54c9

Browse files
committed
Ignore valueDeclaration in getDeclarationModifierFlagsFromSymbol for ReverseMapped types
1 parent a0804b5 commit 57b54c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler/utilities.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7539,13 +7539,14 @@ export function getCheckFlags(symbol: Symbol): CheckFlags {
75397539

75407540
/** @internal */
75417541
export function getDeclarationModifierFlagsFromSymbol(s: Symbol, isWrite = false): ModifierFlags {
7542-
if (s.valueDeclaration) {
7542+
const checkFlags = getCheckFlags(s);
7543+
if (!(checkFlags & CheckFlags.ReverseMapped) && s.valueDeclaration) {
75437544
const declaration = (isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration))
75447545
|| (s.flags & SymbolFlags.GetAccessor && find(s.declarations, isGetAccessorDeclaration)) || s.valueDeclaration;
75457546
const flags = getCombinedModifierFlags(declaration);
75467547
return s.parent && s.parent.flags & SymbolFlags.Class ? flags : flags & ~ModifierFlags.AccessibilityModifier;
75477548
}
7548-
if (getCheckFlags(s) & CheckFlags.Synthetic) {
7549+
if (checkFlags & CheckFlags.Synthetic) {
75497550
// NOTE: potentially unchecked cast to TransientSymbol
75507551
const checkFlags = (s as TransientSymbol).links.checkFlags;
75517552
const accessModifier = checkFlags & CheckFlags.ContainsPrivate ? ModifierFlags.Private :

0 commit comments

Comments
 (0)