Properly preserve CheckFlags.Readonly when widening properties

This commit is contained in:
Anders Hejlsberg
2019-06-11 09:25:00 -07:00
parent d023427226
commit 3a1fb1bea6

View File

@@ -14630,7 +14630,7 @@ namespace ts {
}
function createSymbolWithType(source: Symbol, type: Type | undefined) {
const symbol = createSymbol(source.flags, source.escapedName);
const symbol = createSymbol(source.flags, source.escapedName, getCheckFlags(source) & CheckFlags.Readonly);
symbol.declarations = source.declarations;
symbol.parent = source.parent;
symbol.type = type;