Skip to content

Commit 9a620bf

Browse files
committed
Actually merge from master
1 parent d111a0f commit 9a620bf

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8156,23 +8156,12 @@ namespace ts {
81568156
return type;
81578157
}
81588158
const declaration = localOrExportSymbol.valueDeclaration;
8159-
<<<<<<< HEAD
8160-
const defaultsToDeclaredType = !strictNullChecks || type.flags & TypeFlags.Any || !declaration ||
8161-
declaration.kind === SyntaxKind.Parameter || isInAmbientContext(declaration) ||
8162-
getContainingFunctionOrModule(declaration) !== getContainingFunctionOrModule(node);
8163-
if (defaultsToDeclaredType && type.flags & TypeFlags.NotNarrowable) {
8164-
return type;
8165-
}
8166-
const flowType = getFlowTypeOfReference(node, type, defaultsToDeclaredType ? type : undefinedType);
8167-
if (strictNullChecks && !(type.flags & TypeFlags.Any) && !(getNullableKind(type) & TypeFlags.Undefined) && getNullableKind(flowType) & TypeFlags.Undefined) {
8168-
=======
81698159
const includeOuterFunctions = isReadonlySymbol(localOrExportSymbol);
81708160
const assumeInitialized = !strictNullChecks || (type.flags & TypeFlags.Any) !== 0 || !declaration ||
81718161
getRootDeclaration(declaration).kind === SyntaxKind.Parameter || isInAmbientContext(declaration) ||
81728162
!isDeclarationIncludedInFlow(node, declaration, includeOuterFunctions);
81738163
const flowType = getFlowTypeOfReference(node, type, assumeInitialized, includeOuterFunctions);
81748164
if (!assumeInitialized && !(getNullableKind(type) & TypeFlags.Undefined) && getNullableKind(flowType) & TypeFlags.Undefined) {
8175-
>>>>>>> master
81768165
error(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol));
81778166
// Return the declared type to reduce follow-on errors
81788167
return type;

0 commit comments

Comments
 (0)