diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9a64dce125591..35f39ec413fcf 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -30,6 +30,8 @@ namespace ts { (preserveConstEnums && moduleState === ModuleInstanceState.ConstEnumOnly); } + let nextCheckerId = 0; + export function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker { const getPackagesSet: () => Map = memoize(() => { const set = createMap(); @@ -71,6 +73,7 @@ namespace ts { const emptySymbols = createSymbolTable(); const identityMapper: (type: Type) => Type = identity; + const checkerId = ++nextCheckerId; const compilerOptions = host.getCompilerOptions(); const languageVersion = getEmitScriptTarget(compilerOptions); @@ -379,8 +382,84 @@ namespace ts { }, getLocalTypeParametersOfClassOrInterfaceOrTypeAlias, + getDiagnosticRenderingContext: flags => { + const typeFormatFlags = getTypeFormatFlagsFromRenderFlags(flags); + const textWriter = getSpanAwareTextWriter(); + return { + typeToString: (type, symbolOffset) => { + textWriter.setSpanOffsetPos(symbolOffset); + textWriter.clear(); + return typeToString(type, /*enclosingDeclaration*/ undefined, typeFormatFlags, textWriter); + }, + symbolToString: (symbol, symbolOffset) => { + textWriter.setSpanOffsetPos(symbolOffset); + textWriter.clear(); + return symbolToString(symbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined, /*flags*/ undefined, textWriter); + }, + getPendingAnnotationSpans: () => { + return textWriter.getPendingAnnotationSpans(); + } + }; + }, + id: checkerId, + getExpandedReveal: revealId => { + const reveal = revealSpans[revealId]; + if (!reveal) { + return undefined; + } + return reveal(); + } }; + type SpanAwareTextWriter = EmitTextWriter & { getPendingAnnotationSpans(): AnnotationSpan[] | undefined; setSpanOffsetPos(offset: number): void }; + + function getSpanAwareTextWriter() { + let spans: AnnotationSpan[] | undefined; + let offset = 0; + const captureSymbolSpan = (original: string, symbol: Symbol): string => { + (spans || (spans = [])).push({ kind: "symbol", symbol, start: offset + typeWriter.getTextPos(), length: original.length }); + return original; + }; + const captureExpansionSpan = (start: number, length: number, printCallback: (writer: EmitTextWriter) => string) => { + (spans || (spans = [])).push(registerExpansionCallback(start + offset, length, printCallback)); + }; + const typeWriter = createTextWriter("", captureSymbolSpan, captureExpansionSpan) as SpanAwareTextWriter; + typeWriter.getPendingAnnotationSpans = () => { + const result = spans; + spans = undefined; + return result; + }; + typeWriter.setSpanOffsetPos = newOffset => void (offset = newOffset); + return typeWriter; + } + + let revealId = 0; + const revealSpans: (() => RevealedResult)[] = []; + function registerExpansionCallback(start: number, length: number, printCallback: (writer: EmitTextWriter) => string): RevealSpan { + const span: RevealSpan = { + kind: "reveal", + start, + length, + id: revealId++, + checker: checkerId, + callback: () => { + const writer = getSpanAwareTextWriter(); + const text = printCallback(writer); + return { text, annotations: writer.getPendingAnnotationSpans() }; + } + }; + revealSpans[span.id] = span.callback; + + return span; + } + + function getTypeFormatFlagsFromRenderFlags(flags: DiagnosticRendererFlags) { + // Setting a flag disables the default `TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope` flags + // This is _usually_ an oversight, but the current output is captured in our baselines. + return flags & DiagnosticRendererFlags.UseFullyQualifiedTypes ? TypeFormatFlags.UseFullyQualifiedType : undefined; + } + const chainDiagnosticMessages: (flags: DiagnosticRendererFlags, details: DiagnosticMessageChain | undefined, message: DiagnosticMessage, ...args: (string | number | Type | Symbol | undefined)[]) => DiagnosticMessageChain = (flags, message, ...args) => chainRenderedDiagnosticMessages(checker, flags, message, ...args); + function getResolvedSignatureWorker(nodeIn: CallLikeExpression, candidatesOutArray: Signature[] | undefined, argumentCount: number | undefined, checkMode: CheckMode): Signature | undefined { const node = getParseTreeNode(nodeIn, isCallLikeExpression); apparentArgumentCount = argumentCount; @@ -2537,16 +2616,19 @@ namespace ts { const errorInfo = !isExternalModuleNameRelative(moduleReference) && packageId ? typesPackageExists(packageId.name) ? chainDiagnosticMessages( + DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1, packageId.name, mangleScopedPackageName(packageId.name)) : chainDiagnosticMessages( + DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference, mangleScopedPackageName(packageId.name)) : undefined; errorOrSuggestion(isError, errorNode, chainDiagnosticMessages( + DiagnosticRendererFlags.None, errorInfo, Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, @@ -3383,13 +3465,38 @@ namespace ts { } } + function getExpansionSpanAwarePrinter(writer: EmitTextWriter, sourceFile: SourceFile | undefined) { + const options = { removeComments: true }; + const handlers: PrintHandlers | undefined = writer.writeExpansionSpan ? { + onEmitNode: (hint, node, emit) => { + if (!node) { + return emit(hint, node); + } + const expansionCb = getExpansionCallback(node); + if (!expansionCb) { + return emit(hint, node); + } + const start = writer.getTextPos(); + const result = emit(hint, node); + const length = writer.getTextPos() - start; + const printCb = (writer: EmitTextWriter) => { + const printer = getExpansionSpanAwarePrinter(writer, sourceFile); + printer.writeNode(EmitHint.Unspecified, expansionCb(), sourceFile, writer); + return writer.getText(); + }; + writer.writeExpansionSpan!(start, length, printCb); + return result; + } + } : undefined; + return createPrinter(options, handlers); + } + function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer: EmitTextWriter = createTextWriter("")): string { const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation; const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : 0), writer); if (typeNode === undefined) return Debug.fail("should always get typenode"); - const options = { removeComments: true }; - const printer = createPrinter(options); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); + const printer = getExpansionSpanAwarePrinter(writer, sourceFile); printer.writeNode(EmitHint.Unspecified, typeNode, /*sourceFile*/ sourceFile, writer); const result = writer.getText(); @@ -3999,7 +4106,10 @@ namespace ts { context.flags |= propertyIsReverseMapped ? NodeBuilderFlags.InReverseMappedType : 0; let propertyTypeNode: TypeNode; if (propertyIsReverseMapped && !!(savedFlags & NodeBuilderFlags.InReverseMappedType)) { - propertyTypeNode = createElidedInformationPlaceholder(context); + const contextCopy = cloneContextForExpansion(context); + propertyTypeNode = setExpansionCallback(createElidedInformationPlaceholder(context), () => + typeToTypeNodeHelper(getTypeOfSymbol(propertySymbol), contextCopy) + ); } else { propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType, context) : createKeywordTypeNode(SyntaxKind.AnyKeyword); @@ -4024,6 +4134,22 @@ namespace ts { } } + /** + * Clones the enclosing declaration and flags of the context + */ + function cloneContextForExpansion(context: NodeBuilderContext): NodeBuilderContext { + return { + enclosingDeclaration: context.enclosingDeclaration, + flags: context.flags, + approximateLength: 0, + encounteredError: false, + visitedTypes: undefined, + tracker: context.tracker, + symbolDepth: undefined, + inferTypeParameters: context.inferTypeParameters + }; + } + function mapToTypeNodes(types: ReadonlyArray | undefined, context: NodeBuilderContext, isBareList?: boolean): TypeNode[] | undefined { if (some(types)) { if (checkTruncationLength(context)) { @@ -6661,7 +6787,7 @@ namespace ts { */ function getPropertyNameFromType(type: StringLiteralType | NumberLiteralType | UniqueESSymbolType): __String { if (type.flags & TypeFlags.UniqueESSymbol) { - return (type).escapedName; + return `__@${type.symbol.escapedName}@${getSymbolId(type.symbol)}` as __String; } if (type.flags & (TypeFlags.StringLiteral | TypeFlags.NumberLiteral)) { return escapeLeadingUnderscores("" + (type).value); @@ -10814,7 +10940,6 @@ namespace ts { function createUniqueESSymbolType(symbol: Symbol) { const type = createType(TypeFlags.UniqueESSymbol); type.symbol = symbol; - type.escapedName = `__@${type.symbol.escapedName}@${getSymbolId(type.symbol)}` as __String; return type; } @@ -12331,9 +12456,13 @@ namespace ts { } return result !== Ternary.False; - function reportError(message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): void { + function reportError(message: DiagnosticMessage, arg0?: string | number | Type | Symbol, arg1?: string | number | Type | Symbol, arg2?: string | number | Type | Symbol, arg3?: string | number | Type | Symbol): void { + return reportErrorWithFlags(DiagnosticRendererFlags.None, message, arg0, arg1, arg2, arg3); + } + + function reportErrorWithFlags(flags: DiagnosticRendererFlags, message: DiagnosticMessage, arg0?: string | number | Type | Symbol, arg1?: string | number | Type | Symbol, arg2?: string | number | Type | Symbol, arg3?: string | number | Type | Symbol): void { Debug.assert(!!errorNode); - errorInfo = chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2, arg3); + errorInfo = chainDiagnosticMessages(flags, errorInfo, message, arg0, arg1, arg2, arg3); } function associateRelatedInfo(info: DiagnosticRelatedInformation) { @@ -12346,19 +12475,24 @@ namespace ts { } } - function reportRelationError(message: DiagnosticMessage | undefined, source: Type, target: Type) { - const [sourceType, targetType] = getTypeNamesForErrorDisplay(source, target); + function getDiagnosticRendererFlagsForPair(source: Type, target: Type) { + return typeToString(source) === typeToString(target) ? DiagnosticRendererFlags.UseFullyQualifiedTypes : DiagnosticRendererFlags.None; + } + function reportRelationError(message: DiagnosticMessage | undefined, source: Type, target: Type) { + const flags = getDiagnosticRendererFlagsForPair(source, target); if (target.flags & TypeFlags.TypeParameter && target.immediateBaseConstraint !== undefined && isTypeAssignableTo(source, target.immediateBaseConstraint)) { - reportError( + reportErrorWithFlags( + flags, Diagnostics._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2, - sourceType, - targetType, - typeToString(target.immediateBaseConstraint), + source, + target, + target.immediateBaseConstraint, ); } if (!message) { + const [sourceType, targetType] = getTypeNamesForErrorDisplay(source, target); if (relation === comparableRelation) { message = Diagnostics.Type_0_is_not_comparable_to_type_1; } @@ -12370,18 +12504,15 @@ namespace ts { } } - reportError(message, sourceType, targetType); + reportErrorWithFlags(flags, message, source, target); } function tryElaborateErrorsForPrimitivesAndObjects(source: Type, target: Type) { - const sourceType = typeToString(source); - const targetType = typeToString(target); - if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) { - reportError(Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); + reportError(Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, target, source); } } @@ -13512,7 +13643,13 @@ namespace ts { } if (props.length === 1) { const propName = symbolToString(unmatchedProperty); - reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source, target)); + reportErrorWithFlags( + getDiagnosticRendererFlagsForPair(source, target), + Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, + propName, + source, + target + ); if (length(unmatchedProperty.declarations)) { associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName)); } @@ -20222,28 +20359,28 @@ namespace ts { if (containingType.flags & TypeFlags.Union && !(containingType.flags & TypeFlags.Primitive)) { for (const subtype of (containingType as UnionType).types) { if (!getPropertyOfType(subtype, propNode.escapedText)) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); break; } } } if (typeHasStaticProperty(propNode.escapedText, containingType)) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_is_a_static_member_of_type_1, declarationNameToString(propNode), typeToString(containingType)); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, Diagnostics.Property_0_is_a_static_member_of_type_1, declarationNameToString(propNode), typeToString(containingType)); } else { const promisedType = getPromisedTypeOfPromise(containingType); if (promisedType && getPropertyOfType(promisedType, propNode.escapedText)) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await, declarationNameToString(propNode), typeToString(containingType)); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await, declarationNameToString(propNode), typeToString(containingType)); } else { const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType); if (suggestion !== undefined) { const suggestedName = symbolName(suggestion); - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, declarationNameToString(propNode), typeToString(containingType), suggestedName); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, declarationNameToString(propNode), typeToString(containingType), suggestedName); relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName); } else { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(containingType)); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(containingType)); } } } @@ -20864,7 +21001,7 @@ namespace ts { Debug.assert(typeParameters[i] !== undefined, "Should not call checkTypeArguments with too many type arguments"); const constraint = getConstraintOfTypeParameter(typeParameters[i]); if (constraint) { - const errorInfo = reportErrors && headMessage ? (() => chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Type_0_does_not_satisfy_the_constraint_1)) : undefined; + const errorInfo = reportErrors && headMessage ? (() => chainDiagnosticMessages(DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.Type_0_does_not_satisfy_the_constraint_1)) : undefined; const typeArgumentHeadMessage = headMessage || Diagnostics.Type_0_does_not_satisfy_the_constraint_1; if (!mapper) { mapper = createTypeMapper(typeParameters, typeArgumentTypes); @@ -21879,8 +22016,8 @@ namespace ts { const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); if (!callSignatures.length) { - let errorInfo = chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures, typeToString(apparentType)); - errorInfo = chainDiagnosticMessages(errorInfo, headMessage); + let errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures, typeToString(apparentType)); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, headMessage); const diag = createDiagnosticForNodeFromMessageChain(node, errorInfo); diagnostics.add(diag); invocationErrorRecovery(apparentType, SignatureKind.Call, diag); @@ -24485,7 +24622,7 @@ namespace ts { error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { - const leadingError = () => chainDiagnosticMessages(/*details*/ undefined, Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type); + const leadingError = () => chainDiagnosticMessages(DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type); checkTypeAssignableTo(typePredicate.type, getTypeOfSymbol(signature.parameters[typePredicate.parameterIndex]), node.type, @@ -25807,6 +25944,7 @@ namespace ts { case SyntaxKind.Parameter: expectedReturnType = voidType; errorInfo = chainDiagnosticMessages( + DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); @@ -25815,6 +25953,7 @@ namespace ts { case SyntaxKind.PropertyDeclaration: expectedReturnType = voidType; errorInfo = chainDiagnosticMessages( + DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; @@ -27979,6 +28118,7 @@ namespace ts { const baseProp = getPropertyOfType(baseWithThis, declaredProp.escapedName); if (prop && baseProp) { const rootChain = () => chainDiagnosticMessages( + DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2, symbolToString(declaredProp), @@ -28135,8 +28275,8 @@ namespace ts { const typeName1 = typeToString(existing.containingType); const typeName2 = typeToString(base); - let errorInfo = chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2); - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); + let errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, /*details*/ undefined, Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2); + errorInfo = chainDiagnosticMessages(DiagnosticRendererFlags.None, errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); diagnostics.add(createDiagnosticForNodeFromMessageChain(typeNode, errorInfo)); } } diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 517ebacb89dfb..8d17e3aa8febe 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -3207,6 +3207,21 @@ namespace ts { return node; } + /** + * Sets a callback to use to expand an ellision node (eg, ...) with a more complete node tree + */ + /*@internal*/ + export function setExpansionCallback(node: T, expansionCb: EmitNode["expansion"]) { + getOrCreateEmitNode(node).expansion = expansionCb; + return node; + } + + /*@internal*/ + export function getExpansionCallback(node: Node) { + const emitNode = node.emitNode; + return emitNode && emitNode.expansion; + } + /** * Gets a custom text range to use when emitting comments. */ diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 8761cc0a08774..dedf296f50b92 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -1,6 +1,6 @@ namespace ts { /* @internal */ - export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void; + export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: (string | number)[]): void; export function trace(host: ModuleResolutionHost): void { host.trace!(formatMessage.apply(undefined, arguments)); } @@ -133,7 +133,7 @@ namespace ts { if (fileName === undefined) return; const path = normalizePath(combinePaths(baseDirectory, fileName)); if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path); + trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName!, path); } return path; } @@ -279,7 +279,7 @@ namespace ts { trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, typeReferenceDirectiveName); } else { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, typeReferenceDirectiveName, typeRoots); + trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, typeReferenceDirectiveName, String(typeRoots)); } } else { @@ -287,7 +287,7 @@ namespace ts { trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, typeReferenceDirectiveName, containingFile); } else { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, typeReferenceDirectiveName, containingFile, typeRoots); + trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, typeReferenceDirectiveName, containingFile, String(typeRoots)); } } if (redirectedReference) { @@ -307,7 +307,7 @@ namespace ts { const { fileName, packageId } = resolved; const resolvedFileName = options.preserveSymlinks ? fileName : realPath(fileName, host, traceEnabled); if (traceEnabled) { - trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFileName, primary); + trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFileName, String(primary)); } resolvedTypeReferenceDirective = { primary, resolvedFileName, packageId, isExternalLibraryImport: pathContainsNodeModules(fileName) }; } @@ -796,7 +796,7 @@ namespace ts { (matchedNormalizedPrefix === undefined || matchedNormalizedPrefix.length < normalizedRoot.length); if (state.traceEnabled) { - trace(state.host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix); + trace(state.host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, String(isLongestMatchingPrefix)); } if (isLongestMatchingPrefix) { @@ -1506,7 +1506,7 @@ namespace ts { export function loadModuleFromGlobalCache(moduleName: string, projectName: string | undefined, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string): ResolvedModuleWithFailedLookupLocations { const traceEnabled = isTraceEnabled(compilerOptions, host); if (traceEnabled) { - trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); + trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName === undefined ? "unnamed project" : projectName, moduleName, globalCache); } const failedLookupLocations: string[] = []; const state: ModuleResolutionState = { compilerOptions, host, traceEnabled, failedLookupLocations }; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 2fda6ea49a55f..c481dc5574167 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -502,6 +502,34 @@ namespace ts { return output; } + /* @internal */ + export function flattenDiagnosticAnnotationSpans(spans: AnnotationSpan[] | DiagnosticMessageChain | undefined, newLine: string): AnnotationSpan[] | undefined { + if (!spans || isArray(spans)) { + return spans; + } + let results: AnnotationSpan[] | undefined; + let diagnosticChain: DiagnosticMessageChain | undefined = spans; + let offset = 0; + + let indent = 0; + while (diagnosticChain) { + if (indent) { + offset += newLine.length; + + for (let i = 0; i < indent; i++) { + offset += " ".length; + } + } + if (diagnosticChain.annotations) { + results = concatenate(results, map(diagnosticChain.annotations, d => ({ ...d, start: d.start + offset }))); + } + offset += diagnosticChain.messageText.length; + indent++; + diagnosticChain = diagnosticChain.next; + } + return results; + } + export function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain | undefined, newLine: string): string { if (isString(messageText)) { return messageText; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 75fb702609b70..53857ad729b5f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3319,6 +3319,51 @@ namespace ts { runWithCancellationToken(token: CancellationToken, cb: (checker: TypeChecker) => T): T; /* @internal */ getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol: Symbol): ReadonlyArray | undefined; + + /* @internal */ getDiagnosticRenderingContext(flags: DiagnosticRendererFlags): DiagnosticRenderContext; + + id: number; + + getExpandedReveal(id: number): RevealedResult | undefined; + } + + + /** @internal */ + export enum DiagnosticRendererFlags { + None = 0, + UseFullyQualifiedTypes = 1 << 0, + } + + export type AnnotationSpan = SymbolSpan | RevealSpan; + + export interface AnnotationSpanBase { + kind: AnnotationSpan["kind"]; + start: number; + length: number; + } + + export interface SymbolSpan extends AnnotationSpanBase { + kind: "symbol"; + symbol: Symbol; + } + + export interface RevealedResult { + text: string; + annotations?: AnnotationSpan[]; + } + + export interface RevealSpan extends AnnotationSpanBase { + kind: "reveal"; + id: number; + checker: number; + callback: () => RevealedResult; + } + + /** @internal */ + export interface DiagnosticRenderContext { + typeToString(type: Type, symbolOffset: number): string; + symbolToString(symbol: Symbol, symbolOffset: number): string; + getPendingAnnotationSpans(): AnnotationSpan[] | undefined; } /* @internal */ @@ -4009,6 +4054,8 @@ namespace ts { restrictiveInstantiation?: Type; // Instantiation with type parameters mapped to unconstrained form /* @internal */ immediateBaseConstraint?: Type; // Immediate base constraint cache + /* @internal */ + escapedName?: undefined; // Never set } /* @internal */ @@ -4043,8 +4090,8 @@ namespace ts { // Unique symbol types (TypeFlags.UniqueESSymbol) export interface UniqueESSymbolType extends Type { + __uniqueESSymbolBrand: any; symbol: Symbol; - escapedName: __String; } export interface StringLiteralType extends LiteralType { @@ -4547,6 +4594,7 @@ namespace ts { */ export interface DiagnosticMessageChain { messageText: string; + annotations?: AnnotationSpan[]; category: DiagnosticCategory; code: number; next?: DiagnosticMessageChain; @@ -4565,6 +4613,7 @@ namespace ts { start: number | undefined; length: number | undefined; messageText: string | DiagnosticMessageChain; + annotations?: AnnotationSpan[]; } export interface DiagnosticWithLocation extends Diagnostic { file: SourceFile; @@ -5260,6 +5309,7 @@ namespace ts { externalHelpersModuleName?: Identifier; // The local name for an imported helpers module helpers?: EmitHelper[]; // Emit helpers for the node startsOnNewLine?: boolean; // If the node should begin on a new line + expansion?: () => Node; // A callback that returns a node tree representing an expansion of this node tree } export const enum EmitFlags { @@ -5804,6 +5854,7 @@ namespace ts { getIndent(): number; isAtStartOfLine(): boolean; getTextPosWithWriteLine?(): number; + writeExpansionSpan?(start: number, length: number, printCallback: (writer: EmitTextWriter) => string): void; } export interface GetEffectiveTypeRootsHost { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 45dc980296be7..a8b5c14dda2ef 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -865,7 +865,8 @@ namespace ts { code: messageChain.code, category: messageChain.category, messageText: messageChain.next ? messageChain : messageChain.messageText, - relatedInformation + relatedInformation, + ...(!messageChain.next && messageChain.annotations ? { annotations: messageChain.annotations } : {}) }; } @@ -3194,7 +3195,7 @@ namespace ts { return indentStrings[1].length; } - export function createTextWriter(newLine: string): EmitTextWriter { + export function createTextWriter(newLine: string, writeSymbol?: ((t: string, s: Symbol) => string), writeExpansionSpan?: EmitTextWriter["writeExpansionSpan"]): EmitTextWriter { let output: string; let indent: number; let lineStart: boolean; @@ -3285,10 +3286,11 @@ namespace ts { writePunctuation: write, writeSpace: write, writeStringLiteral: write, - writeSymbol: (s, _) => write(s), + writeSymbol: (s, _) => write(writeSymbol ? writeSymbol(s, _) : s), writeTrailingSemicolon: write, writeComment: write, - getTextPosWithWriteLine + getTextPosWithWriteLine, + writeExpansionSpan }; } @@ -7107,8 +7109,27 @@ namespace ts { getSourceMapSourceConstructor: () => SourceMapSource, }; - export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0): string { - return text.replace(/{(\d+)}/g, (_match, index: string) => "" + Debug.assertDefined(args[+index + baseIndex])); + function renderForOutput(arg: string | number | Type | Symbol, renderContext: DiagnosticRenderContext | undefined, offset: number) { + Debug.assertDefined(arg); + if (typeof arg === "string" || typeof arg === "number") { + return arg; + } + if (!renderContext) { + return Debug.fail("Type or symbol passed into diagnostic rendering pipeline with no renderer provided."); + } + if (arg.escapedName) { + return renderContext.symbolToString(arg, offset); + } + return renderContext.typeToString(arg as Type, offset); + } + + export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0, renderContext?: DiagnosticRenderContext): string { + let offsetAdjustmentFromReplacement = 0; + return text.replace(/{(\d+)}/g, (match: string, index: string, offset: number) => { + const text = "" + renderForOutput(args[+index + baseIndex], renderContext, offset + offsetAdjustmentFromReplacement); + offsetAdjustmentFromReplacement += text.length - match.length; + return text; + }); } export let localizedDiagnosticMessages: MapLike | undefined; @@ -7176,6 +7197,30 @@ namespace ts { }; } + export function createRenderedCompilerDiagnostic(checker: TypeChecker, flags: DiagnosticRendererFlags, message: DiagnosticMessage, ...args: (string | number | Type | Symbol | undefined)[]): Diagnostic; + export function createRenderedCompilerDiagnostic(checker: TypeChecker, flags: DiagnosticRendererFlags, message: DiagnosticMessage): Diagnostic { + let text = getLocaleSpecificMessage(message); + let spans: AnnotationSpan[] | undefined; + + if (arguments.length > 3) { + const ctx = checker.getDiagnosticRenderingContext(flags); + text = formatStringFromArgs(text, arguments, 3, ctx); + spans = ctx.getPendingAnnotationSpans(); + } + + return { + file: undefined, + start: undefined, + length: undefined, + + messageText: text, + category: message.category, + code: message.code, + reportsUnnecessary: message.reportsUnnecessary, + ...(typeof spans === "undefined" ? {} : { annotations: spans }) + }; + } + export function createCompilerDiagnosticFromMessageChain(chain: DiagnosticMessageChain): Diagnostic { return { file: undefined, @@ -7205,6 +7250,27 @@ namespace ts { }; } + export function chainRenderedDiagnosticMessages(checker: TypeChecker, flags: DiagnosticRendererFlags, details: DiagnosticMessageChain | undefined, message: DiagnosticMessage, ...args: (string | number | Type | Symbol | undefined)[]): DiagnosticMessageChain; + export function chainRenderedDiagnosticMessages(checker: TypeChecker, flags: DiagnosticRendererFlags, details: DiagnosticMessageChain | undefined, message: DiagnosticMessage): DiagnosticMessageChain { + let text = getLocaleSpecificMessage(message); + let spans: AnnotationSpan[] | undefined; + + if (arguments.length > 4) { + const ctx = checker.getDiagnosticRenderingContext(flags); + text = formatStringFromArgs(text, arguments, 4, ctx); + spans = ctx.getPendingAnnotationSpans(); + } + + return { + messageText: text, + category: message.category, + code: message.code, + + next: details, + ...(typeof spans === "undefined" ? {} : { annotations: spans }) + }; + } + export function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): DiagnosticMessageChain { let lastChain = headChain; while (lastChain.next) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index f03103d023938..a8e3b7c07cdd0 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -993,7 +993,19 @@ namespace Harness { }; function outputErrorText(error: ts.Diagnostic) { - const message = ts.flattenDiagnosticMessageText(error.messageText, IO.newLine()); + let message = ts.flattenDiagnosticMessageText(error.messageText, IO.newLine()); + const annotations = ts.flattenDiagnosticAnnotationSpans(typeof error.messageText !== "string" ? error.messageText : error.annotations, IO.newLine()); + if (annotations) { + let totalOffset = 0; + for (let i = 0; i < annotations.length; i++) { + const annotation = annotations[i]; + const start = totalOffset + annotation.start; + const original = message.slice(start, start + annotation.length); + const replacement = `{|${original}|${i}|}`; + totalOffset += replacement.length - original.length; + message = message.slice(0, start) + replacement + message.slice(start + annotation.length); + } + } const errLines = utils.removeTestPathPrefixes(message) .split("\n") @@ -1005,6 +1017,12 @@ namespace Harness { errLines.push(`!!! related TS${info.code}${info.file ? " " + ts.formatLocation(info.file, info.start!, formatDiagnsoticHost, ts.identity) : ""}: ${ts.flattenDiagnosticMessageText(info.messageText, IO.newLine())}`); } } + if (annotations) { + for (let i = 0; i < annotations.length; i++) { + const annotation = annotations[i]; + errLines.push(`!!! annotated ${formatAnnotationForBaseline(annotation, i)}`); + } + } errLines.forEach(e => outputLines += (newLine() + e)); errorsReported++; @@ -1119,6 +1137,24 @@ namespace Harness { // Verify we didn't miss any errors in total assert.equal(totalErrorsReportedInNonLibraryFiles + numLibraryDiagnostics + numTest262HarnessDiagnostics, diagnostics.length, "total number of errors"); + + function formatAnnotationForBaseline(annotation: ts.AnnotationSpan, index: number) { + const protocolSpan = ts.server.convertAnnotationSpanToDiagnosticAnnotationSpan(annotation); + if (!protocolSpan) { + return `dropped!: ${index}`; + } + switch (annotation.kind) { + case "symbol": + const p = protocolSpan as ts.server.protocol.DiagnosticSymbolSpan; + const file = ts.getSourceFileOfNode(annotation.symbol.declarations[0]); + return `symbol ${index} ${ts.formatLocation(file, ts.getPositionOfLineAndCharacter(file, p.location.line - 1, p.location.offset - 1), formatDiagnsoticHost, ts.identity)}`; + case "reveal": + // expand reveals once, but never recursively reveal, since some expansions can be infinite + return `reveal ${index}: ${annotation.callback().text}`; + default: + return ts.Debug.assertNever(annotation, "Unhandled annotation kind in harness baseliner"); // TODO: use Debug.assertNever when AnnotationSpan is a union + } + } } export function doErrorBaseline(baselinePath: string, inputFiles: ReadonlyArray, errors: ReadonlyArray, pretty?: boolean) { diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 6bfce902a049b..fc28fab2a9b59 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -832,17 +832,18 @@ namespace ts.server { } /* @internal */ - private forEachProject(cb: (project: Project) => void) { - this.externalProjects.forEach(cb); - this.configuredProjects.forEach(cb); - this.inferredProjects.forEach(cb); + private forEachProject(cb: (project: Project) => T | undefined) { + return forEach(this.externalProjects, cb) || forEach(arrayFrom(this.configuredProjects.values()), cb) || forEach(this.inferredProjects, cb); } /* @internal */ - forEachEnabledProject(cb: (project: Project) => void) { - this.forEachProject(project => { + forEachEnabledProject(cb: (project: Project) => T | undefined) { + return this.forEachProject(project => { if (!project.isOrphan() && project.languageServiceEnabled) { - cb(project); + const result = cb(project); + if (result) { + return result; + } } }); } diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 3da890a766ff7..2ab71c07909b9 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -130,7 +130,8 @@ namespace ts.server.protocol { GetEditsForFileRename = "getEditsForFileRename", /* @internal */ GetEditsForFileRenameFull = "getEditsForFileRename-full", - ConfigurePlugin = "configurePlugin" + ConfigurePlugin = "configurePlugin", + ExpandReveal = "expandReveal" // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. } @@ -478,6 +479,30 @@ namespace ts.server.protocol { /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ reportsUnnecessary?: {}; relatedInformation?: DiagnosticRelatedInformation[]; + /** + * List of spans of the message that have associated information + */ + annotations?: DiagnosticAnnotationSpan[]; + } + + export type DiagnosticAnnotationSpan = DiagnosticSymbolSpan | DiagnosticRevealSpan; + + export interface DiagnosticSpanBase { + kind: DiagnosticAnnotationSpan["kind"]; + start: number; + length: number; + } + + export interface DiagnosticSymbolSpan extends DiagnosticSpanBase { + kind: "symbol"; + file: string; + location: Location; + } + + export interface DiagnosticRevealSpan extends DiagnosticSpanBase { + kind: "reveal"; + id: number; + checker: number; } /** @@ -1395,6 +1420,25 @@ namespace ts.server.protocol { export interface ConfigurePluginResponse extends Response { } + export interface ExpandRevealRequestArguments { + id: number; + checker: number; + } + + export interface ExpandRevealRequest extends Request { + command: CommandTypes.ExpandReveal; + arguments: ExpandRevealRequestArguments; + } + + export interface ExpandRevealResponseBody { + text: string; + annotations?: DiagnosticAnnotationSpan[]; + } + + export interface ExpandRevealResponse extends Response { + body: ExpandRevealResponseBody; + } + /** * Information found in an "open" request. */ @@ -2385,6 +2429,10 @@ namespace ts.server.protocol { * The name of the plugin reporting the message. */ source?: string; + /** + * List of spans of the message that have associated information + */ + annotations?: DiagnosticAnnotationSpan[]; } export interface DiagnosticWithFileName extends Diagnostic { diff --git a/src/server/session.ts b/src/server/session.ts index 3c202c9aecd02..78a83b17336cb 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -44,6 +44,10 @@ namespace ts.server { function formatDiag(fileName: NormalizedPath, project: Project, diag: Diagnostic): protocol.Diagnostic { const scriptInfo = project.getScriptInfoForNormalizedPath(fileName)!; // TODO: GH#18217 + const annotations = mapDefined( + flattenDiagnosticAnnotationSpans(typeof diag.messageText !== "string" ? diag.messageText : diag.annotations, "\n"), + convertAnnotationSpanToDiagnosticAnnotationSpan + ); return { start: scriptInfo.positionToLineOffset(diag.start!), end: scriptInfo.positionToLineOffset(diag.start! + diag.length!), // TODO: GH#18217 @@ -53,6 +57,7 @@ namespace ts.server { reportsUnnecessary: diag.reportsUnnecessary, source: diag.source, relatedInformation: map(diag.relatedInformation, formatRelatedInformation), + ...(length(annotations) ? { annotations } : {}) }; } @@ -882,16 +887,20 @@ namespace ts.server { } private convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics: ReadonlyArray): protocol.DiagnosticWithLinePosition[] { - return diagnostics.map(d => ({ - message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), - start: d.start!, // TODO: GH#18217 - length: d.length!, // TODO: GH#18217 - category: diagnosticCategoryName(d), - code: d.code, - startLocation: (d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start!)))!, // TODO: GH#18217 - endLocation: (d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start! + d.length!)))!, // TODO: GH#18217 - relatedInformation: map(d.relatedInformation, formatRelatedInformation) - })); + return diagnostics.map(d => { + const annotations = mapDefined(flattenDiagnosticAnnotationSpans(typeof d.messageText !== "string" ? d.messageText : d.annotations, this.host.newLine), convertAnnotationSpanToDiagnosticAnnotationSpan); + return { + message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), + start: d.start!, // TODO: GH#18217 + length: d.length!, // TODO: GH#18217 + category: diagnosticCategoryName(d), + code: d.code, + startLocation: (d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start!)))!, // TODO: GH#18217 + endLocation: (d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start! + d.length!)))!, // TODO: GH#18217 + relatedInformation: map(d.relatedInformation, formatRelatedInformation), + ...(length(annotations) ? { annotations } : {}) + }; + }); } private getCompilerOptionsDiagnostics(args: protocol.CompilerOptionsDiagnosticsRequestArgs) { @@ -909,17 +918,21 @@ namespace ts.server { } private convertToDiagnosticsWithLinePosition(diagnostics: ReadonlyArray, scriptInfo: ScriptInfo | undefined): protocol.DiagnosticWithLinePosition[] { - return diagnostics.map(d => { - message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), - start: d.start, - length: d.length, - category: diagnosticCategoryName(d), - code: d.code, - source: d.source, - startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start!), // TODO: GH#18217 - endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start! + d.length!), - reportsUnnecessary: d.reportsUnnecessary, - relatedInformation: map(d.relatedInformation, formatRelatedInformation), + return diagnostics.map(d => { + const annotations = mapDefined(flattenDiagnosticAnnotationSpans(typeof d.messageText !== "string" ? d.messageText : d.annotations, this.host.newLine), convertAnnotationSpanToDiagnosticAnnotationSpan); + return { + message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), + start: d.start!, + length: d.length!, + category: diagnosticCategoryName(d), + code: d.code, + source: d.source, + startLocation: (scriptInfo && scriptInfo.positionToLineOffset(d.start!))!, // TODO: GH#18217 + endLocation: (scriptInfo && scriptInfo.positionToLineOffset(d.start! + d.length!))!, + reportsUnnecessary: d.reportsUnnecessary, + relatedInformation: map(d.relatedInformation, formatRelatedInformation), + ...(length(annotations) ? { annotations } : {}) + }; }); } @@ -2059,6 +2072,28 @@ namespace ts.server { this.projectService.configurePlugin(args); } + private expandReveal(args: protocol.ExpandRevealRequestArguments): protocol.ExpandRevealResponseBody { + const checker = this.projectService.forEachEnabledProject(p => { + const program = p.getLanguageService().getProgram(); + if (!program) return; + // IDs always comes from the diagnostics producing version of the checker + const c = program.getDiagnosticsProducingTypeChecker(); + if (c.id === args.checker) { + return c; + } + }); + if (!checker) { + // TODO: Issue an error response of some kind? + return { text: "..." }; + } + const result = checker.getExpandedReveal(args.id); + if (!result) { + // TODO: Issue an error response of some kind? + return { text: "..." }; + } + return { text: result.text, annotations: mapDefined(result.annotations, convertAnnotationSpanToDiagnosticAnnotationSpan) }; + } + getCanonicalFileName(fileName: string) { const name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); return normalizePath(name); @@ -2414,6 +2449,9 @@ namespace ts.server { this.configurePlugin(request.arguments); this.doOutput(/*info*/ undefined, CommandNames.ConfigurePlugin, request.seq, /*success*/ true); return this.notRequired(); + }, + [CommandNames.ExpandReveal]: (request: protocol.ExpandRevealRequest) => { + return this.requiredResponse(this.expandReveal(request.arguments)); } }); @@ -2546,6 +2584,48 @@ namespace ts.server { return { line: lc.line + 1, offset: lc.character + 1 }; } + /* @internal */ + export function convertAnnotationSpanToDiagnosticAnnotationSpan(span: AnnotationSpan): protocol.DiagnosticAnnotationSpan | undefined { + switch (span.kind) { + case "symbol": + return convertSymbolSpanIntoDiagnosticSymbolSpan(span); + case "reveal": + return convertRevealSpanIntoDiagnosticRevealSpan(span); + default: + return Debug.assertNever(span, "Unconverted annotation kind"); + } + } + + function convertRevealSpanIntoDiagnosticRevealSpan(span: RevealSpan): protocol.DiagnosticRevealSpan { + return { + kind: span.kind, + start: span.start, + length: span.length, + id: span.id, + checker: span.checker + }; // We don't use a spread here because if we did, we'd have to have a `callback` field of type `undefined`, which'd leak some implementation details to consumers + } + + function convertSymbolSpanIntoDiagnosticSymbolSpan(span: SymbolSpan): protocol.DiagnosticSymbolSpan | undefined { + if (!span.symbol.declarations || !span.symbol.declarations[0]) { + return undefined; + } + const d = span.symbol.declarations[0]; + const f = getSourceFileOfNode(d); + if (!f) { + return undefined; + } + const pos = getNameOfDeclaration(d) || d; + const p = getLineAndCharacterOfPosition(f, skipTrivia(f.text, pos.pos)); + return { + kind: "symbol", + start: span.start, + length: span.length, + file: f.path, + location: locationFromLineAndCharacter(p) + }; + } + function convertNewFileTextChangeToCodeEdit(textChanges: FileTextChanges): protocol.FileCodeEdits { Debug.assert(textChanges.textChanges.length === 1); const change = first(textChanges.textChanges); diff --git a/src/testRunner/unittests/tsserver/session.ts b/src/testRunner/unittests/tsserver/session.ts index 715c0ab332408..8ce17026993d6 100644 --- a/src/testRunner/unittests/tsserver/session.ts +++ b/src/testRunner/unittests/tsserver/session.ts @@ -264,6 +264,7 @@ namespace ts.server { CommandNames.OrganizeImportsFull, CommandNames.GetEditsForFileRename, CommandNames.GetEditsForFileRenameFull, + CommandNames.ExpandReveal ]; it("should not throw when commands are executed with invalid arguments", () => { diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt index 4b6255688f8e8..26e33853c50a9 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt @@ -10,9 +10,11 @@ tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Int interface Bar extends Foo { ~~~ -!!! error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'. +!!! error TS2430: Interface '{|Bar|0|}' incorrectly extends interface '{|Foo|1|}'. !!! error TS2430: Types of property 'f' are incompatible. !!! error TS2430: Type '(key: string) => string' is not assignable to type '() => string'. +!!! annotated symbol 0 tests/cases/compiler/addMoreOverloadsToBaseSignature.ts:5:11 +!!! annotated symbol 1 tests/cases/compiler/addMoreOverloadsToBaseSignature.ts:1:11 f(key: string): string; } \ No newline at end of file diff --git a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt index 5548bc5e3dcc4..6762a7c655883 100644 --- a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt +++ b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt @@ -16,7 +16,8 @@ tests/cases/compiler/app.js(6,7): error TS2322: Type '1' is not assignable to ty data1(val) { this.data2 = 1; ~~~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type 'WatchHandler'. +!!! error TS2322: Type '1' is not assignable to type '{|WatchHandler|0|}'. +!!! annotated symbol 0 tests/cases/compiler/func.ts:4:6 }, data2(val) { }, } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index ca97395891a31..8dceb4fb7e46b 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2008,6 +2008,28 @@ declare namespace ts { * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep. */ runWithCancellationToken(token: CancellationToken, cb: (checker: TypeChecker) => T): T; + id: number; + getExpandedReveal(id: number): RevealedResult | undefined; + } + type AnnotationSpan = SymbolSpan | RevealSpan; + interface AnnotationSpanBase { + kind: AnnotationSpan["kind"]; + start: number; + length: number; + } + interface SymbolSpan extends AnnotationSpanBase { + kind: "symbol"; + symbol: Symbol; + } + interface RevealedResult { + text: string; + annotations?: AnnotationSpan[]; + } + interface RevealSpan extends AnnotationSpanBase { + kind: "reveal"; + id: number; + checker: number; + callback: () => RevealedResult; } enum NodeBuilderFlags { None = 0, @@ -2270,8 +2292,8 @@ declare namespace ts { regularType: LiteralType; } interface UniqueESSymbolType extends Type { + __uniqueESSymbolBrand: any; symbol: Symbol; - escapedName: __String; } interface StringLiteralType extends LiteralType { value: string; @@ -2448,6 +2470,7 @@ declare namespace ts { */ interface DiagnosticMessageChain { messageText: string; + annotations?: AnnotationSpan[]; category: DiagnosticCategory; code: number; next?: DiagnosticMessageChain; @@ -2465,6 +2488,7 @@ declare namespace ts { start: number | undefined; length: number | undefined; messageText: string | DiagnosticMessageChain; + annotations?: AnnotationSpan[]; } interface DiagnosticWithLocation extends Diagnostic { file: SourceFile; @@ -5800,7 +5824,8 @@ declare namespace ts.server.protocol { GetEditsForRefactor = "getEditsForRefactor", OrganizeImports = "organizeImports", GetEditsForFileRename = "getEditsForFileRename", - ConfigurePlugin = "configurePlugin" + ConfigurePlugin = "configurePlugin", + ExpandReveal = "expandReveal" } /** * A TypeScript Server message @@ -6082,6 +6107,26 @@ declare namespace ts.server.protocol { /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ reportsUnnecessary?: {}; relatedInformation?: DiagnosticRelatedInformation[]; + /** + * List of spans of the message that have associated information + */ + annotations?: DiagnosticAnnotationSpan[]; + } + type DiagnosticAnnotationSpan = DiagnosticSymbolSpan | DiagnosticRevealSpan; + interface DiagnosticSpanBase { + kind: DiagnosticAnnotationSpan["kind"]; + start: number; + length: number; + } + interface DiagnosticSymbolSpan extends DiagnosticSpanBase { + kind: "symbol"; + file: string; + location: Location; + } + interface DiagnosticRevealSpan extends DiagnosticSpanBase { + kind: "reveal"; + id: number; + checker: number; } /** * Response message for "projectInfo" request @@ -6763,6 +6808,21 @@ declare namespace ts.server.protocol { } interface ConfigurePluginResponse extends Response { } + interface ExpandRevealRequestArguments { + id: number; + checker: number; + } + interface ExpandRevealRequest extends Request { + command: CommandTypes.ExpandReveal; + arguments: ExpandRevealRequestArguments; + } + interface ExpandRevealResponseBody { + text: string; + annotations?: DiagnosticAnnotationSpan[]; + } + interface ExpandRevealResponse extends Response { + body: ExpandRevealResponseBody; + } /** * Information found in an "open" request. */ @@ -7579,6 +7639,10 @@ declare namespace ts.server.protocol { * The name of the plugin reporting the message. */ source?: string; + /** + * List of spans of the message that have associated information + */ + annotations?: DiagnosticAnnotationSpan[]; } interface DiagnosticWithFileName extends Diagnostic { /** @@ -9039,6 +9103,7 @@ declare namespace ts.server { private getBraceMatching; private getDiagnosticsForProject; private configurePlugin; + private expandReveal; getCanonicalFileName(fileName: string): string; exit(): void; private notRequired; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index e136f2c96e4df..9934fea0356d9 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2008,6 +2008,28 @@ declare namespace ts { * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep. */ runWithCancellationToken(token: CancellationToken, cb: (checker: TypeChecker) => T): T; + id: number; + getExpandedReveal(id: number): RevealedResult | undefined; + } + type AnnotationSpan = SymbolSpan | RevealSpan; + interface AnnotationSpanBase { + kind: AnnotationSpan["kind"]; + start: number; + length: number; + } + interface SymbolSpan extends AnnotationSpanBase { + kind: "symbol"; + symbol: Symbol; + } + interface RevealedResult { + text: string; + annotations?: AnnotationSpan[]; + } + interface RevealSpan extends AnnotationSpanBase { + kind: "reveal"; + id: number; + checker: number; + callback: () => RevealedResult; } enum NodeBuilderFlags { None = 0, @@ -2270,8 +2292,8 @@ declare namespace ts { regularType: LiteralType; } interface UniqueESSymbolType extends Type { + __uniqueESSymbolBrand: any; symbol: Symbol; - escapedName: __String; } interface StringLiteralType extends LiteralType { value: string; @@ -2448,6 +2470,7 @@ declare namespace ts { */ interface DiagnosticMessageChain { messageText: string; + annotations?: AnnotationSpan[]; category: DiagnosticCategory; code: number; next?: DiagnosticMessageChain; @@ -2465,6 +2488,7 @@ declare namespace ts { start: number | undefined; length: number | undefined; messageText: string | DiagnosticMessageChain; + annotations?: AnnotationSpan[]; } interface DiagnosticWithLocation extends Diagnostic { file: SourceFile; diff --git a/tests/baselines/reference/apparentTypeSubtyping.errors.txt b/tests/baselines/reference/apparentTypeSubtyping.errors.txt index ca2f0765d6211..068cc2e030802 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.errors.txt +++ b/tests/baselines/reference/apparentTypeSubtyping.errors.txt @@ -16,8 +16,10 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtypi x: String; ~ !!! error TS2416: Property 'x' in type 'Derived' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'String' is not assignable to type 'string'. -!!! error TS2416: 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. +!!! error TS2416: Type '{|String|0|}' is not assignable to type 'string'. +!!! error TS2416: 'string' is a primitive, but '{|String|1|}' is a wrapper object. Prefer using 'string' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:394:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:394:11 } class Base2 { diff --git a/tests/baselines/reference/apparentTypeSupertype.errors.txt b/tests/baselines/reference/apparentTypeSupertype.errors.txt index a4a8ccc0a8bdd..abeff128d2d47 100644 --- a/tests/baselines/reference/apparentTypeSupertype.errors.txt +++ b/tests/baselines/reference/apparentTypeSupertype.errors.txt @@ -17,7 +17,10 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSuperty x: U; ~ !!! error TS2416: Property 'x' in type 'Derived' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'U' is not assignable to type 'string'. -!!! error TS2416: Type 'String' is not assignable to type 'string'. -!!! error TS2416: 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. +!!! error TS2416: Type '{|U|0|}' is not assignable to type 'string'. +!!! error TS2416: Type '{|String|1|}' is not assignable to type 'string'. +!!! error TS2416: 'string' is a primitive, but '{|String|2|}' is a wrapper object. Prefer using 'string' when possible. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts:9:15 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:394:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:394:11 } \ No newline at end of file diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt b/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt index c983abfa1bec8..3bafafe04b30d 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt +++ b/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt @@ -35,6 +35,16 @@ tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextua !!! error TS2345: Type 'number' is not assignable to type '3'. foo(o); // Error because x has an array type namely (string|number)[] ~ -!!! error TS2345: Argument of type '{ x: (string | number)[]; y: { c: boolean; d: string; e: number; }; }' is not assignable to parameter of type '{ x: [any, any]; y: { c: any; d: any; e: any; }; }'. +!!! error TS2345: Argument of type '{ {|x|0|}: (string | number)[]; {|y|1|}: { {|c|2|}: boolean; {|d|3|}: string; {|e|4|}: number; }; }' is not assignable to parameter of type '{ {|x|5|}: [any, any]; {|y|6|}: { {|c|7|}: any; {|d|8|}: any; {|e|9|}: any; }; }'. !!! error TS2345: Types of property 'x' are incompatible. -!!! error TS2345: Type '(string | number)[]' is missing the following properties from type '[any, any]': 0, 1 \ No newline at end of file +!!! error TS2345: Type '(string | number)[]' is missing the following properties from type '[any, any]': 0, 1 +!!! annotated symbol 0 tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts:6:11 +!!! annotated symbol 1 tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts:6:29 +!!! annotated symbol 2 tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts:6:34 +!!! annotated symbol 3 tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts:6:43 +!!! annotated symbol 4 tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts:6:55 +!!! annotated dropped!: 5 +!!! annotated dropped!: 6 +!!! annotated dropped!: 7 +!!! annotated dropped!: 8 +!!! annotated dropped!: 9 \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index c19f00fa1da73..5f9c294cfd2db 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -6,5 +6,6 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS function foo(a) { arguments = 10; /// This shouldnt be of type number and result in error. ~~~~~~~~~ -!!! error TS2322: Type '10' is not assignable to type 'IArguments'. +!!! error TS2322: Type '10' is not assignable to type '{|IArguments|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:388:11 } \ No newline at end of file diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt index b34b889691923..59ef30b506bcb 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt +++ b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt @@ -55,7 +55,8 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2741: Property '2' is missing in type '[string, number]' but required in type '[number, number, number]'. var j2: [number, number, number] = y; ~~ -!!! error TS2741: Property '2' is missing in type 'StrNum' but required in type '[number, number, number]'. +!!! error TS2741: Property '2' is missing in type '{|StrNum|0|}' but required in type '[number, number, number]'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts:1:11 var j3: [number, number, number] = z; ~~ !!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, number, number]': 2, pop, push, concat, and 16 more. @@ -64,7 +65,8 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2741: Property '2' is missing in type '[string, number]' but required in type '[string, number, number]'. var k2: [string, number, number] = y; ~~ -!!! error TS2741: Property '2' is missing in type 'StrNum' but required in type '[string, number, number]'. +!!! error TS2741: Property '2' is missing in type '{|StrNum|0|}' but required in type '[string, number, number]'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts:1:11 var k3: [string, number, number] = z; ~~ !!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[string, number, number]': 2, pop, push, concat, and 16 more. @@ -75,9 +77,10 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2322: Type 'string' is not assignable to type 'number'. var l2: [number] = y; ~~ -!!! error TS2322: Type 'StrNum' is not assignable to type '[number]'. +!!! error TS2322: Type '{|StrNum|0|}' is not assignable to type '[number]'. !!! error TS2322: Types of property '0' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts:1:11 var l3: [number] = z; ~~ !!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number]': pop, push, concat, join, and 15 more. @@ -88,9 +91,10 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2322: Type '2' is not assignable to type '1'. var m2: [string] = y; ~~ -!!! error TS2322: Type 'StrNum' is not assignable to type '[string]'. +!!! error TS2322: Type '{|StrNum|0|}' is not assignable to type '[string]'. !!! error TS2322: Types of property 'length' are incompatible. !!! error TS2322: Type '2' is not assignable to type '1'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts:1:11 var m3: [string] = z; ~~ !!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[string]': pop, push, concat, join, and 15 more. @@ -100,9 +104,10 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error !!! error TS2322: Type 'string' is not assignable to type 'number'. var n2: [number, string] = y; ~~ -!!! error TS2322: Type 'StrNum' is not assignable to type '[number, string]'. +!!! error TS2322: Type '{|StrNum|0|}' is not assignable to type '[number, string]'. !!! error TS2322: Types of property '0' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts:1:11 var n3: [number, string] = z; ~~ !!! error TS2740: Type '{ 0: string; 1: number; length: 2; }' is missing the following properties from type '[number, string]': pop, push, concat, join, and 15 more. diff --git a/tests/baselines/reference/arrayAssignmentTest1.errors.txt b/tests/baselines/reference/arrayAssignmentTest1.errors.txt index 4ee34fcf7368e..e8919c9634a8c 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -76,8 +76,9 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m var i1_error: I1 = []; // should be an error - is ~~~~~~~~ -!!! error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'. +!!! error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type '{|I1|0|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:2:2: 'IM1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 var c1_error: C1 = []; // should be an error - is ~~~~~~~~ !!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 @@ -86,8 +87,9 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m !!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 var c3_error: C3 = []; // should be an error - is ~~~~~~~~ -!!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. +!!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type '{|C3|0|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 arr_any = arr_i1; // should be ok - is @@ -100,55 +102,85 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m arr_i1 = arr_c2; // should be ok - subtype relationship - is arr_i1 = arr_c3; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]'. -!!! error TS2322: Property 'IM1' is missing in type 'C3' but required in type 'I1'. +!!! error TS2322: Type '{|C3|0|}[]' is not assignable to type '{|I1|1|}[]'. +!!! error TS2322: Property 'IM1' is missing in type '{|C3|2|}' but required in type '{|I1|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:2:2: 'IM1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 arr_c1 = arr_c1; // should be ok - subtype relationship - is arr_c1 = arr_c2; // should be ok - subtype relationship - is arr_c1 = arr_i1; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]'. -!!! error TS2322: Property 'C1M1' is missing in type 'I1' but required in type 'C1'. +!!! error TS2322: Type '{|I1|0|}[]' is not assignable to type '{|C1|1|}[]'. +!!! error TS2322: Property 'C1M1' is missing in type '{|I1|2|}' but required in type '{|C1|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:7:2: 'C1M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 arr_c1 = arr_c3; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]'. +!!! error TS2322: Type '{|C3|0|}[]' is not assignable to type '{|C1|1|}[]'. !!! error TS2322: Type 'C3' is missing the following properties from type 'C1': IM1, C1M1 +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 arr_c2 = arr_c2; // should be ok - subtype relationship - is arr_c2 = arr_c1; // should be an error - subtype relationship - is ~~~~~~ -!!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]'. -!!! error TS2322: Property 'C2M1' is missing in type 'C1' but required in type 'C2'. +!!! error TS2322: Type '{|C1|0|}[]' is not assignable to type '{|C2|1|}[]'. +!!! error TS2322: Property 'C2M1' is missing in type '{|C1|2|}' but required in type '{|C2|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:10:5: 'C2M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:9:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest1.ts:9:7 arr_c2 = arr_i1; // should be an error - subtype relationship - is ~~~~~~ -!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. +!!! error TS2322: Type '{|I1|0|}[]' is not assignable to type '{|C2|1|}[]'. !!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1 +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:9:7 arr_c2 = arr_c3; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. +!!! error TS2322: Type '{|C3|0|}[]' is not assignable to type '{|C2|1|}[]'. !!! error TS2322: Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1 +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:9:7 // "clean up bug" occurs at this point // if you move these three expressions to another file, they raise an error // something to do with state from the above propagating forward? arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. -!!! error TS2322: Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. +!!! error TS2322: Type '{|C2|0|}[]' is not assignable to type '{|C3|1|}[]'. +!!! error TS2322: Property 'CM3M1' is missing in type '{|C2|2|}' but required in type '{|C3|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest1.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. -!!! error TS2322: Property 'CM3M1' is missing in type 'C1' but required in type 'C3'. +!!! error TS2322: Type '{|C1|0|}[]' is not assignable to type '{|C3|1|}[]'. +!!! error TS2322: Property 'CM3M1' is missing in type '{|C1|2|}' but required in type '{|C3|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest1.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. -!!! error TS2322: Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. +!!! error TS2322: Type '{|I1|0|}[]' is not assignable to type '{|C3|1|}[]'. +!!! error TS2322: Property 'CM3M1' is missing in type '{|I1|2|}' but required in type '{|C3|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest1.ts:13:7 arr_any = f1; // should be an error - is ~~~~~~~ diff --git a/tests/baselines/reference/arrayAssignmentTest2.errors.txt b/tests/baselines/reference/arrayAssignmentTest2.errors.txt index 4333dd119d666..a0b08dcd29b62 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest2.errors.txt @@ -62,19 +62,31 @@ tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is m // "clean up error" occurs at this point arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. -!!! error TS2322: Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. +!!! error TS2322: Type '{|C2|0|}[]' is not assignable to type '{|C3|1|}[]'. +!!! error TS2322: Property 'CM3M1' is missing in type '{|C2|2|}' but required in type '{|C3|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest2.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest2.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest2.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest2.ts:13:7 arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. -!!! error TS2322: Property 'CM3M1' is missing in type 'C1' but required in type 'C3'. +!!! error TS2322: Type '{|C1|0|}[]' is not assignable to type '{|C3|1|}[]'. +!!! error TS2322: Property 'CM3M1' is missing in type '{|C1|2|}' but required in type '{|C3|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest2.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest2.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest2.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest2.ts:13:7 arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. -!!! error TS2322: Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. +!!! error TS2322: Type '{|I1|0|}[]' is not assignable to type '{|C3|1|}[]'. +!!! error TS2322: Property 'CM3M1' is missing in type '{|I1|2|}' but required in type '{|C3|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest2.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest2.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest2.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest2.ts:13:7 arr_any = f1; // should be an error - is ~~~~~~~ diff --git a/tests/baselines/reference/arrayAssignmentTest3.errors.txt b/tests/baselines/reference/arrayAssignmentTest3.errors.txt index 04b49ff6dafc0..a34af797cad27 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest3.errors.txt @@ -16,7 +16,9 @@ tests/cases/compiler/arrayAssignmentTest3.ts(12,25): error TS2345: Argument of t var xx = new a(null, 7, new B()); ~~~~~~~ -!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. +!!! error TS2345: Argument of type '{|B|0|}' is not assignable to parameter of type '{|B|1|}[]'. !!! error TS2345: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest3.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest3.ts:4:7 \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest5.errors.txt b/tests/baselines/reference/arrayAssignmentTest5.errors.txt index 1a5c1ce41806c..e0c636d34a44c 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest5.errors.txt @@ -27,9 +27,13 @@ tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[ var lineTokens:ILineTokens= this.tokenize(line, state, true); var tokens:IStateToken[]= lineTokens.tokens; ~~~~~~ -!!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]'. -!!! error TS2322: Property 'state' is missing in type 'IToken' but required in type 'IStateToken'. +!!! error TS2322: Type '{|IToken|0|}[]' is not assignable to type '{|IStateToken|1|}[]'. +!!! error TS2322: Property 'state' is missing in type '{|IToken|2|}' but required in type '{|IStateToken|3|}'. !!! related TS2728 tests/cases/compiler/arrayAssignmentTest5.ts:8:9: 'state' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayAssignmentTest5.ts:4:15 +!!! annotated symbol 1 tests/cases/compiler/arrayAssignmentTest5.ts:7:15 +!!! annotated symbol 2 tests/cases/compiler/arrayAssignmentTest5.ts:4:15 +!!! annotated symbol 3 tests/cases/compiler/arrayAssignmentTest5.ts:7:15 if (tokens.length === 0) { return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset) } diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index ce9d031382514..8c3a9a1e20bc3 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -8,9 +8,13 @@ tests/cases/compiler/arrayCast.ts(3,23): error TS2352: Conversion of type '{ foo // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; ~~~~~~~~ -!!! error TS2352: Conversion of type '{ foo: string; }[]' to type '{ id: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type '{ foo: string; }' is not comparable to type '{ id: number; }'. +!!! error TS2352: Conversion of type '{ {|foo|0|}: string; }[]' to type '{ {|id|1|}: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type '{ {|foo|2|}: string; }' is not comparable to type '{ {|id|3|}: number; }'. !!! error TS2352: Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/arrayCast.ts:3:23 +!!! annotated symbol 1 tests/cases/compiler/arrayCast.ts:3:4 +!!! annotated symbol 2 tests/cases/compiler/arrayCast.ts:3:23 +!!! annotated symbol 3 tests/cases/compiler/arrayCast.ts:3:4 // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/arrayFrom.errors.txt b/tests/baselines/reference/arrayFrom.errors.txt index 615bd1bf76955..b9f98d8716f03 100644 --- a/tests/baselines/reference/arrayFrom.errors.txt +++ b/tests/baselines/reference/arrayFrom.errors.txt @@ -25,14 +25,20 @@ tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assigna const result2: A[] = Array.from(inputA.values()); const result3: B[] = Array.from(inputA.values()); // expect error ~~~~~~~ -!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. -!!! error TS2322: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2322: Type '{|A|0|}[]' is not assignable to type '{|B|1|}[]'. +!!! error TS2322: Property 'b' is missing in type '{|A|2|}' but required in type '{|B|3|}'. !!! related TS2728 tests/cases/compiler/arrayFrom.ts:9:3: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayFrom.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/arrayFrom.ts:8:11 +!!! annotated symbol 2 tests/cases/compiler/arrayFrom.ts:4:11 +!!! annotated symbol 3 tests/cases/compiler/arrayFrom.ts:8:11 const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); const result5: A[] = Array.from(inputALike); const result6: B[] = Array.from(inputALike); // expect error ~~~~~~~ -!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. +!!! error TS2322: Type '{|A|0|}[]' is not assignable to type '{|B|1|}[]'. +!!! annotated symbol 0 tests/cases/compiler/arrayFrom.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/arrayFrom.ts:8:11 const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); const result8: A[] = Array.from(inputARand); const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); diff --git a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt index efffc256a8322..130664fb0be27 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt +++ b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt @@ -24,12 +24,18 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(32,18): error TS2322: Type '{ var x1: Action[] = [ { id: 2, trueness: false }, ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'. +!!! error TS2322: Type '{ {|id|0|}: number; {|trueness|1|}: boolean; }' is not assignable to type '{|Action|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'. +!!! annotated symbol 0 tests/cases/compiler/arrayLiteralTypeInference.ts:14:7 +!!! annotated symbol 1 tests/cases/compiler/arrayLiteralTypeInference.ts:14:14 +!!! annotated symbol 2 tests/cases/compiler/arrayLiteralTypeInference.ts:1:7 { id: 3, name: "three" } ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'Action'. +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{|Action|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type 'Action'. +!!! annotated symbol 0 tests/cases/compiler/arrayLiteralTypeInference.ts:15:7 +!!! annotated symbol 1 tests/cases/compiler/arrayLiteralTypeInference.ts:15:14 +!!! annotated symbol 2 tests/cases/compiler/arrayLiteralTypeInference.ts:1:7 ] var x2: Action[] = [ @@ -47,12 +53,18 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(32,18): error TS2322: Type '{ [ { id: 2, trueness: false }, ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Type '{ {|id|0|}: number; {|trueness|1|}: boolean; }' is not assignable to type '{ {|id|2|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/arrayLiteralTypeInference.ts:31:11 +!!! annotated symbol 1 tests/cases/compiler/arrayLiteralTypeInference.ts:31:18 +!!! annotated symbol 2 tests/cases/compiler/arrayLiteralTypeInference.ts:29:11 { id: 3, name: "three" } ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/arrayLiteralTypeInference.ts:32:11 +!!! annotated symbol 1 tests/cases/compiler/arrayLiteralTypeInference.ts:32:18 +!!! annotated symbol 2 tests/cases/compiler/arrayLiteralTypeInference.ts:29:11 ] var z2: { id: number }[] = diff --git a/tests/baselines/reference/arrayLiterals.errors.txt b/tests/baselines/reference/arrayLiterals.errors.txt index 4b9ca295f95e3..ed2c2f654e7ee 100644 --- a/tests/baselines/reference/arrayLiterals.errors.txt +++ b/tests/baselines/reference/arrayLiterals.errors.txt @@ -30,13 +30,23 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,101): erro // Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[] var context1: { [n: number]: { a: string; b: number; }; } = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; ~~~~~ -!!! error TS2322: Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|0|}: string; {|b|1|}: number; {|c|2|}: string; }' is not assignable to type '{ {|a|3|}: string; {|b|4|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. !!! related TS6501 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:17: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:64 +!!! annotated symbol 1 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:71 +!!! annotated symbol 2 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:77 +!!! annotated symbol 3 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:32 +!!! annotated symbol 4 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:43 ~~~~ -!!! error TS2322: Type '{ a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|0|}: string; {|b|1|}: number; {|c|2|}: number; }' is not assignable to type '{ {|a|3|}: string; {|b|4|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. !!! related TS6501 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:17: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:88 +!!! annotated symbol 1 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:95 +!!! annotated symbol 2 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:101 +!!! annotated symbol 3 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:32 +!!! annotated symbol 4 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:43 var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; // Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] diff --git a/tests/baselines/reference/arrayLiterals3.errors.txt b/tests/baselines/reference/arrayLiterals3.errors.txt index 4d398978c96c1..b6667d3735c77 100644 --- a/tests/baselines/reference/arrayLiterals3.errors.txt +++ b/tests/baselines/reference/arrayLiterals3.errors.txt @@ -66,9 +66,13 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error !!! error TS2739: Type 'number[]' is missing the following properties from type '[number, number, number]': 0, 1, 2 var c2: myArray = [...temp1, ...temp]; // Error cannot assign (number|string)[] to number[] ~~ -!!! error TS2322: Type '(string | number)[]' is not assignable to type 'myArray'. +!!! error TS2322: Type '(string | number)[]' is not assignable to type '{|myArray|0|}'. !!! error TS2322: Types of property 'pop' are incompatible. -!!! error TS2322: Type '() => string | number' is not assignable to type '() => Number'. -!!! error TS2322: Type 'string | number' is not assignable to type 'Number'. -!!! error TS2322: Type 'string' is not assignable to type 'Number'. +!!! error TS2322: Type '() => string | number' is not assignable to type '() => {|Number|1|}'. +!!! error TS2322: Type 'string | number' is not assignable to type '{|Number|2|}'. +!!! error TS2322: Type 'string' is not assignable to type '{|Number|3|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts:30:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:542:11 \ No newline at end of file diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt index 63d3a6f7b641e..06ca233f078e4 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt @@ -22,18 +22,43 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T rra = arb; rrb = ara; // error: 'A' is not assignable to 'B' ~~~ -!!! error TS2322: Type 'A[]' is not assignable to type 'readonly B[]'. -!!! error TS2322: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2322: Type '{|A|0|}[]' is not assignable to type 'readonly {|B|1|}[]'. +!!! error TS2322: Property 'b' is missing in type '{|A|2|}' but required in type '{|B|3|}'. !!! related TS2728 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:21: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 2 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 rra = cra; rra = crb; // OK, C is assignable to ReadonlyArray rrb = crb; rrb = cra; // error: 'A' is not assignable to 'B' ~~~ -!!! error TS2322: Type 'C' is not assignable to type 'readonly B[]'. +!!! error TS2322: Type '{|C|0|}<{|A|1|}>' is not assignable to type 'readonly {|B|2|}[]'. !!! error TS2322: Types of property 'concat' are incompatible. -!!! error TS2322: Type '{ (...items: ConcatArray[]): A[]; (...items: (A | ConcatArray)[]): A[]; }' is not assignable to type '{ (...items: ConcatArray[]): B[]; (...items: (B | ConcatArray)[]): B[]; }'. -!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{ (...items: {|ConcatArray|3|}<{|A|4|}>[]): {|A|5|}[]; (...items: ({|A|6|} | {|ConcatArray|7|}<{|A|8|}>)[]): {|A|9|}[]; }' is not assignable to type '{ (...items: {|ConcatArray|10|}<{|B|11|}>[]): {|B|12|}[]; (...items: ({|B|13|} | {|ConcatArray|14|}<{|B|15|}>)[]): {|B|16|}[]; }'. +!!! error TS2322: Type '{|A|17|}[]' is not assignable to type '{|B|18|}[]'. +!!! error TS2322: Type '{|A|19|}' is not assignable to type '{|B|20|}'. +!!! annotated symbol 0 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:3:7 +!!! annotated symbol 1 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1198:11 +!!! annotated symbol 4 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 5 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 6 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1198:11 +!!! annotated symbol 8 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 9 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1198:11 +!!! annotated symbol 11 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 12 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 13 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1198:11 +!!! annotated symbol 15 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 16 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 17 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 18 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 +!!! annotated symbol 19 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:1:7 +!!! annotated symbol 20 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:7 \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index b0d5d1dfc2542..5bdb36eafe8c8 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -40,7 +40,8 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e enum E { x = () => 4, // Error expected ~~~~~~~ -!!! error TS2322: Type '() => number' is not assignable to type 'E'. +!!! error TS2322: Type '() => number' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts:29:6 y = (() => this).length // error, can't use this in enum ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. @@ -87,7 +88,8 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e enum E { x = () => 4, // Error expected ~~~~~~~ -!!! error TS2322: Type '() => number' is not assignable to type 'E'. +!!! error TS2322: Type '() => number' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts:70:10 y = (() => this).length ~~~~ !!! error TS2332: 'this' cannot be referenced in current location. diff --git a/tests/baselines/reference/assignFromBooleanInterface.errors.txt b/tests/baselines/reference/assignFromBooleanInterface.errors.txt index 555b645cd7dc1..288ea8fb0d2aa 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface.errors.txt @@ -7,6 +7,8 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3 var a: Boolean; x = a; ~ -!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'. -!!! error TS2322: 'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible. +!!! error TS2322: Type '{|Boolean|0|}' is not assignable to type 'boolean'. +!!! error TS2322: 'boolean' is a primitive, but '{|Boolean|1|}' is a wrapper object. Prefer using 'boolean' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:529:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:529:11 a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt index 6c7ebbe5ee83f..0fa57611b6bbf 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt @@ -23,20 +23,27 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts( a = x; a = b; ~ -!!! error TS2322: Type 'NotBoolean' is not assignable to type 'Boolean'. +!!! error TS2322: Type '{|NotBoolean|0|}' is not assignable to type '{|Boolean|1|}'. !!! error TS2322: Types of property 'valueOf' are incompatible. -!!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'. -!!! error TS2322: Type 'Object' is not assignable to type 'boolean'. +!!! error TS2322: Type '() => {|Object|2|}' is not assignable to type '() => boolean'. +!!! error TS2322: Type '{|Object|3|}' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts:5:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:529:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 b = a; b = x; x = a; // expected error ~ -!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'. -!!! error TS2322: 'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible. +!!! error TS2322: Type '{|Boolean|0|}' is not assignable to type 'boolean'. +!!! error TS2322: 'boolean' is a primitive, but '{|Boolean|1|}' is a wrapper object. Prefer using 'boolean' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:529:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:529:11 x = b; // expected error ~ -!!! error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'. +!!! error TS2322: Type '{|NotBoolean|0|}' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts:5:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface.errors.txt b/tests/baselines/reference/assignFromNumberInterface.errors.txt index 1a70ef342d2b8..8f40082202ca2 100644 --- a/tests/baselines/reference/assignFromNumberInterface.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface.errors.txt @@ -7,6 +7,8 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1 var a: Number; x = a; ~ -!!! error TS2322: Type 'Number' is not assignable to type 'number'. -!!! error TS2322: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. +!!! error TS2322: Type '{|Number|0|}' is not assignable to type 'number'. +!!! error TS2322: 'number' is a primitive, but '{|Number|1|}' is a wrapper object. Prefer using 'number' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:542:11 a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index 3297501d61208..2c162af39ddb3 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -29,10 +29,13 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(25 x = a; // expected error ~ -!!! error TS2322: Type 'Number' is not assignable to type 'number'. -!!! error TS2322: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. +!!! error TS2322: Type '{|Number|0|}' is not assignable to type 'number'. +!!! error TS2322: 'number' is a primitive, but '{|Number|1|}' is a wrapper object. Prefer using 'number' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:542:11 x = b; // expected error ~ -!!! error TS2322: Type 'NotNumber' is not assignable to type 'number'. +!!! error TS2322: Type '{|NotNumber|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts:5:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface.errors.txt b/tests/baselines/reference/assignFromStringInterface.errors.txt index 7e7af4d1b9daf..68ac684223a34 100644 --- a/tests/baselines/reference/assignFromStringInterface.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface.errors.txt @@ -7,6 +7,8 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1 var a: String; x = a; ~ -!!! error TS2322: Type 'String' is not assignable to type 'string'. -!!! error TS2322: 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. +!!! error TS2322: Type '{|String|0|}' is not assignable to type 'string'. +!!! error TS2322: 'string' is a primitive, but '{|String|1|}' is a wrapper object. Prefer using 'string' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:394:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:394:11 a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 0fc3284bf0046..ebdf88237f601 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -52,10 +52,13 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(48 x = a; // expected error ~ -!!! error TS2322: Type 'String' is not assignable to type 'string'. -!!! error TS2322: 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. +!!! error TS2322: Type '{|String|0|}' is not assignable to type 'string'. +!!! error TS2322: 'string' is a primitive, but '{|String|1|}' is a wrapper object. Prefer using 'string' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:394:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:394:11 x = b; // expected error ~ -!!! error TS2322: Type 'NotString' is not assignable to type 'string'. +!!! error TS2322: Type '{|NotString|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts:5:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt index eeab9734ccdbb..5c01da4627fe2 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt @@ -13,12 +13,16 @@ tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts(8,4): error TS234 fn((a, b) => true); ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean' but required in type 'IResultCallback'. +!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type '{|IResultCallback|0|}'. +!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean' but required in type '{|IResultCallback|1|}'. !!! related TS2728 tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts:2:5: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts:1:11 fn(function (a, b) { return true; }) ~~~~~~~~ -!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean' but required in type 'IResultCallback'. +!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type '{|IResultCallback|0|}'. +!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean' but required in type '{|IResultCallback|1|}'. !!! related TS2728 tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts:2:5: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index d393d553ce414..864a3a7baeb8d 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -10,13 +10,15 @@ tests/cases/compiler/assignmentCompat1.ts(10,1): error TS2322: Type 'false' is n var z: { [index: number]: any }; x = y; // Error ~ -!!! error TS2741: Property 'one' is missing in type '{ [index: string]: any; }' but required in type '{ one: number; }'. +!!! error TS2741: Property 'one' is missing in type '{ [index: string]: any; }' but required in type '{ {|one|0|}: number; }'. !!! related TS2728 tests/cases/compiler/assignmentCompat1.ts:1:11: 'one' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompat1.ts:1:11 y = x; // Ok because index signature type is any x = z; // Error ~ -!!! error TS2741: Property 'one' is missing in type '{ [index: number]: any; }' but required in type '{ one: number; }'. +!!! error TS2741: Property 'one' is missing in type '{ [index: number]: any; }' but required in type '{ {|one|0|}: number; }'. !!! related TS2728 tests/cases/compiler/assignmentCompat1.ts:1:11: 'one' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompat1.ts:1:11 z = x; // Ok because index signature type is any y = "foo"; // Error ~ diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index b8bd7d4847347..5ab41130d2e26 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -12,18 +12,25 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i ==== tests/cases/compiler/assignmentCompatBug2.ts (6 errors) ==== var b2: { b: number;} = { a: 0 }; // error ~~~~ -!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. +!!! error TS2322: Type '{ {|a|0|}: number; }' is not assignable to type '{ {|b|1|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug2.ts:1:27 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug2.ts:1:11 b2 = { a: 0 }; // error ~~~~ -!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. +!!! error TS2322: Type '{ {|a|0|}: number; }' is not assignable to type '{ {|b|1|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug2.ts:3:8 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug2.ts:1:11 b2 = {b: 0, a: 0 }; ~~~~ -!!! error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. +!!! error TS2322: Type '{ {|b|0|}: number; {|a|1|}: number; }' is not assignable to type '{ {|b|2|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug2.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug2.ts:5:13 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatBug2.ts:1:11 var b3: { f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }; @@ -35,16 +42,30 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i b3 = { ~~ -!!! error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. +!!! error TS2741: Property 'm' is missing in type '{ {|f|0|}: (n: number) => number; {|g|1|}: (s: string) => number; }' but required in type '{ {|f|2|}(n: number): number; {|g|3|}(s: string): number; {|m|4|}: number; {|n|5|}?: number; {|k|6|}?(a: any): any; }'. !!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:55: 'm' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug2.ts:16:5 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug2.ts:17:5 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatBug2.ts:7:11 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatBug2.ts:7:33 +!!! annotated symbol 4 tests/cases/compiler/assignmentCompatBug2.ts:7:55 +!!! annotated symbol 5 tests/cases/compiler/assignmentCompatBug2.ts:7:66 +!!! annotated symbol 6 tests/cases/compiler/assignmentCompatBug2.ts:7:78 f: (n) => { return 0; }, g: (s) => { return 0; }, }; // error b3 = { ~~ -!!! error TS2741: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. +!!! error TS2741: Property 'g' is missing in type '{ {|f|0|}: (n: number) => number; {|m|1|}: number; }' but required in type '{ {|f|2|}(n: number): number; {|g|3|}(s: string): number; {|m|4|}: number; {|n|5|}?: number; {|k|6|}?(a: any): any; }'. !!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:33: 'g' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug2.ts:21:5 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug2.ts:22:5 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatBug2.ts:7:11 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatBug2.ts:7:33 +!!! annotated symbol 4 tests/cases/compiler/assignmentCompatBug2.ts:7:55 +!!! annotated symbol 5 tests/cases/compiler/assignmentCompatBug2.ts:7:66 +!!! annotated symbol 6 tests/cases/compiler/assignmentCompatBug2.ts:7:78 f: (n) => { return 0; }, m: 0, }; // error @@ -59,8 +80,17 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i b3 = { ~~ -!!! error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. +!!! error TS2741: Property 'm' is missing in type '{ {|f|0|}: (n: number) => number; {|g|1|}: (s: string) => number; {|n|2|}: number; {|k|3|}: (a: any) => any; }' but required in type '{ {|f|4|}(n: number): number; {|g|5|}(s: string): number; {|m|6|}: number; {|n|7|}?: number; {|k|8|}?(a: any): any; }'. !!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:55: 'm' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug2.ts:34:5 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug2.ts:35:5 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatBug2.ts:36:5 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatBug2.ts:37:5 +!!! annotated symbol 4 tests/cases/compiler/assignmentCompatBug2.ts:7:11 +!!! annotated symbol 5 tests/cases/compiler/assignmentCompatBug2.ts:7:33 +!!! annotated symbol 6 tests/cases/compiler/assignmentCompatBug2.ts:7:55 +!!! annotated symbol 7 tests/cases/compiler/assignmentCompatBug2.ts:7:66 +!!! annotated symbol 8 tests/cases/compiler/assignmentCompatBug2.ts:7:78 f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index 6a5c5569c8f57..3af9363cf6494 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -13,8 +13,10 @@ tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of typ function foo1(x: { a: number; }) { } foo1({ b: 5 }); ~~~~ -!!! error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. +!!! error TS2345: Argument of type '{ {|b|0|}: number; }' is not assignable to parameter of type '{ {|a|1|}: number; }'. !!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatBug5.ts:2:8 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatBug5.ts:1:20 function foo2(x: number[]) { } foo2(["s", "t"]); diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt index 870c5f8839dea..e283909010017 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt @@ -16,6 +16,12 @@ tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS !!! related TS6500 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:31: The expected type comes from property 'name' which is declared here on type '{ id: number; name?: string; }' foo({ name: "hello" }); // Error, id required but missing ~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. -!!! error TS2345: Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:19: 'id' is declared here. \ No newline at end of file +!!! error TS2345: Argument of type '{ {|name|0|}: string; }' is not assignable to parameter of type '{ {|id|1|}: number; {|name|2|}?: string; }'. +!!! error TS2345: Property 'id' is missing in type '{ {|name|3|}: string; }' but required in type '{ {|id|4|}: number; {|name|5|}?: string; }'. +!!! related TS2728 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:19: 'id' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:19 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:31 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:5:7 +!!! annotated symbol 4 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:19 +!!! annotated symbol 5 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:31 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt index 65c1d30779375..c4d0c91bd226e 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt @@ -19,6 +19,8 @@ tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts(15,5): Biz(new Foo()); ~~~~~~~~~ -!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. +!!! error TS2345: Argument of type '{|Foo|0|}' is not assignable to parameter of type '{|IHandlerMap|1|}'. !!! error TS2345: Index signature is missing in type 'Foo'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts:5:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index c5914e593864f..5f6e141318164 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -61,29 +61,35 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // these are errors t = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type 'T'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts:29:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts:3:11 t = a3; ~ -!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type '{|T|0|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts:3:11 t = (x: string) => 1; ~ -!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '{|T|0|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts:3:11 t = function (x: string) { return ''; } ~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '{|T|0|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts:3:11 a = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts:29:11 a = a3; ~ !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index ba14424f99fee..9285bdd2866cf 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt @@ -61,20 +61,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // errors t = () => 1; ~ -!!! error TS2741: Property 'f' is missing in type '() => number' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '() => number' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:3:11 t = function (x: number) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:3:11 a = () => 1; ~ -!!! error TS2741: Property 'f' is missing in type '() => number' but required in type '{ f(x: number): void; }'. +!!! error TS2741: Property 'f' is missing in type '() => number' but required in type '{ {|f|0|}(x: number): void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10 a = function (x: number) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type '{ f(x: number): void; }'. +!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type '{ {|f|0|}(x: number): void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10 interface S2 { f(x: string): void; @@ -84,46 +88,58 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // these are errors t = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type 'T'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:3:11 t = a3; ~ -!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. +!!! error TS2322: Type '{ {|f|0|}(x: string): void; }' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:3:11 t = (x: string) => 1; ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:3:11 t = function (x: string) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:3:11 a = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{ {|f|1|}(x: number): void; }'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10 a = a3; ~ -!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'. +!!! error TS2322: Type '{ {|f|0|}(x: string): void; }' is not assignable to type '{ {|f|1|}(x: number): void; }'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10 a = (x: string) => 1; ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type '{ f(x: number): void; }'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type '{ {|f|0|}(x: number): void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10 a = function (x: string) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type '{ f(x: number): void; }'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type '{ {|f|0|}(x: number): void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts:7:10 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt index a0c856cae96f7..52130dc71e15d 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt @@ -111,122 +111,308 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // ok ~ -!!! error TS2322: Type '(x: number) => number[]' is not assignable to type '(x: T) => T[]'. +!!! error TS2322: Type '(x: number) => number[]' is not assignable to type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:45:9 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:45:9 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:45:9 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:45:9 var b2: (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok ~~ -!!! error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => string[]'. +!!! error TS2322: Type '(x: number) => string[]' is not assignable to type '<{|T|0|}>(x: {|T|1|}) => string[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|2|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:48:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:48:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:48:10 var b3: (x: T) => T; a3 = b3; // ok b3 = a3; // ok ~~ -!!! error TS2322: Type '(x: number) => void' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '(x: number) => void' is not assignable to type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:51:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:51:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:51:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:51:10 var b4: (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok ~~ -!!! error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(x: T, y: U) => T'. +!!! error TS2322: Type '(x: string, y: number) => string' is not assignable to type '<{|T|0|}, {|U|1|}>(x: {|T|2|}, y: {|U|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:10 var b5: (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok ~~ -!!! error TS2322: Type '(x: (arg: string) => number) => string' is not assignable to type '(x: (arg: T) => U) => T'. +!!! error TS2322: Type '(x: (arg: string) => number) => string' is not assignable to type '<{|T|0|}, {|U|1|}>(x: (arg: {|T|2|}) => {|U|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|5|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:10 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:57:10 var b6: (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok ~~ -!!! error TS2322: Type '(x: (arg: Base) => Derived) => Base' is not assignable to type '(x: (arg: T) => U) => T'. +!!! error TS2322: Type '(x: (arg: {|Base|0|}) => {|Derived|1|}) => {|Base|2|}' is not assignable to type '<{|T|3|} extends {|Base|4|}, {|U|5|} extends {|Derived|6|}>(x: (arg: {|T|7|}) => {|U|8|}) => {|T|9|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|10|}' is not assignable to type '{|T|11|}'. +!!! error TS2322: '{|Base|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{|Base|15|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:26 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:10 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:26 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:10 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:10 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:10 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:60:10 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 var b7: (x: (arg: T) => U) => (r: T) => U; a7 = b7; // ok b7 = a7; // ok ~~ -!!! error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U) => (r: T) => U'. +!!! error TS2322: Type '(x: (arg: {|Base|0|}) => {|Derived|1|}) => (r: {|Base|2|}) => {|Derived|3|}' is not assignable to type '<{|T|4|} extends {|Base|5|}, {|U|6|} extends {|Derived|7|}>(x: (arg: {|T|8|}) => {|U|9|}) => (r: {|T|10|}) => {|U|11|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|12|}' is not assignable to type '{|T|13|}'. +!!! error TS2322: '{|Base|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{|Base|17|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:26 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:10 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:26 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:10 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:26 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:10 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:10 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:63:10 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 var b8: (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; a8 = b8; // ok b8 = a8; // ok ~~ -!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U'. +!!! error TS2322: Type '(x: (arg: {|Base|0|}) => {|Derived|1|}, y: (arg2: {|Base|2|}) => {|Derived|3|}) => (r: {|Base|4|}) => {|Derived|5|}' is not assignable to type '<{|T|6|} extends {|Base|7|}, {|U|8|} extends {|Derived|9|}>(x: (arg: {|T|10|}) => {|U|11|}, y: (arg2: {|T|12|}) => {|U|13|}) => (r: {|T|14|}) => {|U|15|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|16|}' is not assignable to type '{|T|17|}'. +!!! error TS2322: '{|Base|18|}' is assignable to the constraint of type '{|T|19|}', but '{|T|20|}' could be instantiated with a different subtype of constraint '{|Base|21|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:26 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:26 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:26 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:26 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:66:10 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 var b9: (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; a9 = b9; // ok b9 = a9; // ok ~~ -!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U'. +!!! error TS2322: Type '(x: (arg: {|Base|0|}) => {|Derived|1|}, y: (arg2: {|Base|2|}) => {|Derived|3|}) => (r: {|Base|4|}) => {|Derived|5|}' is not assignable to type '<{|T|6|} extends {|Base|7|}, {|U|8|} extends {|Derived|9|}>(x: (arg: {|T|10|}) => {|U|11|}, y: (arg2: { {|foo|12|}: string; {|bing|13|}: number; }) => {|U|14|}) => (r: {|T|15|}) => {|U|16|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|17|}' is not assignable to type '{|T|18|}'. +!!! error TS2322: '{|Base|19|}' is assignable to the constraint of type '{|T|20|}', but '{|T|21|}' could be instantiated with a different subtype of constraint '{|Base|22|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:26 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:10 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:26 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:75 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:88 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:26 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:10 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:26 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:10 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:10 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:69:10 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 var b10: (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok ~~~ -!!! error TS2322: Type '(...x: Derived[]) => Derived' is not assignable to type '(...x: T[]) => T'. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2322: Type '(...x: {|Derived|0|}[]) => {|Derived|1|}' is not assignable to type '<{|T|2|} extends {|Derived|3|}>(...x: {|T|4|}[]) => {|T|5|}'. +!!! error TS2322: Type '{|Derived|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|Derived|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Derived|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:72:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:72:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:72:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:72:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:72:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:72:11 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 var b11: (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok ~~~ -!!! error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '(x: T, y: T) => T'. +!!! error TS2322: Type '(x: { {|foo|0|}: string; }, y: { {|foo|1|}: string; {|bar|2|}: string; }) => {|Base|3|}' is not assignable to type '<{|T|4|} extends {|Base|5|}>(x: {|T|6|}, y: {|T|7|}) => {|T|8|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type '{ foo: string; bar: string; }'. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. +!!! error TS2322: Type '{|T|9|}' is not assignable to type '{ {|foo|10|}: string; {|bar|11|}: string; }'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|12|}' but required in type '{ {|foo|13|}: string; {|bar|14|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:49: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:36 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:49 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:75:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:75:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:75:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:75:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:75:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:36 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:49 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:36 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:49 var b12: >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok ~~~ -!!! error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => Derived[]'. +!!! error TS2322: Type '(x: {|Base|0|}[], y: {|Derived2|1|}[]) => {|Derived|2|}[]' is not assignable to type '<{|T|3|} extends {|Base|4|}[]>(x: {|Base|5|}[], y: {|T|6|}) => {|Derived|7|}[]'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived2[]'. -!!! error TS2322: Type 'Base[]' is not assignable to type 'Derived2[]'. +!!! error TS2322: Type '{|T|8|}' is not assignable to type '{|Derived2|9|}[]'. +!!! error TS2322: Type '{|Base|10|}[]' is not assignable to type '{|Derived2|11|}[]'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:5:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:78:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:78:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:78:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:5:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:5:7 var b13: >(x: Array, y: T) => T; a13 = b13; // ok b13 = a13; // ok ~~~ -!!! error TS2322: Type '(x: Base[], y: Derived[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => T'. -!!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. -!!! error TS2322: 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. +!!! error TS2322: Type '(x: {|Base|0|}[], y: {|Derived|1|}[]) => {|Derived|2|}[]' is not assignable to type '<{|T|3|} extends {|Derived|4|}[]>(x: {|Base|5|}[], y: {|T|6|}) => {|T|7|}'. +!!! error TS2322: Type '{|Derived|8|}[]' is not assignable to type '{|T|9|}'. +!!! error TS2322: '{|Derived|10|}[]' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{|Derived|13|}[]'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:81:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:81:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:81:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:81:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:81:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:81:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:4:7 var b14: (x: { a: T; b: T }) => T; a14 = b14; // ok ~~~ -!!! error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => Object'. +!!! error TS2322: Type '<{|T|0|}>(x: { {|a|1|}: {|T|2|}; {|b|3|}: {|T|4|}; }) => {|T|5|}' is not assignable to type '(x: { {|a|6|}: string; {|b|7|}: number; }) => {|Object|8|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. +!!! error TS2322: Type '{ {|a|9|}: string; {|b|10|}: number; }' is not assignable to type '{ {|a|11|}: string; {|b|12|}: string; }'. !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:25 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:16 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:27 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:16 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:27 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:25 b14 = a14; // ok ~~~ -!!! error TS2322: Type '(x: { a: string; b: number; }) => Object' is not assignable to type '(x: { a: T; b: T; }) => T'. +!!! error TS2322: Type '(x: { {|a|0|}: string; {|b|1|}: number; }) => {|Object|2|}' is not assignable to type '<{|T|3|}>(x: { {|a|4|}: {|T|5|}; {|b|6|}: {|T|7|}; }) => {|T|8|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|9|}: {|T|10|}; {|b|11|}: {|T|12|}; }' is not assignable to type '{ {|a|13|}: string; {|b|14|}: number; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|15|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:27 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:25 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:19 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:25 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:16 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:21:27 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11 var b15: (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index ecc1dbd848f99..8684b8d6060fb 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -107,91 +107,243 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a2 = b2; b2 = a2; ~~ -!!! error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => U[]'. +!!! error TS2322: Type '(x: number) => string[]' is not assignable to type '<{|T|0|}, {|U|1|}>(x: {|T|2|}) => {|U|3|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:43:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:43:21 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:43:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:43:21 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:43:18 var b7: (x: (arg: T) => U) => (r: T) => V; a7 = b7; b7 = a7; ~~ -!!! error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type '(x: (arg: T) => U) => (r: T) => V'. +!!! error TS2322: Type '(x: (arg: {|Base|0|}) => {|Derived|1|}) => (r: {|Base|2|}) => {|Derived2|3|}' is not assignable to type '<{|T|4|} extends {|Base|5|}, {|U|6|} extends {|Derived|7|}, {|V|8|} extends {|Derived2|9|}>(x: (arg: {|T|10|}) => {|U|11|}) => (r: {|T|12|}) => {|V|13|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|14|}' is not assignable to type '{|T|15|}'. +!!! error TS2322: '{|Base|16|}' is assignable to the constraint of type '{|T|17|}', but '{|T|18|}' could be instantiated with a different subtype of constraint '{|Base|19|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:34 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:53 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:6:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:34 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:18 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:53 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:18 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:18 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:47:18 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, { foo: number } and Base are incompatible ~~ -!!! error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. +!!! error TS2322: Type '<{|T|0|} extends {|Base|1|}, {|U|2|} extends {|Derived|3|}>(x: (arg: {|T|4|}) => {|U|5|}, y: (arg2: { {|foo|6|}: number; }) => {|U|7|}) => (r: {|T|8|}) => {|U|9|}' is not assignable to type '(x: (arg: {|Base|10|}) => {|Derived|11|}, y: (arg2: {|Base|12|}) => {|Derived|13|}) => (r: {|Base|14|}) => {|Derived|15|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. -!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2322: Type '{ {|foo|16|}: number; }' is not assignable to type '{|Base|17|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:83 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:83 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 b8 = a8; // error, { foo: number } and Base are incompatible ~~ -!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. +!!! error TS2322: Type '(x: (arg: {|Base|0|}) => {|Derived|1|}, y: (arg2: {|Base|2|}) => {|Derived|3|}) => (r: {|Base|4|}) => {|Derived|5|}' is not assignable to type '<{|T|6|} extends {|Base|7|}, {|U|8|} extends {|Derived|9|}>(x: (arg: {|T|10|}) => {|U|11|}, y: (arg2: { {|foo|12|}: number; }) => {|U|13|}) => (r: {|T|14|}) => {|U|15|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|16|}' is not assignable to type '{|T|17|}'. +!!! error TS2322: '{|Base|18|}' is assignable to the constraint of type '{|T|19|}', but '{|T|20|}' could be instantiated with a different subtype of constraint '{|Base|21|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:83 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:34 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:51:18 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 var b10: (...x: T[]) => T; a10 = b10; b10 = a10; ~~~ -!!! error TS2322: Type '(...x: Base[]) => Base' is not assignable to type '(...x: T[]) => T'. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. +!!! error TS2322: Type '(...x: {|Base|0|}[]) => {|Base|1|}' is not assignable to type '<{|T|2|} extends {|Derived|3|}>(...x: {|T|4|}[]) => {|T|5|}'. +!!! error TS2322: Type '{|Base|6|}' is not assignable to type '{|T|7|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:56:19 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:56:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:56:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:56:19 var b11: (x: T, y: T) => T; a11 = b11; b11 = a11; ~~~ -!!! error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '(x: T, y: T) => T'. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. +!!! error TS2322: Type '(x: { {|foo|0|}: string; }, y: { {|foo|1|}: string; {|bar|2|}: string; }) => {|Base|3|}' is not assignable to type '<{|T|4|} extends {|Derived|5|}>(x: {|T|6|}, y: {|T|7|}) => {|T|8|}'. +!!! error TS2322: Type '{|Base|9|}' is not assignable to type '{|T|10|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:15:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:15:44 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:15:57 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:60:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:60:19 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:60:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:60:19 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:60:19 var b12: >(x: Array, y: Array) => T; a12 = b12; b12 = a12; ~~~ -!!! error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '(x: Base[], y: Base[]) => T'. -!!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. +!!! error TS2322: Type '(x: {|Base|0|}[], y: {|Derived2|1|}[]) => {|Derived|2|}[]' is not assignable to type '<{|T|3|} extends {|Derived2|4|}[]>(x: {|Base|5|}[], y: {|Base|6|}[]) => {|T|7|}'. +!!! error TS2322: Type '{|Derived|8|}[]' is not assignable to type '{|T|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:6:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:64:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:6:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:64:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:5:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:64:19 var b15: (x: { a: T; b: T }) => T; a15 = b15; ~~~ -!!! error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'. +!!! error TS2322: Type '<{|T|0|}>(x: { {|a|1|}: {|T|2|}; {|b|3|}: {|T|4|}; }) => {|T|5|}' is not assignable to type '(x: { {|a|6|}: string; {|b|7|}: number; }) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. +!!! error TS2322: Type '{ {|a|8|}: string; {|b|9|}: number; }' is not assignable to type '{ {|a|10|}: string; {|b|11|}: string; }'. !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:27 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:33 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:27 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:33 b15 = a15; ~~~ -!!! error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '(x: { a: T; b: T; }) => T'. +!!! error TS2322: Type '(x: { {|a|0|}: string; {|b|1|}: number; }) => number' is not assignable to type '<{|T|2|}>(x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|8|}: {|T|9|}; {|b|10|}: {|T|11|}; }' is not assignable to type '{ {|a|12|}: string; {|b|13|}: number; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|14|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:27 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:33 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:27 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:33 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19 var b15a: (x: { a: T; b: T }) => number; a15 = b15a; ~~~ -!!! error TS2322: Type '(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'. +!!! error TS2322: Type '<{|T|0|} extends {|Base|1|}>(x: { {|a|2|}: {|T|3|}; {|b|4|}: {|T|5|}; }) => number' is not assignable to type '(x: { {|a|6|}: string; {|b|7|}: number; }) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2322: Type '{ {|a|8|}: string; {|b|9|}: number; }' is not assignable to type '{ {|a|10|}: {|Base|11|}; {|b|12|}: {|Base|13|}; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'Base'. +!!! error TS2322: Type 'string' is not assignable to type '{|Base|14|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:41 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:47 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:41 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:47 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 b15a = a15; ~~~~ -!!! error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '(x: { a: T; b: T; }) => number'. +!!! error TS2322: Type '(x: { {|a|0|}: string; {|b|1|}: number; }) => number' is not assignable to type '<{|T|2|} extends {|Base|3|}>(x: { {|a|4|}: {|T|5|}; {|b|6|}: {|T|7|}; }) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|8|}: {|T|9|}; {|b|10|}: {|T|11|}; }' is not assignable to type '{ {|a|12|}: string; {|b|13|}: number; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! error TS2322: Type 'Base' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|14|}' is not assignable to type 'string'. +!!! error TS2322: Type '{|Base|15|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:41 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:47 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:41 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:47 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:24 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:21:35 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:72:20 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:4:11 var b16: (x: (a: T) => T) => T[]; a16 = b16; @@ -208,29 +360,61 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b2: (x: T) => string[]; a2 = b2; ~~ -!!! error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. -!!! error TS2322: Type 'string[]' is not assignable to type 'T[]'. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => string[]' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}[]'. +!!! error TS2322: Type 'string[]' is not assignable to type '{|T|5|}[]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|6|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 b2 = a2; ~~ -!!! error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. -!!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}[]' is not assignable to type '<{|T|3|}>(x: {|T|4|}) => string[]'. +!!! error TS2322: Type '{|T|5|}[]' is not assignable to type 'string[]'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:87:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18 // target type has generic call signature var a3: (x: T) => string[]; var b3: (x: T) => T[]; a3 = b3; ~~ -!!! error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. -!!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}[]' is not assignable to type '<{|T|3|}>(x: {|T|4|}) => string[]'. +!!! error TS2322: Type '{|T|5|}[]' is not assignable to type 'string[]'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18 b3 = a3; ~~ -!!! error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. -!!! error TS2322: Type 'string[]' is not assignable to type 'T[]'. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => string[]' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}[]'. +!!! error TS2322: Type 'string[]' is not assignable to type '{|T|5|}[]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|6|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:94:18 } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt index d3bb6e0b2e262..8c666c062b832 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt @@ -61,8 +61,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a3 = b3; // ok b3 = a3; // ok ~~ -!!! error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. -!!! error TS2322: Type 'void' is not assignable to type 'T'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => void' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type 'void' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:10:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:10:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:38:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:38:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:38:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:38:10 var b4: (x: T, y: U) => string; a4 = b4; // ok b4 = a4; // ok @@ -76,31 +82,111 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a11 = b11; // ok b11 = a11; // ok ~~~ -!!! error TS2322: Type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +!!! error TS2322: Type '<{|T|0|}>(x: { {|foo|1|}: {|T|2|}; }, y: { {|foo|3|}: {|T|4|}; {|bar|5|}: {|T|6|}; }) => {|Base|7|}' is not assignable to type '<{|T|8|}, {|U|9|}>(x: { {|foo|10|}: {|T|11|}; }, y: { {|foo|12|}: {|U|13|}; {|bar|14|}: {|U|15|}; }) => {|Base|16|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. +!!! error TS2322: Type '{ {|foo|17|}: {|U|18|}; {|bar|19|}: {|U|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; {|bar|23|}: {|T|24|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|25|}' is not assignable to type '{|T|26|}'. +!!! error TS2322: '{|U|27|}' is assignable to the constraint of type '{|T|28|}', but '{|T|29|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:34 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:42 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:22 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:37 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:45 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:3:7 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:37 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:45 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:34 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:14:42 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:11 var b15: (x: { a: U; b: V; }) => U[]; a15 = b15; // ok, T = U, T = V b15 = a15; // ok ~~~ -!!! error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: U; b: V; }) => U[]'. +!!! error TS2322: Type '<{|T|0|}>(x: { {|a|1|}: {|T|2|}; {|b|3|}: {|T|4|}; }) => {|T|5|}[]' is not assignable to type '<{|U|6|}, {|V|7|}>(x: { {|a|8|}: {|U|9|}; {|b|10|}: {|V|11|}; }) => {|U|12|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'. +!!! error TS2322: Type '{ {|a|13|}: {|U|14|}; {|b|15|}: {|V|16|}; }' is not assignable to type '{ {|a|17|}: {|U|18|}; {|b|19|}: {|U|20|}; }'. !!! error TS2322: Types of property 'b' are incompatible. -!!! error TS2322: Type 'V' is not assignable to type 'U'. -!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|21|}' is not assignable to type '{|U|22|}'. +!!! error TS2322: '{|V|23|}' is assignable to the constraint of type '{|U|24|}', but '{|U|25|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:25 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:22 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:28 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:22 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:28 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:19 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:15:25 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 var b16: (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok ~~~ -!!! error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: U; b: V; }) => U[]'. +!!! error TS2322: Type '<{|T|0|} extends {|Base|1|}>(x: { {|a|2|}: {|T|3|}; {|b|4|}: {|T|5|}; }) => {|T|6|}[]' is not assignable to type '<{|U|7|}, {|V|8|}>(x: { {|a|9|}: {|U|10|}; {|b|11|}: {|V|12|}; }) => {|U|13|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2322: Type '{ {|a|14|}: {|U|15|}; {|b|16|}: {|V|17|}; }' is not assignable to type '{ {|a|18|}: {|Base|19|}; {|b|20|}: {|Base|21|}; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'Base'. +!!! error TS2322: Type '{|U|22|}' is not assignable to type '{|Base|23|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:32 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:38 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:22 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:28 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:22 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:28 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:32 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:3:7 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:16:38 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:3:7 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:3:7 var b17: (x: (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt index c26a01c3a5127..cfd2d73529cb2 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt @@ -45,8 +45,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme x.a3 = b3; b3 = x.a3; ~~ -!!! error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. -!!! error TS2322: Type 'void' is not assignable to type 'T'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => void' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type 'void' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:11:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:11:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:28:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:28:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:28:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:28:10 var b4: (x: T, y: U) => string; x.a4 = b4; b4 = x.a4; @@ -57,18 +63,71 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme x.a11 = b11; b11 = x.a11; ~~~ -!!! error TS2322: Type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +!!! error TS2322: Type '<{|T|0|}>(x: { {|foo|1|}: {|T|2|}; }, y: { {|foo|3|}: {|T|4|}; {|bar|5|}: {|T|6|}; }) => {|Base|7|}' is not assignable to type '<{|T|8|}, {|U|9|}>(x: { {|foo|10|}: {|T|11|}; }, y: { {|foo|12|}: {|U|13|}; {|bar|14|}: {|U|15|}; }) => {|Base|16|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. +!!! error TS2322: Type '{ {|foo|17|}: {|U|18|}; {|bar|19|}: {|U|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; {|bar|23|}: {|T|24|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|25|}' is not assignable to type '{|T|26|}'. +!!! error TS2322: '{|U|27|}' is assignable to the constraint of type '{|T|28|}', but '{|T|29|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:34 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:42 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:22 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:37 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:45 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:3:7 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:37 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:45 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:34 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:15:42 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:11 var b16: (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; ~~~ -!!! error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: T; b: T; }) => T[]'. +!!! error TS2322: Type '<{|T|0|} extends {|Base|1|}>(x: { {|a|2|}: {|T|3|}; {|b|4|}: {|T|5|}; }) => {|T|6|}[]' is not assignable to type '<{|T|7|}>(x: { {|a|8|}: {|T|9|}; {|b|10|}: {|T|11|}; }) => {|T|12|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2322: Type '{ {|a|13|}: {|T|14|}; {|b|15|}: {|T|16|}; }' is not assignable to type '{ {|a|17|}: {|Base|18|}; {|b|19|}: {|Base|20|}; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Base'. \ No newline at end of file +!!! error TS2322: Type '{|T|21|}' is not assignable to type '{|Base|22|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:32 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:38 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:19 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:25 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:25 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:32 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:3:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:17:38 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:3:7 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:3:7 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index cdf0ee400de41..f1fe6d2d79933 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -46,24 +46,30 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // these are errors t = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type 'T'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts:3:11 t = a3; ~ -!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type '{|T|0|}'. !!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts:3:11 t = (x: string) => 1; ~ -!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '{|T|0|}'. !!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts:3:11 t = function (x: string) { return ''; } ~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '{|T|0|}'. !!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts:3:11 a = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type 'new (x: number) => void'. !!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts:22:11 a = a3; ~ !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index b42670aa9022c..fba17d18aae1e 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -49,20 +49,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // errors t = () => 1; ~ -!!! error TS2741: Property 'f' is missing in type '() => number' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '() => number' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:3:11 t = function (x: number) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:3:11 a = () => 1; ~ -!!! error TS2741: Property 'f' is missing in type '() => number' but required in type '{ f: new (x: number) => void; }'. +!!! error TS2741: Property 'f' is missing in type '() => number' but required in type '{ {|f|0|}: new (x: number) => void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10 a = function (x: number) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type '{ f: new (x: number) => void; }'. +!!! error TS2741: Property 'f' is missing in type '(x: number) => string' but required in type '{ {|f|0|}: new (x: number) => void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10 interface S2 { f(x: string): void; @@ -72,42 +76,54 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // these are errors t = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type 'T'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. !!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:28:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:3:11 t = a3; ~ -!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. +!!! error TS2322: Type '{ {|f|0|}(x: string): void; }' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. !!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:3:11 t = (x: string) => 1; ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:3:11 t = function (x: string) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type 'T'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type '{|T|0|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:4:5: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:3:11 a = s2; ~ -!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{ {|f|1|}: new (x: number) => void; }'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. !!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:28:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10 a = a3; ~ -!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'. +!!! error TS2322: Type '{ {|f|0|}(x: string): void; }' is not assignable to type '{ {|f|1|}: new (x: number) => void; }'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. !!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10 a = (x: string) => 1; ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type '{ f: new (x: number) => void; }'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => number' but required in type '{ {|f|0|}: new (x: number) => void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10 a = function (x: string) { return ''; } ~ -!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type '{ f: new (x: number) => void; }'. +!!! error TS2741: Property 'f' is missing in type '(x: string) => string' but required in type '{ {|f|0|}: new (x: number) => void; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10: 'f' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts:7:10 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt index 52b7a9280a537..3aa1c6f3fe5b7 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt @@ -111,122 +111,308 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // ok ~ -!!! error TS2322: Type 'new (x: number) => number[]' is not assignable to type 'new (x: T) => T[]'. +!!! error TS2322: Type 'new (x: number) => number[]' is not assignable to type 'new <{|T|0|}>(x: {|T|1|}) => {|T|2|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:45:13 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:45:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:45:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:45:13 var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok ~~ -!!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => string[]'. +!!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new <{|T|0|}>(x: {|T|1|}) => string[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|2|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:48:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:48:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:48:14 var b3: new (x: T) => T; a3 = b3; // ok b3 = a3; // ok ~~ -!!! error TS2322: Type 'new (x: number) => void' is not assignable to type 'new (x: T) => T'. +!!! error TS2322: Type 'new (x: number) => void' is not assignable to type 'new <{|T|0|}>(x: {|T|1|}) => {|T|2|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:51:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:51:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:51:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:51:14 var b4: new (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok ~~ -!!! error TS2322: Type 'new (x: string, y: number) => string' is not assignable to type 'new (x: T, y: U) => T'. +!!! error TS2322: Type 'new (x: string, y: number) => string' is not assignable to type 'new <{|T|0|}, {|U|1|}>(x: {|T|2|}, y: {|U|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:17 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:14 var b5: new (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok ~~ -!!! error TS2322: Type 'new (x: (arg: string) => number) => string' is not assignable to type 'new (x: (arg: T) => U) => T'. +!!! error TS2322: Type 'new (x: (arg: string) => number) => string' is not assignable to type 'new <{|T|0|}, {|U|1|}>(x: (arg: {|T|2|}) => {|U|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|5|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:17 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:57:14 var b6: new (x: (arg: T) => U) => T; a6 = b6; // ok b6 = a6; // ok ~~ -!!! error TS2322: Type 'new (x: (arg: Base) => Derived) => Base' is not assignable to type 'new (x: (arg: T) => U) => T'. +!!! error TS2322: Type 'new (x: (arg: {|Base|0|}) => {|Derived|1|}) => {|Base|2|}' is not assignable to type 'new <{|T|3|} extends {|Base|4|}, {|U|5|} extends {|Derived|6|}>(x: (arg: {|T|7|}) => {|U|8|}) => {|T|9|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|10|}' is not assignable to type '{|T|11|}'. +!!! error TS2322: '{|Base|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{|Base|15|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:30 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:30 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:60:14 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 var b7: new (x: (arg: T) => U) => (r: T) => U; a7 = b7; // ok b7 = a7; // ok ~~ -!!! error TS2322: Type 'new (x: (arg: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U) => (r: T) => U'. +!!! error TS2322: Type 'new (x: (arg: {|Base|0|}) => {|Derived|1|}) => (r: {|Base|2|}) => {|Derived|3|}' is not assignable to type 'new <{|T|4|} extends {|Base|5|}, {|U|6|} extends {|Derived|7|}>(x: (arg: {|T|8|}) => {|U|9|}) => (r: {|T|10|}) => {|U|11|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|12|}' is not assignable to type '{|T|13|}'. +!!! error TS2322: '{|Base|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{|Base|17|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:30 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:30 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:30 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:14 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:63:14 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 var b8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; a8 = b8; // ok b8 = a8; // ok ~~ -!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U'. +!!! error TS2322: Type 'new (x: (arg: {|Base|0|}) => {|Derived|1|}, y: (arg2: {|Base|2|}) => {|Derived|3|}) => (r: {|Base|4|}) => {|Derived|5|}' is not assignable to type 'new <{|T|6|} extends {|Base|7|}, {|U|8|} extends {|Derived|9|}>(x: (arg: {|T|10|}) => {|U|11|}, y: (arg2: {|T|12|}) => {|U|13|}) => (r: {|T|14|}) => {|U|15|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|16|}' is not assignable to type '{|T|17|}'. +!!! error TS2322: '{|Base|18|}' is assignable to the constraint of type '{|T|19|}', but '{|T|20|}' could be instantiated with a different subtype of constraint '{|Base|21|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:30 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:30 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:30 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:30 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:66:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 var b9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; a9 = b9; // ok b9 = a9; // ok ~~ -!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U'. +!!! error TS2322: Type 'new (x: (arg: {|Base|0|}) => {|Derived|1|}, y: (arg2: {|Base|2|}) => {|Derived|3|}) => (r: {|Base|4|}) => {|Derived|5|}' is not assignable to type 'new <{|T|6|} extends {|Base|7|}, {|U|8|} extends {|Derived|9|}>(x: (arg: {|T|10|}) => {|U|11|}, y: (arg2: { {|foo|12|}: string; {|bing|13|}: number; }) => {|U|14|}) => (r: {|T|15|}) => {|U|16|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|17|}' is not assignable to type '{|T|18|}'. +!!! error TS2322: '{|Base|19|}' is assignable to the constraint of type '{|T|20|}', but '{|T|21|}' could be instantiated with a different subtype of constraint '{|Base|22|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:30 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:30 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:79 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:92 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:30 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:14 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:30 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:14 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:69:14 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 var b10: new (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok ~~~ -!!! error TS2322: Type 'new (...x: Derived[]) => Derived' is not assignable to type 'new (...x: T[]) => T'. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2322: Type 'new (...x: {|Derived|0|}[]) => {|Derived|1|}' is not assignable to type 'new <{|T|2|} extends {|Derived|3|}>(...x: {|T|4|}[]) => {|T|5|}'. +!!! error TS2322: Type '{|Derived|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|Derived|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Derived|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:72:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:72:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:72:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:72:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:72:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:72:15 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 var b11: new (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok ~~~ -!!! error TS2322: Type 'new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type 'new (x: T, y: T) => T'. +!!! error TS2322: Type 'new (x: { {|foo|0|}: string; }, y: { {|foo|1|}: string; {|bar|2|}: string; }) => {|Base|3|}' is not assignable to type 'new <{|T|4|} extends {|Base|5|}>(x: {|T|6|}, y: {|T|7|}) => {|T|8|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type '{ foo: string; bar: string; }'. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. +!!! error TS2322: Type '{|T|9|}' is not assignable to type '{ {|foo|10|}: string; {|bar|11|}: string; }'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|12|}' but required in type '{ {|foo|13|}: string; {|bar|14|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:53: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:40 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:53 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:75:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:75:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:75:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:75:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:75:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:40 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:53 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:40 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:53 var b12: new >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok ~~~ -!!! error TS2322: Type 'new (x: Base[], y: Derived2[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => Derived[]'. +!!! error TS2322: Type 'new (x: {|Base|0|}[], y: {|Derived2|1|}[]) => {|Derived|2|}[]' is not assignable to type 'new <{|T|3|} extends {|Base|4|}[]>(x: {|Base|5|}[], y: {|T|6|}) => {|Derived|7|}[]'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived2[]'. -!!! error TS2322: Type 'Base[]' is not assignable to type 'Derived2[]'. +!!! error TS2322: Type '{|T|8|}' is not assignable to type '{|Derived2|9|}[]'. +!!! error TS2322: Type '{|Base|10|}[]' is not assignable to type '{|Derived2|11|}[]'. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:5:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:78:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:78:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:78:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:5:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:5:7 var b13: new >(x: Array, y: T) => T; a13 = b13; // ok b13 = a13; // ok ~~~ -!!! error TS2322: Type 'new (x: Base[], y: Derived[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => T'. -!!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. -!!! error TS2322: 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. +!!! error TS2322: Type 'new (x: {|Base|0|}[], y: {|Derived|1|}[]) => {|Derived|2|}[]' is not assignable to type 'new <{|T|3|} extends {|Derived|4|}[]>(x: {|Base|5|}[], y: {|T|6|}) => {|T|7|}'. +!!! error TS2322: Type '{|Derived|8|}[]' is not assignable to type '{|T|9|}'. +!!! error TS2322: '{|Derived|10|}[]' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{|Derived|13|}[]'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:81:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:81:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:81:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:81:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:81:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:81:15 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:4:7 var b14: new (x: { a: T; b: T }) => T; a14 = b14; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => Object'. +!!! error TS2322: Type 'new <{|T|0|}>(x: { {|a|1|}: {|T|2|}; {|b|3|}: {|T|4|}; }) => {|T|5|}' is not assignable to type 'new (x: { {|a|6|}: string; {|b|7|}: number; }) => {|Object|8|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. +!!! error TS2322: Type '{ {|a|9|}: string; {|b|10|}: number; }' is not assignable to type '{ {|a|11|}: string; {|b|12|}: string; }'. !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:29 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:20 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:31 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:20 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:31 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:23 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:29 b14 = a14; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: string; b: number; }) => Object' is not assignable to type 'new (x: { a: T; b: T; }) => T'. +!!! error TS2322: Type 'new (x: { {|a|0|}: string; {|b|1|}: number; }) => {|Object|2|}' is not assignable to type 'new <{|T|3|}>(x: { {|a|4|}: {|T|5|}; {|b|6|}: {|T|7|}; }) => {|T|8|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|9|}: {|T|10|}; {|b|11|}: {|T|12|}; }' is not assignable to type '{ {|a|13|}: string; {|b|14|}: number; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|15|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:31 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:29 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:23 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:29 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:20 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:21:31 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15 var b15: new (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index fb9ba55b5efcb..bac68a6cd92b1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -123,119 +123,333 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a2 = b2; // ok b2 = a2; // ok ~~ -!!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => U[]'. +!!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new <{|T|0|}, {|U|1|}>(x: {|T|2|}) => {|U|3|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:43:22 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:43:25 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:43:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:43:25 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:43:22 var b7: new (x: (arg: T) => U) => (r: T) => V; a7 = b7; // ok b7 = a7; // ok ~~ -!!! error TS2322: Type 'new (x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type 'new (x: (arg: T) => U) => (r: T) => V'. +!!! error TS2322: Type 'new (x: (arg: {|Base|0|}) => {|Derived|1|}) => (r: {|Base|2|}) => {|Derived2|3|}' is not assignable to type 'new <{|T|4|} extends {|Base|5|}, {|U|6|} extends {|Derived|7|}, {|V|8|} extends {|Derived2|9|}>(x: (arg: {|T|10|}) => {|U|11|}) => (r: {|T|12|}) => {|V|13|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|14|}' is not assignable to type '{|T|15|}'. +!!! error TS2322: '{|Base|16|}' is assignable to the constraint of type '{|T|17|}', but '{|T|18|}' could be instantiated with a different subtype of constraint '{|Base|19|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:38 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:57 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:6:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:22 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:38 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:22 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:57 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:22 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:22 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:47:22 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, type mismatch ~~ -!!! error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. +!!! error TS2322: Type 'new <{|T|0|} extends {|Base|1|}, {|U|2|} extends {|Derived|3|}>(x: (arg: {|T|4|}) => {|U|5|}, y: (arg2: { {|foo|6|}: number; }) => {|U|7|}) => (r: {|T|8|}) => {|U|9|}' is not assignable to type 'new (x: (arg: {|Base|10|}) => {|Derived|11|}, y: (arg2: {|Base|12|}) => {|Derived|13|}) => (r: {|Base|14|}) => {|Derived|15|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. -!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2322: Type '{ {|foo|16|}: number; }' is not assignable to type '{|Base|17|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:87 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:87 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 b8 = a8; // error ~~ -!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. +!!! error TS2322: Type 'new (x: (arg: {|Base|0|}) => {|Derived|1|}, y: (arg2: {|Base|2|}) => {|Derived|3|}) => (r: {|Base|4|}) => {|Derived|5|}' is not assignable to type 'new <{|T|6|} extends {|Base|7|}, {|U|8|} extends {|Derived|9|}>(x: (arg: {|T|10|}) => {|U|11|}, y: (arg2: { {|foo|12|}: number; }) => {|U|13|}) => (r: {|T|14|}) => {|U|15|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. -!!! error TS2322: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Base|16|}' is not assignable to type '{|T|17|}'. +!!! error TS2322: '{|Base|18|}' is assignable to the constraint of type '{|T|19|}', but '{|T|20|}' could be instantiated with a different subtype of constraint '{|Base|21|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:87 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:38 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:51:22 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 var b10: new (...x: T[]) => T; a10 = b10; // ok b10 = a10; // ok ~~~ -!!! error TS2322: Type 'new (...x: Base[]) => Base' is not assignable to type 'new (...x: T[]) => T'. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. +!!! error TS2322: Type 'new (...x: {|Base|0|}[]) => {|Base|1|}' is not assignable to type 'new <{|T|2|} extends {|Derived|3|}>(...x: {|T|4|}[]) => {|T|5|}'. +!!! error TS2322: Type '{|Base|6|}' is not assignable to type '{|T|7|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:56:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:56:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:56:23 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:56:23 var b11: new (x: T, y: T) => T; a11 = b11; // ok b11 = a11; // ok ~~~ -!!! error TS2322: Type 'new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type 'new (x: T, y: T) => T'. -!!! error TS2322: Type 'Base' is not assignable to type 'T'. +!!! error TS2322: Type 'new (x: { {|foo|0|}: string; }, y: { {|foo|1|}: string; {|bar|2|}: string; }) => {|Base|3|}' is not assignable to type 'new <{|T|4|} extends {|Derived|5|}>(x: {|T|6|}, y: {|T|7|}) => {|T|8|}'. +!!! error TS2322: Type '{|Base|9|}' is not assignable to type '{|T|10|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:15:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:15:48 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:15:61 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:60:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:60:23 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:60:23 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:60:23 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:60:23 var b12: new >(x: Array, y: Array) => T; a12 = b12; // ok b12 = a12; // ok ~~~ -!!! error TS2322: Type 'new (x: Base[], y: Derived2[]) => Derived[]' is not assignable to type 'new (x: Base[], y: Base[]) => T'. -!!! error TS2322: Type 'Derived[]' is not assignable to type 'T'. +!!! error TS2322: Type 'new (x: {|Base|0|}[], y: {|Derived2|1|}[]) => {|Derived|2|}[]' is not assignable to type 'new <{|T|3|} extends {|Derived2|4|}[]>(x: {|Base|5|}[], y: {|Base|6|}[]) => {|T|7|}'. +!!! error TS2322: Type '{|Derived|8|}[]' is not assignable to type '{|T|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:6:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:64:23 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:6:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:64:23 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:64:23 var b15: new (x: { a: T; b: T }) => T; a15 = b15; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => number'. +!!! error TS2322: Type 'new <{|T|0|}>(x: { {|a|1|}: {|T|2|}; {|b|3|}: {|T|4|}; }) => {|T|5|}' is not assignable to type 'new (x: { {|a|6|}: string; {|b|7|}: number; }) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. +!!! error TS2322: Type '{ {|a|8|}: string; {|b|9|}: number; }' is not assignable to type '{ {|a|10|}: string; {|b|11|}: string; }'. !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:31 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:37 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:31 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:37 b15 = a15; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: string; b: number; }) => number' is not assignable to type 'new (x: { a: T; b: T; }) => T'. +!!! error TS2322: Type 'new (x: { {|a|0|}: string; {|b|1|}: number; }) => number' is not assignable to type 'new <{|T|2|}>(x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|8|}: {|T|9|}; {|b|10|}: {|T|11|}; }' is not assignable to type '{ {|a|12|}: string; {|b|13|}: number; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|14|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:37 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:31 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:37 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23 var b15a: new (x: { a: T; b: T }) => number; a15 = b15a; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: T; b: T; }) => number' is not assignable to type 'new (x: { a: string; b: number; }) => number'. +!!! error TS2322: Type 'new <{|T|0|} extends {|Base|1|}>(x: { {|a|2|}: {|T|3|}; {|b|4|}: {|T|5|}; }) => number' is not assignable to type 'new (x: { {|a|6|}: string; {|b|7|}: number; }) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2322: Type '{ {|a|8|}: string; {|b|9|}: number; }' is not assignable to type '{ {|a|10|}: {|Base|11|}; {|b|12|}: {|Base|13|}; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'Base'. +!!! error TS2322: Type 'string' is not assignable to type '{|Base|14|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:45 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:51 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:45 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:51 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 b15a = a15; // ok ~~~~ -!!! error TS2322: Type 'new (x: { a: string; b: number; }) => number' is not assignable to type 'new (x: { a: T; b: T; }) => number'. +!!! error TS2322: Type 'new (x: { {|a|0|}: string; {|b|1|}: number; }) => number' is not assignable to type 'new <{|T|2|} extends {|Base|3|}>(x: { {|a|4|}: {|T|5|}; {|b|6|}: {|T|7|}; }) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ {|a|8|}: {|T|9|}; {|b|10|}: {|T|11|}; }' is not assignable to type '{ {|a|12|}: string; {|b|13|}: number; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! error TS2322: Type 'Base' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|14|}' is not assignable to type 'string'. +!!! error TS2322: Type '{|Base|15|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:45 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:51 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:45 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:51 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:28 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:21:39 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:72:24 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error ~~~ -!!! error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. +!!! error TS2322: Type 'new <{|T|0|}>(x: (a: {|T|1|}) => {|T|2|}) => {|T|3|}[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. !!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 b16 = a16; // error ~~~ -!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. +!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <{|T|0|}>(x: (a: {|T|1|}) => {|T|2|}) => {|T|3|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. !!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: number): number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:76:23 var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error ~~~ -!!! error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. +!!! error TS2322: Type 'new <{|T|0|}>(x: (a: {|T|1|}) => {|T|2|}) => any[]' is not assignable to type '{ new (x: { new <{|T|3|} extends {|Derived|4|}>(a: {|T|5|}): {|T|6|}; new <{|T|7|} extends {|Base|8|}>(a: {|T|9|}): {|T|10|}; }): any[]; new (x: { new <{|T|11|} extends {|Derived2|12|}>(a: {|T|13|}): {|T|14|}; new <{|T|15|} extends {|Base|16|}>(a: {|T|17|}): {|T|18|}; }): any[]; }'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new <{|T|19|} extends {|Derived|20|}>(a: {|T|21|}): {|T|22|}; new <{|T|23|} extends {|Base|24|}>(a: {|T|25|}): {|T|26|}; }' is not assignable to type '(a: any) => any'. !!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:80:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:80:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:80:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:38:26 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:6:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:38:26 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:38:26 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:39:26 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:39:26 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:39:26 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 b17 = a17; // error ~~~ -!!! error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. +!!! error TS2322: Type '{ new (x: { new <{|T|0|} extends {|Derived|1|}>(a: {|T|2|}): {|T|3|}; new <{|T|4|} extends {|Base|5|}>(a: {|T|6|}): {|T|7|}; }): any[]; new (x: { new <{|T|8|} extends {|Derived2|9|}>(a: {|T|10|}): {|T|11|}; new <{|T|12|} extends {|Base|13|}>(a: {|T|14|}): {|T|15|}; }): any[]; }' is not assignable to type 'new <{|T|16|}>(x: (a: {|T|17|}) => {|T|18|}) => any[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. +!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <{|T|19|} extends {|Derived|20|}>(a: {|T|21|}): {|T|22|}; new <{|T|23|} extends {|Base|24|}>(a: {|T|25|}): {|T|26|}; }'. !!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: T): T'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:38:26 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:6:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:38:26 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:38:26 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:39:26 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:39:26 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:39:26 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:80:23 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:80:23 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:80:23 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:5:11 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:34:26 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:4:11 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:35:26 } module WithGenericSignaturesInBaseType { @@ -244,29 +458,61 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b2: new (x: T) => string[]; a2 = b2; // ok ~~ -!!! error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. -!!! error TS2322: Type 'string[]' is not assignable to type 'T[]'. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'new <{|T|0|}>(x: {|T|1|}) => string[]' is not assignable to type 'new <{|T|2|}>(x: {|T|3|}) => {|T|4|}[]'. +!!! error TS2322: Type 'string[]' is not assignable to type '{|T|5|}[]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|6|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 b2 = a2; // ok ~~ -!!! error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. -!!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type 'new <{|T|0|}>(x: {|T|1|}) => {|T|2|}[]' is not assignable to type 'new <{|T|3|}>(x: {|T|4|}) => string[]'. +!!! error TS2322: Type '{|T|5|}[]' is not assignable to type 'string[]'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:87:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22 // target type has generic call signature var a3: new (x: T) => string[]; var b3: new (x: T) => T[]; a3 = b3; // ok ~~ -!!! error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. -!!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type 'new <{|T|0|}>(x: {|T|1|}) => {|T|2|}[]' is not assignable to type 'new <{|T|3|}>(x: {|T|4|}) => string[]'. +!!! error TS2322: Type '{|T|5|}[]' is not assignable to type 'string[]'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22 b3 = a3; // ok ~~ -!!! error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. -!!! error TS2322: Type 'string[]' is not assignable to type 'T[]'. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'new <{|T|0|}>(x: {|T|1|}) => string[]' is not assignable to type 'new <{|T|2|}>(x: {|T|3|}) => {|T|4|}[]'. +!!! error TS2322: Type 'string[]' is not assignable to type '{|T|5|}[]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|6|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:94:22 } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt index bfd92f7e93004..3997a162af7e0 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt @@ -61,8 +61,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a3 = b3; // ok b3 = a3; // ok ~~ -!!! error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. -!!! error TS2322: Type 'void' is not assignable to type 'T'. +!!! error TS2322: Type 'new <{|T|0|}>(x: {|T|1|}) => void' is not assignable to type 'new <{|T|2|}>(x: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type 'void' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:10:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:10:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:38:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:38:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:38:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:38:14 var b4: new (x: T, y: U) => string; a4 = b4; // ok b4 = a4; // ok @@ -76,31 +82,111 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a11 = b11; // ok b11 = a11; // ok ~~~ -!!! error TS2322: Type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +!!! error TS2322: Type 'new <{|T|0|}>(x: { {|foo|1|}: {|T|2|}; }, y: { {|foo|3|}: {|T|4|}; {|bar|5|}: {|T|6|}; }) => {|Base|7|}' is not assignable to type 'new <{|T|8|}, {|U|9|}>(x: { {|foo|10|}: {|T|11|}; }, y: { {|foo|12|}: {|U|13|}; {|bar|14|}: {|U|15|}; }) => {|Base|16|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. +!!! error TS2322: Type '{ {|foo|17|}: {|U|18|}; {|bar|19|}: {|U|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; {|bar|23|}: {|T|24|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|25|}' is not assignable to type '{|T|26|}'. +!!! error TS2322: '{|U|27|}' is assignable to the constraint of type '{|T|28|}', but '{|T|29|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:38 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:46 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:26 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:41 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:49 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:3:7 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:41 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:49 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:38 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:14:46 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:15 var b15: new (x: { a: U; b: V; }) => U[]; a15 = b15; // ok b15 = a15; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: U; b: V; }) => U[]'. +!!! error TS2322: Type 'new <{|T|0|}>(x: { {|a|1|}: {|T|2|}; {|b|3|}: {|T|4|}; }) => {|T|5|}[]' is not assignable to type 'new <{|U|6|}, {|V|7|}>(x: { {|a|8|}: {|U|9|}; {|b|10|}: {|V|11|}; }) => {|U|12|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'. +!!! error TS2322: Type '{ {|a|13|}: {|U|14|}; {|b|15|}: {|V|16|}; }' is not assignable to type '{ {|a|17|}: {|U|18|}; {|b|19|}: {|U|20|}; }'. !!! error TS2322: Types of property 'b' are incompatible. -!!! error TS2322: Type 'V' is not assignable to type 'U'. -!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|21|}' is not assignable to type '{|U|22|}'. +!!! error TS2322: '{|V|23|}' is assignable to the constraint of type '{|U|24|}', but '{|U|25|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:29 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:26 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:32 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:26 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:32 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:23 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:15:29 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 var b16: new (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok ~~~ -!!! error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: U; b: V; }) => U[]'. +!!! error TS2322: Type 'new <{|T|0|} extends {|Base|1|}>(x: { {|a|2|}: {|T|3|}; {|b|4|}: {|T|5|}; }) => {|T|6|}[]' is not assignable to type 'new <{|U|7|}, {|V|8|}>(x: { {|a|9|}: {|U|10|}; {|b|11|}: {|V|12|}; }) => {|U|13|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2322: Type '{ {|a|14|}: {|U|15|}; {|b|16|}: {|V|17|}; }' is not assignable to type '{ {|a|18|}: {|Base|19|}; {|b|20|}: {|Base|21|}; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'Base'. +!!! error TS2322: Type '{|U|22|}' is not assignable to type '{|Base|23|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:36 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:42 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:26 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:32 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:26 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:32 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:36 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:3:7 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:16:42 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:3:7 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:3:7 var b17: new (x: new (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt index 1397dfe528b1f..32b5198160fef 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt @@ -45,8 +45,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme x.a3 = b3; b3 = x.a3; ~~ -!!! error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. -!!! error TS2322: Type 'void' is not assignable to type 'T'. +!!! error TS2322: Type 'new <{|T|0|}>(x: {|T|1|}) => void' is not assignable to type 'new <{|T|2|}>(x: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type 'void' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:11:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:11:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:28:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:28:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:28:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:28:14 var b4: new (x: T, y: U) => string; x.a4 = b4; b4 = x.a4; @@ -57,18 +63,71 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme x.a11 = b11; b11 = x.a11; ~~~ -!!! error TS2322: Type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +!!! error TS2322: Type 'new <{|T|0|}>(x: { {|foo|1|}: {|T|2|}; }, y: { {|foo|3|}: {|T|4|}; {|bar|5|}: {|T|6|}; }) => {|Base|7|}' is not assignable to type 'new <{|T|8|}, {|U|9|}>(x: { {|foo|10|}: {|T|11|}; }, y: { {|foo|12|}: {|U|13|}; {|bar|14|}: {|U|15|}; }) => {|Base|16|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. +!!! error TS2322: Type '{ {|foo|17|}: {|U|18|}; {|bar|19|}: {|U|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; {|bar|23|}: {|T|24|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|25|}' is not assignable to type '{|T|26|}'. +!!! error TS2322: '{|U|27|}' is assignable to the constraint of type '{|T|28|}', but '{|T|29|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:38 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:46 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:26 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:41 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:49 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:3:7 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:41 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:49 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:38 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:15:46 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:15 var b16: new (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; ~~~ -!!! error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: T; b: T; }) => T[]'. +!!! error TS2322: Type 'new <{|T|0|} extends {|Base|1|}>(x: { {|a|2|}: {|T|3|}; {|b|4|}: {|T|5|}; }) => {|T|6|}[]' is not assignable to type 'new <{|T|7|}>(x: { {|a|8|}: {|T|9|}; {|b|10|}: {|T|11|}; }) => {|T|12|}[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2322: Type '{ {|a|13|}: {|T|14|}; {|b|15|}: {|T|16|}; }' is not assignable to type '{ {|a|17|}: {|Base|18|}; {|b|19|}: {|Base|20|}; }'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Base'. \ No newline at end of file +!!! error TS2322: Type '{|T|21|}' is not assignable to type '{|Base|22|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:36 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:42 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:23 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:29 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:23 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:29 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:36 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:3:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:17:42 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:3:7 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:3:7 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt index e5e3ee8b49992..7ec07eb8ff04c 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt @@ -58,11 +58,16 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // S is *not* assignable to T2 when S["a"] is 2 t = s; ~ -!!! error TS2322: Type 'S' is not assignable to type 'T'. -!!! error TS2322: Type 'S' is not assignable to type '{ a: 2; b: 3; }'. +!!! error TS2322: Type '{|S|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: Type '{|S|2|}' is not assignable to type '{ {|a|3|}: 2; {|b|4|}: 3; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type '0 | 2' is not assignable to type '2'. !!! error TS2322: Type '0' is not assignable to type '2'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:34:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:35:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:34:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:37:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:37:26 } // Unmatched non-discriminants @@ -78,9 +83,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // S is *not* assignable to T2 when S["a"] is 2 as S is missing "c" t = s; ~ -!!! error TS2322: Type 'S' is not assignable to type 'T'. -!!! error TS2322: Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 4 | 3; c: string; }'. +!!! error TS2322: Type '{|S|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: Property 'c' is missing in type '{|S|2|}' but required in type '{ {|a|3|}: 2; {|b|4|}: 4 | 3; {|c|5|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:52:36: 'c' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:49:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:50:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:49:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:52:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:52:26 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:52:36 } // Maximum discriminant combinations @@ -106,11 +117,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // combinations is too complex. t = s; ~ -!!! error TS2322: Type 'S' is not assignable to type 'T'. -!!! error TS2322: Type 'S' is not assignable to type '{ a: 0 | 2 | 1; b: 0 | 2 | 1; c: 2; }'. +!!! error TS2322: Type '{|S|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: Type '{|S|2|}' is not assignable to type '{ {|a|3|}: 0 | 2 | 1; {|b|4|}: 0 | 2 | 1; {|c|5|}: 2; }'. !!! error TS2322: Types of property 'c' are incompatible. !!! error TS2322: Type '0 | 2 | 1' is not assignable to type '2'. !!! error TS2322: Type '0' is not assignable to type '2'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:67:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:68:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:67:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:76:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:76:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:76:28 } // https://github.com/Microsoft/TypeScript/issues/14865 diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt index adf305d868d19..ad17061f2ab9c 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt @@ -24,13 +24,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // Both errors a = b; ~ -!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|A|1|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'T[]' is not assignable to type 'T'. -!!! error TS2322: 'T[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|2|}[]' is not assignable to type '{|T|3|}'. +!!! error TS2322: '{|T|4|}[]' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:4:6 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:4:6 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:4:6 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:4:6 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:4:6 b = a; ~ -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|B|1|}'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'S' is not assignable to type 'S[]'. +!!! error TS2322: Type '{|S|2|}' is not assignable to type '{|S|3|}[]'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:7:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:8:6 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:8:6 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt index a38822b8044e4..34b39d1dfbb15 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt @@ -19,9 +19,29 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme x = y y = x ~ -!!! error TS2322: Type '>(z: T) => void' is not assignable to type '>>(z: T) => void'. +!!! error TS2322: Type '<{|T|0|} extends {|I2|1|}<{|T|2|}>>(z: {|T|3|}) => void' is not assignable to type '<{|T|4|} extends {|I2|5|}<{|I2|6|}<{|T|7|}>>>(z: {|T|8|}) => void'. !!! error TS2322: Types of parameters 'z' and 'z' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'I2'. -!!! error TS2322: Type 'I2>' is not assignable to type 'I2'. -!!! error TS2322: Type 'I2' is not assignable to type 'T'. +!!! error TS2322: Type '{|T|9|}' is not assignable to type '{|I2|10|}<{|T|11|}>'. +!!! error TS2322: Type '{|I2|12|}<{|I2|13|}<{|T|14|}>>' is not assignable to type '{|I2|15|}<{|T|16|}>'. +!!! error TS2322: Type '{|I2|17|}<{|T|18|}>' is not assignable to type '{|T|19|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:7:9 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:7:9 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:7:9 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:3:11 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts:8:9 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt index d5b212a414a9c..a8568869e4d1f 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -107,7 +107,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params ~~~~~~ -!!! error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. +!!! error TS2322: Type '(x: {|T|0|}) => any' is not assignable to type '() => {|T|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:4:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:4:16 this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params @@ -118,7 +120,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params ~~~~~~~ -!!! error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}, y: {|T|1|}) => any' is not assignable to type '(x: {|T|2|}) => {|T|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:4:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:4:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:4:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:4:16 this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params @@ -160,145 +166,395 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // all errors b.a = t.a; ~~~ -!!! error TS2322: Type '() => T' is not assignable to type '() => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => {|T|0|}' is not assignable to type '<{|T|1|}>() => {|T|2|}'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|T|4|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 b.a = t.a2; ~~~ -!!! error TS2322: Type '(x?: T) => T' is not assignable to type '() => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '(x?: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>() => {|T|3|}'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|T|5|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 b.a = t.a3; ~~~ -!!! error TS2322: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2322: Type '(x: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>() => {|T|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 b.a = t.a4; ~~~ -!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +!!! error TS2322: Type '(x: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>() => {|T|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 b.a = t.a5; ~~~ -!!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '() => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '(x?: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>() => {|T|4|}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:42:13 b.a2 = t.a; ~~~~ -!!! error TS2322: Type '() => T' is not assignable to type '(x?: T) => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => {|T|0|}' is not assignable to type '<{|T|1|}>(x?: {|T|2|}) => {|T|3|}'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|T|5|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 b.a2 = t.a2; ~~~~ -!!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x?: {|T|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a2 = t.a3; ~~~~ -!!! error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x?: {|T|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a2 = t.a4; ~~~~ -!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x?: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a2 = t.a5; ~~~~ -!!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x?: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a3 = t.a; ~~~~ -!!! error TS2322: Type '() => T' is not assignable to type '(x: T) => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => {|T|0|}' is not assignable to type '<{|T|1|}>(x: {|T|2|}) => {|T|3|}'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|T|5|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 b.a3 = t.a2; ~~~~ -!!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a3 = t.a3; ~~~~ -!!! error TS2322: Type '(x: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a3 = t.a4; ~~~~ -!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a3 = t.a5; ~~~~ -!!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a4 = t.a; ~~~~ -!!! error TS2322: Type '() => T' is not assignable to type '(x: T, y?: T) => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => {|T|0|}' is not assignable to type '<{|T|1|}>(x: {|T|2|}, y?: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 b.a4 = t.a2; ~~~~ -!!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x: {|T|3|}, y?: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a4 = t.a3; ~~~~ -!!! error TS2322: Type '(x: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x: {|T|3|}, y?: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a4 = t.a4; ~~~~ -!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x: {|T|4|}, y?: {|T|5|}) => {|T|6|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a4 = t.a5; ~~~~ -!!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x: {|T|4|}, y?: {|T|5|}) => {|T|6|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a5 = t.a; ~~~~ -!!! error TS2322: Type '() => T' is not assignable to type '(x?: T, y?: T) => T'. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => {|T|0|}' is not assignable to type '<{|T|1|}>(x?: {|T|2|}, y?: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|T|6|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 b.a5 = t.a2; ~~~~ -!!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x?: {|T|3|}, y?: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a5 = t.a3; ~~~~ -!!! error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}) => {|T|1|}' is not assignable to type '<{|T|2|}>(x?: {|T|3|}, y?: {|T|4|}) => {|T|5|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a5 = t.a4; ~~~~ -!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2322: Type '(x: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x?: {|T|4|}, y?: {|T|5|}) => {|T|6|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 b.a5 = t.a5; ~~~~ -!!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2322: Type '(x?: {|T|0|}, y?: {|T|1|}) => {|T|2|}' is not assignable to type '<{|T|3|}>(x?: {|T|4|}, y?: {|T|5|}) => {|T|6|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2322: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18 } } @@ -316,7 +572,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params ~~~~~~ -!!! error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}) => any' is not assignable to type '<{|T|2|}>() => {|T|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:107:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:107:23 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:98:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:98:13 this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params @@ -327,7 +587,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params ~~~~~~~ -!!! error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => any' is not assignable to type '<{|T|3|}>(x: {|T|4|}) => {|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:116:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:116:24 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:116:24 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:100:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:100:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:100:14 this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index 7358455430c80..e109d52126a9c 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -38,18 +38,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: number]: {|Derived|1|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: number]: {|Derived2|1|}; }'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 module Generics { class A { @@ -65,30 +71,62 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: number]: Derived; } a = b; // error ~ -!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: {|Derived|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:21:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:3:11 b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: number]: {|Derived|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:21:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:11 var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: {|Derived2|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2322: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived2|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:21:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:3:11 b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: number]: {|Derived2|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived2'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived2|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived2|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:21:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:29:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:5:11 var b3: { [x: number]: T; } a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt index f4b2e46f44f96..c0cca2d1c473a 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -38,18 +38,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: number]: {|Derived|1|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: number]: {|Derived2|1|}; }'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 module Generics { interface A { @@ -65,30 +71,62 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: number]: Derived; } a = b; // error ~ -!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: {|Derived|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:21:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:3:11 b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: number]: {|Derived|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:21:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:11 var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: {|Derived2|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2322: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived2|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:21:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:3:11 b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: number]: {|Derived2|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived2'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived2|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived2|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:21:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:29:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:5:11 var b3: { [x: number]: T; } a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt index 1f279ba2858f7..dab6a81a7f977 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -26,10 +26,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // error ~ -!!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: {|Base|0|}; }' is not assignable to type '{|A|1|}'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:11 b = a; // ok class B2 extends A { @@ -40,10 +44,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b2; // ok b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: number]: {|Derived2|1|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Property 'baz' is missing in type 'Derived' but required in type 'Derived2'. +!!! error TS2322: Property 'baz' is missing in type '{|Derived|2|}' but required in type '{|Derived2|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:5:38: 'baz' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:5:11 module Generics { class A { @@ -55,10 +63,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: number]: Derived; }; a = b; // error ~ -!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: number]: {|Derived|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2322: Type '{|Derived|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Derived|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:26:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:30:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:30:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:30:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:30:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:11 b = a; // ok var b2: { [x: number]: T; }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt index 5f53c581c79aa..78a8dfecc1057 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -77,80 +77,145 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = t; // error ~ -!!! error TS2322: Type 'T' is not assignable to type 'S'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|S|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Property 'bar' is missing in type 'Derived2' but required in type 'Derived'. +!!! error TS2322: Property 'bar' is missing in type '{|Derived2|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:9:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:8:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 t = s; // error ~ -!!! error TS2322: Type 'S' is not assignable to type 'T'. +!!! error TS2322: Type '{|S|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Property 'baz' is missing in type 'Derived' but required in type 'Derived2'. +!!! error TS2322: Property 'baz' is missing in type '{|Derived|2|}' but required in type '{|Derived2|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:35: 'baz' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:8:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:9:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 s = s2; // ok s = a2; // ok s2 = t2; // error ~~ -!!! error TS2322: Type 'T2' is not assignable to type 'S2'. +!!! error TS2322: Type '{|T2|0|}' is not assignable to type '{|S2|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:14:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:13:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 t2 = s2; // error ~~ -!!! error TS2322: Type 'S2' is not assignable to type 'T2'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{|T2|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Derived|2|}' is not assignable to type '{|Derived2|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:13:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:14:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 s2 = t; // error ~~ -!!! error TS2322: Type 'T' is not assignable to type 'S2'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|S2|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:9:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:13:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 s2 = b; // error ~~ -!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2'. +!!! error TS2322: Type '{ {|foo|0|}: {|Derived2|1|}; }' is not assignable to type '{|S2|2|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|Derived|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:19:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:13:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 s2 = a2; // ok a = b; // error ~ -!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Derived2|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|4|}' is not assignable to type '{|Derived|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:19:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:18:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 b = a; // error ~ -!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Derived|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived2|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Derived|4|}' is not assignable to type '{|Derived2|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:18:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:19:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 a = s; // ok a = s2; // ok a = a2; // ok a2 = b2; // error ~~ -!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Derived2|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|4|}' is not assignable to type '{|Derived|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:22:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:21:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 b2 = a2; // error ~~ -!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Derived|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived2|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Derived|4|}' is not assignable to type '{|Derived2|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:21:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:22:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 a2 = b; // error ~~ -!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Derived2|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|4|}' is not assignable to type '{|Derived|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:19:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:21:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 a2 = t2; // error ~~ -!!! error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }'. +!!! error TS2322: Type '{|T2|0|}' is not assignable to type '{ {|foo|1|}: {|Derived|2|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|Derived|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:14:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:21:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 a2 = t; // error ~~ -!!! error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{ {|foo|1|}: {|Derived|2|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|Derived|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:9:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:21:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:11 } module WithBase { @@ -177,19 +242,27 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = t; // ok t = s; // error ~ -!!! error TS2322: Type 'S' is not assignable to type 'T'. +!!! error TS2322: Type '{|S|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Property 'baz' is missing in type 'Base' but required in type 'Derived2'. +!!! error TS2322: Property 'baz' is missing in type '{|Base|2|}' but required in type '{|Derived2|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:35: 'baz' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:53:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:54:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:49:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:11 s = s2; // ok s = a2; // ok s2 = t2; // ok t2 = s2; // error ~~ -!!! error TS2322: Type 'S2' is not assignable to type 'T2'. +!!! error TS2322: Type '{|S2|0|}' is not assignable to type '{|T2|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Base|2|}' is not assignable to type '{|Derived2|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:58:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:59:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:49:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:11 s2 = t; // ok s2 = b; // ok s2 = a2; // ok @@ -197,9 +270,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // error ~ -!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Base|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived2|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Base|4|}' is not assignable to type '{|Derived2|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:63:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:49:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:64:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:49:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:11 a = s; // ok a = s2; // ok a = a2; // ok @@ -207,9 +286,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a2 = b2; // ok b2 = a2; // error ~~ -!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. +!!! error TS2322: Type '{ {|foo|0|}: {|Base|1|}; }' is not assignable to type '{ {|foo|2|}: {|Derived2|3|}; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Base|4|}' is not assignable to type '{|Derived2|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:66:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:49:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:67:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:49:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:11 a2 = b; // ok a2 = t2; // ok a2 = t; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt index ce025fde17982..1b62635a78e35 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt @@ -17,9 +17,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme c = i; // error ~ -!!! error TS2741: Property 'foo' is missing in type 'I' but required in type 'C'. +!!! error TS2741: Property 'foo' is missing in type '{|I|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:2:5: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:1:7 i = c; // error ~ -!!! error TS2741: Property 'fooo' is missing in type 'C' but required in type 'I'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:8:5: 'fooo' is declared here. \ No newline at end of file +!!! error TS2741: Property 'fooo' is missing in type '{|C|0|}' but required in type '{|I|1|}'. +!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:8:5: 'fooo' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:7:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index c1093ab0ffe87..3d41e44ea511b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt @@ -81,49 +81,65 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = d; a = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{ {|foo|1|}: string; }'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:13:14 b = a; b = i; b = d; b = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'Base'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|Base|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:5:11 i = a; i = b; i = d; i = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'I'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:9:15 d = a; d = b; d = i; d = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'D'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|D|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:18:11 e = a; // errror ~ -!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E'. +!!! error TS2322: Type '{ {|foo|0|}: string; }' is not assignable to type '{|E|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:13:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 e = b; // errror ~ -!!! error TS2322: Type 'Base' is not assignable to type 'E'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{|E|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 e = i; // errror ~ -!!! error TS2322: Type 'I' is not assignable to type 'E'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|E|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:9:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 e = d; // errror ~ -!!! error TS2322: Type 'D' is not assignable to type 'E'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|E|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:18:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:22:11 e = e; } @@ -155,78 +171,110 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // error ~ -!!! error TS2322: Type 'Base' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{ {|foo|1|}: string; }'. !!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:58:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:65:14 a = i; // error ~ -!!! error TS2322: Type 'I' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{ {|foo|1|}: string; }'. !!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:62:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:65:14 a = d; a = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{ {|foo|1|}: string; }'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:65:14 b = a; // error ~ -!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Base'. +!!! error TS2322: Type '{ {|foo|0|}: string; }' is not assignable to type '{|Base|1|}'. !!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:65:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:58:11 b = i; b = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type 'Base'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|Base|1|}'. !!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:70:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:58:11 b = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'Base'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|Base|1|}'. !!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:58:11 b = b; i = a; // error ~ -!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ {|foo|0|}: string; }' is not assignable to type '{|I|1|}'. !!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:65:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:62:15 i = b; i = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type 'I'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:70:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:62:15 i = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'I'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:62:15 i = i; d = a; d = b; // error ~ -!!! error TS2322: Type 'Base' is not assignable to type 'D'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{|D|1|}'. !!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:58:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:70:11 d = i; // error ~ -!!! error TS2322: Type 'I' is not assignable to type 'D'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|D|1|}'. !!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:62:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:70:11 d = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'D'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|D|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:70:11 e = a; // errror ~ -!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E'. +!!! error TS2322: Type '{ {|foo|0|}: string; }' is not assignable to type '{|E|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:65:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 e = b; // errror ~ -!!! error TS2322: Type 'Base' is not assignable to type 'E'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{|E|1|}'. !!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:58:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 e = i; // errror ~ -!!! error TS2322: Type 'I' is not assignable to type 'E'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|E|1|}'. !!! error TS2322: Types have separate declarations of a private property 'foo'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:62:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 e = d; // errror ~ -!!! error TS2322: Type 'D' is not assignable to type 'E'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|E|1|}'. !!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:70:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts:74:11 e = e; } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt index b378086ca5e56..6d4bc351457c2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt @@ -87,34 +87,50 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme c = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Property 'opt' is optional in type 'D' but required in type 'C'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:60:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:51:15 c = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Property 'opt' is optional in type 'E' but required in type 'C'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:63:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:51:15 c = f; // ok c = a; // ok a = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{ {|opt|1|}: {|Base|2|}; }'. !!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:60:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:56:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:3:7 a = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{ {|opt|1|}: {|Base|2|}; }'. !!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:63:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:56:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:3:7 a = f; // ok a = c; // ok b = d; // error ~ -!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{ {|opt|1|}: {|Base|2|}; }'. !!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:60:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:57:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:3:7 b = e; // error ~ -!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{ {|opt|1|}: {|Base|2|}; }'. !!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:63:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:57:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts:3:7 b = f; // ok b = a; // ok b = c; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 4121337fdad53..25570c0662c53 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -112,44 +112,68 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme c = d; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'D' but required in type 'C'. +!!! error TS2741: Property 'opt' is missing in type '{|D|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:61:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:52:15 c = e; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'E' but required in type 'C'. +!!! error TS2741: Property 'opt' is missing in type '{|E|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:64:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:52:15 c = f; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'F' but required in type 'C'. +!!! error TS2741: Property 'opt' is missing in type '{|F|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:67:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:52:15 c = a; // ok a = d; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. +!!! error TS2741: Property 'opt' is missing in type '{|D|0|}' but required in type '{ {|opt|1|}: {|Base|2|}; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:61:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:4:7 a = e; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. +!!! error TS2741: Property 'opt' is missing in type '{|E|0|}' but required in type '{ {|opt|1|}: {|Base|2|}; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:64:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:4:7 a = f; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. +!!! error TS2741: Property 'opt' is missing in type '{|F|0|}' but required in type '{ {|opt|1|}: {|Base|2|}; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:67:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:4:7 a = c; // ok b = d; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. +!!! error TS2741: Property 'opt' is missing in type '{|D|0|}' but required in type '{ {|opt|1|}: {|Base|2|}; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:61:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:4:7 b = e; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. +!!! error TS2741: Property 'opt' is missing in type '{|E|0|}' but required in type '{ {|opt|1|}: {|Base|2|}; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:64:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:4:7 b = f; // error ~ -!!! error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. +!!! error TS2741: Property 'opt' is missing in type '{|F|0|}' but required in type '{ {|opt|1|}: {|Base|2|}; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:67:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:4:7 b = a; // ok b = c; // ok } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index b9cfa3c6b2bd6..4faa352cad581 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -52,74 +52,114 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = t; ~ -!!! error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. +!!! error TS2741: Property ''1'' is missing in type '{|T|0|}' but required in type '{|S|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:6:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:11 t = s; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. +!!! error TS2741: Property ''1.'' is missing in type '{|S|0|}' but required in type '{|T|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:6:15: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:6:11 s = s2; // ok s = a2; ~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +!!! error TS2741: Property ''1'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{|S|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:11 s2 = t2; ~~ -!!! error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{|T2|0|}' but required in type '{|S2|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:11:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:15 t2 = s2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. +!!! error TS2741: Property ''1.0'' is missing in type '{|S2|0|}' but required in type '{|T2|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:11:20: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:11:15 s2 = t; ~~ -!!! error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{|T|0|}' but required in type '{|S2|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:6:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:15 s2 = b; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ {|'1.0'|0|}: string; {|baz|1|}?: string; }' but required in type '{|S2|2|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:29 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:15 s2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{|S2|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:15 a = b; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ {|'1.0'|0|}: string; {|baz|1|}?: string; }' but required in type '{ {|'1.'|2|}: string; {|bar|3|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:29 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:28 b = a; ~ -!!! error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ {|'1.'|0|}: string; {|bar|1|}?: string; }' but required in type '{ {|'1.0'|2|}: string; {|baz|3|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:28 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:29 a = s; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{|S|0|}' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:28 a = s2; ~ -!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{|S2|0|}' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:28 a = a2; ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:28 a2 = b2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ {|'1'|0|}: string; }' but required in type '{ {|'1.0'|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:19:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16 b2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. +!!! error TS2741: Property ''1'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{ {|'1'|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:19:16 a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{|T|0|}' but required in type '{ {|'1.0'|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:6:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16 } module NumbersAndStrings { @@ -144,8 +184,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = s2; // ok s = a2; // error ~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +!!! error TS2741: Property ''1'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{|S|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:46:15: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:46:11 s2 = t2; // ok t2 = s2; // ok @@ -153,52 +195,85 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s2 = b; // ok s2 = a2; // error ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +!!! error TS2741: Property ''1'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{|S2|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:51:15 a = b; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ {|1.0|0|}: string; {|baz|1|}?: string; }' but required in type '{ {|'1.'|2|}: string; {|bar|3|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:27 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:28 b = a; // error ~ -!!! error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1.0: string; baz?: string; }'. +!!! error TS2741: Property '1.0' is missing in type '{ {|'1.'|0|}: string; {|bar|1|}?: string; }' but required in type '{ {|1.0|2|}: string; {|baz|3|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:14: '1.0' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:28 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:27 a = s; // error ~ -!!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{|S|0|}' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:46:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:28 a = s2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{|S2|0|}' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:51:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:28 a = a2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:28 a = b2; // error ~ -!!! error TS2741: Property ''1.'' is missing in type '{ 1.: string; }' but required in type '{ '1.': string; bar?: string; }'. +!!! error TS2741: Property ''1.'' is missing in type '{ {|1.|0|}: string; }' but required in type '{ {|'1.'|1|}: string; {|bar|2|}?: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:60:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:28 a2 = b2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1.: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ {|1.|0|}: string; }' but required in type '{ {|'1.0'|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:60:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 b2 = a2; // error ~~ -!!! error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1.: string; }'. +!!! error TS2741: Property '1.' is missing in type '{ {|'1.0'|0|}: string; }' but required in type '{ {|1.|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:60:16: '1.' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:60:16 a2 = b; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ {|1.0|0|}: string; {|baz|1|}?: string; }' but required in type '{ {|'1.0'|2|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:27 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 a2 = t2; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{|T2|0|}' but required in type '{ {|'1.0'|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:52:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 a2 = t; // error ~~ -!!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{|T|0|}' but required in type '{ {|'1.0'|1|}: string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:47:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16 } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt index 3773229f5161f..c48c1776f22de 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -52,6 +52,7 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type d = C; // Error ~ -!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type 'typeof {|C|0|}' is not assignable to type 'new (x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatWithOverloads.ts:23:7 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index b3970325dc298..89d6d6ee4b929 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -45,18 +45,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: string]: {|Derived|1|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: string]: {|Derived2|1|}; }'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 module Generics { class A { @@ -72,9 +78,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b1; // ok b1 = a1; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +!!! error TS2322: Type '{|A|0|}<{|Base|1|}>' is not assignable to type '{ [x: string]: {|Derived|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Base|3|}' is not assignable to type '{|Derived|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 class B2 extends A { [x: string]: Derived2; // ok @@ -84,38 +95,75 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b2; // ok b2 = a1; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}<{|Base|1|}>' is not assignable to type '{ [x: string]: {|Derived2|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Base|3|}' is not assignable to type '{|Derived2|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: string]: {|Derived|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:22:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 b3 = a3; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: string]: {|Derived|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:11 var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: string]: {|Derived2|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2322: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived2|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:22:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 b4 = a3; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: string]: {|Derived2|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived2'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived2|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived2|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:22:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:43:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:5:11 } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index f90f8a41feb05..f2d453950edae 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -45,18 +45,24 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a = b; // ok b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: string]: {|Derived|1|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2322: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{ [x: string]: {|Derived2|1|}; }'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 module Generics { interface A { @@ -72,9 +78,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b1; // ok b1 = a1; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +!!! error TS2322: Type '{|A|0|}<{|Base|1|}>' is not assignable to type '{ [x: string]: {|Derived|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|Base|3|}' is not assignable to type '{|Derived|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:22:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 interface B2 extends A { [x: string]: Derived2; // ok @@ -84,38 +95,75 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a1 = b2; // ok b2 = a1; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}<{|Base|1|}>' is not assignable to type '{ [x: string]: {|Derived2|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|Base|3|}' is not assignable to type '{|Derived2|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:22:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: string]: {|Derived|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived' is not assignable to type 'T'. -!!! error TS2322: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:22:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 b3 = a3; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: string]: {|Derived|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:22:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:11 var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: string]: {|Derived2|0|}; }' is not assignable to type '{|A|1|}<{|T|2|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2322: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2322: Type '{|Derived2|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|Derived2|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{|Base|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:22:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 b4 = a3; // error ~~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: string]: {|Derived2|2|}; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'Derived2'. -!!! error TS2322: Type 'Base' is not assignable to type 'Derived2'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|Derived2|4|}'. +!!! error TS2322: Type '{|Base|5|}' is not assignable to type '{|Derived2|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:22:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:43:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:5:11 } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index 4b4c03678d7eb..1396114382ca1 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -32,14 +32,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme var b: { [x: string]: string; } a = b; // error ~ -!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type '{|A|0|}<{|T|1|}>'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:13:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:17:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:17:18 b = a; // error ~ -!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }'. +!!! error TS2322: Type '{|A|0|}<{|T|1|}>' is not assignable to type '{ [x: string]: string; }'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! error TS2322: Type 'Derived' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|2|}' is not assignable to type 'string'. +!!! error TS2322: Type '{|Derived|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:13:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:17:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:17:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts:4:11 } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability11.errors.txt b/tests/baselines/reference/assignmentCompatability11.errors.txt index 21d49c6d3ae3a..d29e9e3652576 100644 --- a/tests/baselines/reference/assignmentCompatability11.errors.txt +++ b/tests/baselines/reference/assignmentCompatability11.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: number; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability11.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability11.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability12.errors.txt b/tests/baselines/reference/assignmentCompatability12.errors.txt index 07b65bdc463cf..8ca9f1e24ae76 100644 --- a/tests/baselines/reference/assignmentCompatability12.errors.txt +++ b/tests/baselines/reference/assignmentCompatability12.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: string; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability12.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability12.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability13.errors.txt b/tests/baselines/reference/assignmentCompatability13.errors.txt index ea7e62c422f41..3b03a9c741192 100644 --- a/tests/baselines/reference/assignmentCompatability13.errors.txt +++ b/tests/baselines/reference/assignmentCompatability13.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. -!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: string; }'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability13.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability13.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability14.errors.txt b/tests/baselines/reference/assignmentCompatability14.errors.txt index 2ba77622f3391..4fdda0bc3900a 100644 --- a/tests/baselines/reference/assignmentCompatability14.errors.txt +++ b/tests/baselines/reference/assignmentCompatability14.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: boolean; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability14.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability14.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability15.errors.txt b/tests/baselines/reference/assignmentCompatability15.errors.txt index c56719d0895d7..27a1197eaad55 100644 --- a/tests/baselines/reference/assignmentCompatability15.errors.txt +++ b/tests/baselines/reference/assignmentCompatability15.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: boolean; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability15.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability15.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index 71a93f11b35f3..ac584f17114b3 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: any[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'any[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'any[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability16.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability16.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index a87bcff2e92ec..69312c9d3a0cf 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: any[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'any[]'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'any[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability17.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability17.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index 8ab5e5dcd07c6..937566cbe175c 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: number[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'number[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'number[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability18.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability18.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index e84e665cefabc..dcd5834157f97 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: number[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number[]'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability19.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability19.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index 2e67a2a20337f..577573bd3d38f 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: string[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability20.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability20.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index 44e24e7d0b5cc..b9e2acafa809a 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: string[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'string[]'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'string[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability21.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability21.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index cb42a7abaef74..4e5e3d557b846 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: boolean[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability22.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability22.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index 7b54e8559eb87..85b27160ec1a3 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: boolean[]; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'boolean[]'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'boolean[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability23.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability23.ts:6:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability24.errors.txt b/tests/baselines/reference/assignmentCompatability24.errors.txt index 9d200272b31cb..b309636e77151 100644 --- a/tests/baselines/reference/assignmentCompatability24.errors.txt +++ b/tests/baselines/reference/assignmentCompatability24.errors.txt @@ -13,5 +13,9 @@ tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '<{|Tstring|1|}>(a: {|Tstring|2|}) => {|Tstring|3|}'. +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability24.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability24.ts:6:33 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatability24.ts:6:33 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatability24.ts:6:33 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index 7f7e7f73ee0b0..5c1b3c3235de5 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: number; }'. !!! error TS2322: Types of property 'two' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability25.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability25.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index a005850e49c6e..671d8594f5655 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: string; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability26.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability26.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index 180a51b3cf000..5aeff910620e3 100644 --- a/tests/baselines/reference/assignmentCompatability27.errors.txt +++ b/tests/baselines/reference/assignmentCompatability27.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. -!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|two|1|}: string; }'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability27.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability27.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index 2360d0b1e9d44..2195033808c8d 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: boolean; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability28.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability28.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 9ba5c35d52832..0f2536b0f1147 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: any[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'any[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'any[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability29.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability29.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index 43f7f3f9c0a62..19c2dc169ddb8 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: number[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'number[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'number[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability30.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability30.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index 8874ebf06a6e4..3be4d1a3a65d6 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: string[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability31.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability31.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index 00164a48fd621..d98b5a36b837c 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -14,6 +14,8 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ {|one|1|}: boolean[]; }'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability32.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability32.ts:6:20 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index a67e0c2ae0796..0f8f5e10adffb 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -13,5 +13,9 @@ tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '<{|Tstring|1|}>(a: {|Tstring|2|}) => {|Tstring|3|}'. +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability33.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability33.ts:6:24 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatability33.ts:6:24 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatability33.ts:6:24 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index 1dced22968baf..c16ed748ec315 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -13,5 +13,9 @@ tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '<{|Tnumber|1|}>(a: {|Tnumber|2|}) => {|Tnumber|3|}'. +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability34.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability34.ts:6:24 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatability34.ts:6:24 +!!! annotated symbol 3 tests/cases/compiler/assignmentCompatability34.ts:6:24 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index 2073b861f523b..9472aadc5b71d 100644 --- a/tests/baselines/reference/assignmentCompatability35.errors.txt +++ b/tests/baselines/reference/assignmentCompatability35.errors.txt @@ -13,5 +13,6 @@ tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [index: number]: number; }'. -!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{ [index: number]: number; }'. +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability35.ts:2:22 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index b007955968fbd..1df55b500ff1d 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -13,5 +13,8 @@ tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type 'new <{|Tnumber|1|}>(param: {|Tnumber|2|}) => any'. +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability37.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability37.ts:6:26 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatability37.ts:6:26 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index 9b5aebca8e342..c2f67104bfcf8 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -13,5 +13,8 @@ tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'inte } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type 'new <{|Tstring|1|}>(param: {|Tstring|2|}) => any'. +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability38.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability38.ts:6:26 +!!! annotated symbol 2 tests/cases/compiler/assignmentCompatability38.ts:6:26 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability39.errors.txt b/tests/baselines/reference/assignmentCompatability39.errors.txt index 6389a9ad87f8d..35e3d57b02bc5 100644 --- a/tests/baselines/reference/assignmentCompatability39.errors.txt +++ b/tests/baselines/reference/assignmentCompatability39.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'inte } __test2__.__val__x2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic'. -!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithTwoPublic'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{|classWithTwoPublic|1|}'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithTwoPublic'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability39.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability39.ts:6:26 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability40.errors.txt b/tests/baselines/reference/assignmentCompatability40.errors.txt index d60f7dcdeb629..021cf26e18e01 100644 --- a/tests/baselines/reference/assignmentCompatability40.errors.txt +++ b/tests/baselines/reference/assignmentCompatability40.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'inte } __test2__.__val__x5 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate'. -!!! error TS2322: Property 'one' is private in type 'classWithPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{|classWithPrivate|1|}'. +!!! error TS2322: Property 'one' is private in type 'classWithPrivate' but not in type 'interfaceWithPublicAndOptional'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability40.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability40.ts:6:28 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability41.errors.txt b/tests/baselines/reference/assignmentCompatability41.errors.txt index ad0b7b7cfe30d..63d458d4683b8 100644 --- a/tests/baselines/reference/assignmentCompatability41.errors.txt +++ b/tests/baselines/reference/assignmentCompatability41.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'inte } __test2__.__val__x6 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate'. -!!! error TS2322: Property 'one' is private in type 'classWithTwoPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{|classWithTwoPrivate|1|}'. +!!! error TS2322: Property 'one' is private in type 'classWithTwoPrivate' but not in type 'interfaceWithPublicAndOptional'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability41.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability41.ts:6:25 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability42.errors.txt b/tests/baselines/reference/assignmentCompatability42.errors.txt index e86b261e68228..355d01468751c 100644 --- a/tests/baselines/reference/assignmentCompatability42.errors.txt +++ b/tests/baselines/reference/assignmentCompatability42.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'inte } __test2__.__val__x7 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate'. -!!! error TS2322: Property 'two' is private in type 'classWithPublicPrivate' but not in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{|classWithPublicPrivate|1|}'. +!!! error TS2322: Property 'two' is private in type 'classWithPublicPrivate' but not in type 'interfaceWithPublicAndOptional'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability42.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability42.ts:6:22 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability43.errors.txt b/tests/baselines/reference/assignmentCompatability43.errors.txt index a1f596ef7e26f..f63fbbafe620b 100644 --- a/tests/baselines/reference/assignmentCompatability43.errors.txt +++ b/tests/baselines/reference/assignmentCompatability43.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'inte } __test2__.__val__obj2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo'. -!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'interfaceTwo'. \ No newline at end of file +!!! error TS2322: Type '{|interfaceWithPublicAndOptional|0|}' is not assignable to type '{|interfaceTwo|1|}'. +!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'interfaceTwo'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability43.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability43.ts:6:40 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index cc61e0ebfe475..e9a3e79ebff2c 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -21,18 +21,22 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi // Should fail x = ''; ~ -!!! error TS2322: Type '""' is not assignable to type 'Applicable'. +!!! error TS2322: Type '""' is not assignable to type '{|Applicable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 x = ['']; ~ -!!! error TS2741: Property 'apply' is missing in type 'string[]' but required in type 'Applicable'. +!!! error TS2741: Property 'apply' is missing in type 'string[]' but required in type '{|Applicable|0|}'. !!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 x = 4; ~ -!!! error TS2322: Type '4' is not assignable to type 'Applicable'. +!!! error TS2322: Type '4' is not assignable to type '{|Applicable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 x = {}; ~ -!!! error TS2741: Property 'apply' is missing in type '{}' but required in type 'Applicable'. +!!! error TS2741: Property 'apply' is missing in type '{}' but required in type '{|Applicable|0|}'. !!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 // Should work function f() { }; @@ -43,18 +47,23 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi // Should Fail fn(''); ~~ -!!! error TS2345: Argument of type '""' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{|Applicable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 fn(['']); ~~~~ -!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{|Applicable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 fn(4); ~ -!!! error TS2345: Argument of type '4' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type '4' is not assignable to parameter of type '{|Applicable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 fn({}); ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. -!!! error TS2345: Property 'apply' is missing in type '{}' but required in type 'Applicable'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{|Applicable|0|}'. +!!! error TS2345: Property 'apply' is missing in type '{}' but required in type '{|Applicable|1|}'. !!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:3:11 // Should work diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index d1894692635a5..593cecf08f283 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -21,18 +21,22 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio // Should fail x = ''; ~ -!!! error TS2322: Type '""' is not assignable to type 'Callable'. +!!! error TS2322: Type '""' is not assignable to type '{|Callable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 x = ['']; ~ -!!! error TS2741: Property 'call' is missing in type 'string[]' but required in type 'Callable'. +!!! error TS2741: Property 'call' is missing in type 'string[]' but required in type '{|Callable|0|}'. !!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 x = 4; ~ -!!! error TS2322: Type '4' is not assignable to type 'Callable'. +!!! error TS2322: Type '4' is not assignable to type '{|Callable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 x = {}; ~ -!!! error TS2741: Property 'call' is missing in type '{}' but required in type 'Callable'. +!!! error TS2741: Property 'call' is missing in type '{}' but required in type '{|Callable|0|}'. !!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 // Should work function f() { }; @@ -43,18 +47,23 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio // Should Fail fn(''); ~~ -!!! error TS2345: Argument of type '""' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{|Callable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 fn(['']); ~~~~ -!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{|Callable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 fn(4); ~ -!!! error TS2345: Argument of type '4' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type '4' is not assignable to parameter of type '{|Callable|0|}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 fn({}); ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. -!!! error TS2345: Property 'call' is missing in type '{}' but required in type 'Callable'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{|Callable|0|}'. +!!! error TS2345: Property 'call' is missing in type '{}' but required in type '{|Callable|1|}'. !!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. +!!! annotated symbol 0 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 +!!! annotated symbol 1 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:3:11 // Should work diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt b/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt index 88c822f6dcb60..26dcd7c2ccb75 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt @@ -41,15 +41,19 @@ tests/cases/compiler/assignmentIndexedToPrimitives.ts(15,7): error TS2322: Type const no1: number = { 0: 1 }; ~~~ -!!! error TS2322: Type '{ 0: number; }' is not assignable to type 'number'. +!!! error TS2322: Type '{ {|0|0|}: number; }' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/assignmentIndexedToPrimitives.ts:11:23 const so1: string = { 0: 1 }; ~~~ -!!! error TS2322: Type '{ 0: number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|0|0|}: number; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentIndexedToPrimitives.ts:13:23 const so2: string = { "0": 1 }; ~~~ -!!! error TS2322: Type '{ "0": number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|"0"|0|}: number; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentIndexedToPrimitives.ts:14:23 const so3: string = { 0: "1" }; ~~~ -!!! error TS2322: Type '{ 0: string; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|0|0|}: string; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentIndexedToPrimitives.ts:15:23 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentStricterConstraints.errors.txt b/tests/baselines/reference/assignmentStricterConstraints.errors.txt index f00b8313eac8d..30909efc8e20d 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.errors.txt +++ b/tests/baselines/reference/assignmentStricterConstraints.errors.txt @@ -13,9 +13,23 @@ tests/cases/compiler/assignmentStricterConstraints.ts(7,1): error TS2322: Type ' g = f ~ -!!! error TS2322: Type '(x: T, y: S) => void' is not assignable to type '(x: T, y: S) => void'. +!!! error TS2322: Type '<{|T|0|}, {|S|1|} extends {|T|2|}>(x: {|T|3|}, y: {|S|4|}) => void' is not assignable to type '<{|T|5|}, {|S|6|}>(x: {|T|7|}, y: {|S|8|}) => void'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2322: Type 'S' is not assignable to type 'T'. -!!! error TS2322: 'S' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|S|9|}' is not assignable to type '{|T|10|}'. +!!! error TS2322: '{|S|11|}' is assignable to the constraint of type '{|T|12|}', but '{|T|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/assignmentStricterConstraints.ts:1:19 +!!! annotated symbol 1 tests/cases/compiler/assignmentStricterConstraints.ts:1:22 +!!! annotated symbol 2 tests/cases/compiler/assignmentStricterConstraints.ts:1:19 +!!! annotated symbol 3 tests/cases/compiler/assignmentStricterConstraints.ts:1:19 +!!! annotated symbol 4 tests/cases/compiler/assignmentStricterConstraints.ts:1:22 +!!! annotated symbol 5 tests/cases/compiler/assignmentStricterConstraints.ts:5:19 +!!! annotated symbol 6 tests/cases/compiler/assignmentStricterConstraints.ts:5:22 +!!! annotated symbol 7 tests/cases/compiler/assignmentStricterConstraints.ts:5:19 +!!! annotated symbol 8 tests/cases/compiler/assignmentStricterConstraints.ts:5:22 +!!! annotated symbol 9 tests/cases/compiler/assignmentStricterConstraints.ts:5:22 +!!! annotated symbol 10 tests/cases/compiler/assignmentStricterConstraints.ts:5:19 +!!! annotated symbol 11 tests/cases/compiler/assignmentStricterConstraints.ts:5:22 +!!! annotated symbol 12 tests/cases/compiler/assignmentStricterConstraints.ts:5:19 +!!! annotated symbol 13 tests/cases/compiler/assignmentStricterConstraints.ts:5:19 g(1, "") \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObject.errors.txt b/tests/baselines/reference/assignmentToObject.errors.txt index aa1222bd79991..6d5f8a59a1ee3 100644 --- a/tests/baselines/reference/assignmentToObject.errors.txt +++ b/tests/baselines/reference/assignmentToObject.errors.txt @@ -8,7 +8,9 @@ tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: var b: {} = a; // ok var c: Object = a; // should be error ~ -!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'. +!!! error TS2322: Type '{ {|toString|0|}: number; }' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type 'number' is not assignable to type '() => string'. +!!! annotated symbol 0 tests/cases/compiler/assignmentToObject.ts:1:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt index 897c96a1c8f7d..510d5a6dabb33 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt +++ b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt @@ -40,6 +40,9 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type var badFundule: Function = bad; // error ~~~~~~~~~~ -!!! error TS2322: Type 'typeof bad' is not assignable to type 'Function'. +!!! error TS2322: Type 'typeof {|bad|0|}' is not assignable to type '{|Function|1|}'. !!! error TS2322: Types of property 'apply' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type '(this: Function, thisArg: any, argArray?: any) => any'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type '(this: {|Function|2|}, thisArg: any, argArray?: any) => any'. +!!! annotated symbol 0 tests/cases/compiler/assignmentToObjectAndFunction.ts:24:10 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:272:11 \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt index 6b4b0a71c6fe1..0fa99d43badfe 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt @@ -37,11 +37,31 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1 !!! error TS1055: Type 'PromiseLike' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. async function fn6(): Thenable { } // error ~~~~~~~~ -!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. -!!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike'. +!!! error TS1055: Type 'typeof {|Thenable|0|}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +!!! error TS1055: Type '{|Thenable|1|}' is not assignable to type '{|PromiseLike|2|}<{|T|3|}>'. !!! error TS1055: Types of property 'then' are incompatible. -!!! error TS1055: Type '() => void' is not assignable to type '(onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. -!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike'. +!!! error TS1055: Type '() => void' is not assignable to type '<{|TResult1|4|} = {|T|5|}, {|TResult2|6|} = never>(onfulfilled?: (value: {|T|7|}) => {|TResult1|8|} | {|PromiseLike|9|}<{|TResult1|10|}>, onrejected?: (reason: any) => {|TResult2|11|} | {|PromiseLike|12|}<{|TResult2|13|}>) => {|PromiseLike|14|}<{|TResult1|15|} | {|TResult2|16|}>'. +!!! error TS1055: Type 'void' is not assignable to type '{|PromiseLike|17|}<{|TResult1|18|} | {|TResult2|19|}>'. +!!! annotated symbol 0 tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts:1:15 +!!! annotated symbol 1 tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts:1:15 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1384:44 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1384:44 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1384:44 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 13 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 16 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 18 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 19 /.ts/lib.es5.d.ts:1393:24 async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise async function fn9() { return null; } // valid: Promise diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index e99cac7968cf8..e582abd5d4e39 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt @@ -23,7 +23,8 @@ tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignatur var v2: { ~~ -!!! error TS2322: Type '() => void' is not assignable to type '{ [n: number]: Bar; }'. +!!! error TS2322: Type '() => void' is not assignable to type '{ [n: number]: {|Bar|0|}; }'. !!! error TS2322: Index signature is missing in type '() => void'. +!!! annotated symbol 0 tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts:2:11 [n: number]: Bar } = f; // Should be allowed \ No newline at end of file diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt b/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt index 5f46ee70d2aaa..d2a11935115ee 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt @@ -33,12 +33,22 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Pro n: Derived | string; ~ !!! error TS2416: Property 'n' in type 'Derived' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'string | Derived' is not assignable to type 'string | Base'. -!!! error TS2416: Type 'Derived' is not assignable to type 'string | Base'. -!!! error TS2416: Type 'Derived' is not assignable to type 'Base'. +!!! error TS2416: Type 'string | {|Derived|0|}' is not assignable to type 'string | {|Base|1|}'. +!!! error TS2416: Type '{|Derived|2|}' is not assignable to type 'string | {|Base|3|}'. +!!! error TS2416: Type '{|Derived|4|}' is not assignable to type '{|Base|5|}'. !!! error TS2416: Types of property 'n' are incompatible. -!!! error TS2416: Type 'string | Derived' is not assignable to type 'string | Base'. -!!! error TS2416: Type 'Derived' is not assignable to type 'string | Base'. +!!! error TS2416: Type 'string | {|Derived|6|}' is not assignable to type 'string | {|Base|7|}'. +!!! error TS2416: Type '{|Derived|8|}' is not assignable to type 'string | {|Base|9|}'. +!!! annotated symbol 0 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:7:7 +!!! annotated symbol 3 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 4 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:7:7 +!!! annotated symbol 5 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 6 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:7:7 +!!! annotated symbol 7 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 8 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:7:7 +!!! annotated symbol 9 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 fn() { ~~ !!! error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. @@ -52,12 +62,22 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Pro n: DerivedInterface | string; ~ !!! error TS2416: Property 'n' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'string | DerivedInterface' is not assignable to type 'string | Base'. -!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'string | Base'. -!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'Base'. +!!! error TS2416: Type 'string | {|DerivedInterface|0|}' is not assignable to type 'string | {|Base|1|}'. +!!! error TS2416: Type '{|DerivedInterface|2|}' is not assignable to type 'string | {|Base|3|}'. +!!! error TS2416: Type '{|DerivedInterface|4|}' is not assignable to type '{|Base|5|}'. !!! error TS2416: Types of property 'n' are incompatible. -!!! error TS2416: Type 'string | DerivedInterface' is not assignable to type 'string | Base'. -!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'string | Base'. +!!! error TS2416: Type 'string | {|DerivedInterface|6|}' is not assignable to type 'string | {|Base|7|}'. +!!! error TS2416: Type '{|DerivedInterface|8|}' is not assignable to type 'string | {|Base|9|}'. +!!! annotated symbol 0 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:13:7 +!!! annotated symbol 3 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 4 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:13:7 +!!! annotated symbol 5 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 6 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:13:7 +!!! annotated symbol 7 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 +!!! annotated symbol 8 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:13:7 +!!! annotated symbol 9 tests/cases/compiler/baseClassImprovedMismatchErrors.ts:1:7 fn() { ~~ !!! error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. diff --git a/tests/baselines/reference/baseConstraintOfDecorator.errors.txt b/tests/baselines/reference/baseConstraintOfDecorator.errors.txt index 8317e5c55c660..82d907f96da6e 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.errors.txt +++ b/tests/baselines/reference/baseConstraintOfDecorator.errors.txt @@ -22,8 +22,13 @@ tests/cases/compiler/baseConstraintOfDecorator.ts(12,40): error TS2507: Type 'TF ~~~~~~~~~ }; ~~~~~~ -!!! error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'. -!!! error TS2322: 'typeof decoratorFunc' is assignable to the constraint of type 'TFunction', but 'TFunction' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'typeof {|decoratorFunc|0|}' is not assignable to type '{|TFunction|1|}'. +!!! error TS2322: 'typeof {|decoratorFunc|2|}' is assignable to the constraint of type '{|TFunction|3|}', but '{|TFunction|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/baseConstraintOfDecorator.ts:2:18 +!!! annotated symbol 1 tests/cases/compiler/baseConstraintOfDecorator.ts:1:31 +!!! annotated symbol 2 tests/cases/compiler/baseConstraintOfDecorator.ts:2:18 +!!! annotated symbol 3 tests/cases/compiler/baseConstraintOfDecorator.ts:1:31 +!!! annotated symbol 4 tests/cases/compiler/baseConstraintOfDecorator.ts:1:31 } class MyClass { private x; } @@ -43,6 +48,8 @@ tests/cases/compiler/baseConstraintOfDecorator.ts(12,40): error TS2507: Type 'TF ~~~~~~~~~ }; ~~~~~~ -!!! error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'. +!!! error TS2322: Type 'typeof {|decoratorFunc|0|}' is not assignable to type '{|TFunction|1|}'. +!!! annotated symbol 0 tests/cases/compiler/baseConstraintOfDecorator.ts:12:18 +!!! annotated symbol 1 tests/cases/compiler/baseConstraintOfDecorator.ts:11:32 } \ No newline at end of file diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index fb63428b876b4..69ffd59af82c2 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -31,9 +31,13 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o class C extends B implements I { ~ -!!! error TS2420: Class 'C' incorrectly implements interface 'I'. -!!! error TS2420: Property 'x' is missing in type 'C' but required in type 'I'. +!!! error TS2420: Class '{|C|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'x' is missing in type '{|C|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/compiler/bases.ts:2:5: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/bases.ts:11:7 +!!! annotated symbol 1 tests/cases/compiler/bases.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/bases.ts:11:7 +!!! annotated symbol 3 tests/cases/compiler/bases.ts:1:11 constructor() { ~~~~~~~~~~~~~~~ this.x: any; diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index 993f43d5a055f..81d832a1eaa05 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -29,8 +29,10 @@ tests/cases/compiler/bigintWithLib.ts(43,26): error TS2345: Argument of type '12 bigIntArray = new BigInt64Array([1n, 2n, 3n]); bigIntArray = new BigInt64Array([1, 2, 3]); // should error ~~~~~~~~~ -!!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. +!!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type '{|ArrayBuffer|0|} | {|SharedArrayBuffer|1|}'. !!! error TS2345: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1507:11 +!!! annotated symbol 1 /.ts/lib.es2017.sharedmemory.d.ts:24:11 bigIntArray = new BigInt64Array(new ArrayBuffer(80)); bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8); bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3); @@ -46,8 +48,11 @@ tests/cases/compiler/bigintWithLib.ts(43,26): error TS2345: Argument of type '12 bigUintArray = new BigUint64Array([1n, 2n, 3n]); bigUintArray = new BigUint64Array([1, 2, 3]); // should error ~~~~~~~~~ -!!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. -!!! error TS2345: Type 'number[]' is not assignable to type 'SharedArrayBuffer'. +!!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type '{|ArrayBuffer|0|} | {|SharedArrayBuffer|1|}'. +!!! error TS2345: Type 'number[]' is not assignable to type '{|SharedArrayBuffer|2|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1507:11 +!!! annotated symbol 1 /.ts/lib.es2017.sharedmemory.d.ts:24:11 +!!! annotated symbol 2 /.ts/lib.es2017.sharedmemory.d.ts:24:11 bigUintArray = new BigUint64Array(new ArrayBuffer(80)); bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8); bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8, 3); diff --git a/tests/baselines/reference/bigintWithoutLib.errors.txt b/tests/baselines/reference/bigintWithoutLib.errors.txt index f507ad4f9c6eb..855082e8f20d5 100644 --- a/tests/baselines/reference/bigintWithoutLib.errors.txt +++ b/tests/baselines/reference/bigintWithoutLib.errors.txt @@ -70,7 +70,8 @@ tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2339: Property 'getBigU !!! error TS2737: BigInt literals are not available when targeting lower than ESNext. bigintVal = bigintVal.valueOf(); // should error - bigintVal inferred as {} ~~~~~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'bigint'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type 'bigint'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 let stringVal: string = bigintVal.toString(); // should not error - bigintVal inferred as {} stringVal = bigintVal.toString(2); // should error - bigintVal inferred as {} ~ diff --git a/tests/baselines/reference/bluebirdStaticThis.errors.txt b/tests/baselines/reference/bluebirdStaticThis.errors.txt index 257cc1bb82339..77c9ddd063ff2 100644 --- a/tests/baselines/reference/bluebirdStaticThis.errors.txt +++ b/tests/baselines/reference/bluebirdStaticThis.errors.txt @@ -14,9 +14,17 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"tes // Tests by: Bart van der Schoor export declare class Promise implements Promise.Thenable { ~~~~~~~ -!!! error TS2420: Class 'Promise' incorrectly implements interface 'Thenable'. -!!! error TS2420: Property 'then' is missing in type 'Promise' but required in type 'Thenable'. +!!! error TS2420: Class '{|Promise|0|}<{|R|1|}>' incorrectly implements interface '{|Thenable|2|}<{|R|3|}>'. +!!! error TS2420: Property 'then' is missing in type '{|Promise|4|}<{|R|5|}>' but required in type '{|Thenable|6|}<{|R|7|}>'. !!! related TS2728 tests/cases/compiler/bluebirdStaticThis.ts:113:3: 'then' is declared here. +!!! annotated symbol 0 tests/cases/compiler/bluebirdStaticThis.ts:5:22 +!!! annotated symbol 1 tests/cases/compiler/bluebirdStaticThis.ts:5:30 +!!! annotated symbol 2 tests/cases/compiler/bluebirdStaticThis.ts:112:19 +!!! annotated symbol 3 tests/cases/compiler/bluebirdStaticThis.ts:5:30 +!!! annotated symbol 4 tests/cases/compiler/bluebirdStaticThis.ts:5:22 +!!! annotated symbol 5 tests/cases/compiler/bluebirdStaticThis.ts:5:30 +!!! annotated symbol 6 tests/cases/compiler/bluebirdStaticThis.ts:112:19 +!!! annotated symbol 7 tests/cases/compiler/bluebirdStaticThis.ts:5:30 constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable) => void, reject: (error: any) => void) => void); static try(dit: typeof Promise, fn: () => Promise.Thenable, args?: any[], ctx?: any): Promise; static try(dit: typeof Promise, fn: () => R, args?: any[], ctx?: any): Promise; diff --git a/tests/baselines/reference/booleanAssignment.errors.txt b/tests/baselines/reference/booleanAssignment.errors.txt index fc25fd4007fff..76b2bfe8786e9 100644 --- a/tests/baselines/reference/booleanAssignment.errors.txt +++ b/tests/baselines/reference/booleanAssignment.errors.txt @@ -10,16 +10,21 @@ tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not a var b = new Boolean(); b = 1; // Error ~ -!!! error TS2322: Type '1' is not assignable to type 'Boolean'. +!!! error TS2322: Type '1' is not assignable to type '{|Boolean|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:529:11 b = "a"; // Error ~ -!!! error TS2322: Type '"a"' is not assignable to type 'Boolean'. +!!! error TS2322: Type '"a"' is not assignable to type '{|Boolean|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:529:11 b = {}; // Error ~ -!!! error TS2322: Type '{}' is not assignable to type 'Boolean'. +!!! error TS2322: Type '{}' is not assignable to type '{|Boolean|0|}'. !!! error TS2322: Types of property 'valueOf' are incompatible. -!!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'. -!!! error TS2322: Type 'Object' is not assignable to type 'boolean'. +!!! error TS2322: Type '() => {|Object|1|}' is not assignable to type '() => boolean'. +!!! error TS2322: Type '{|Object|2|}' is not assignable to type 'boolean'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:529:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 var o = {}; o = b; // OK diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt index 2ca3bb1aaf00a..7d5da057b74e9 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt @@ -68,10 +68,12 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign // S's interface I2 extends Base2 { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I2|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type '(x: number) => string' is not assignable to type '(x: number) => number'. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:57:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:50:15 // N's a: (x: number) => string; // error because base returns non-void; } @@ -79,11 +81,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign // S's interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => string' is not assignable to type '(x: T) => T'. -!!! error TS2430: Type 'string' is not assignable to type 'T'. -!!! error TS2430: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '<{|T|2|}>(x: {|T|3|}) => string' is not assignable to type '<{|T|4|}>(x: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type 'string' is not assignable to type '{|T|7|}'. +!!! error TS2430: 'string' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:63:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:50:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:65:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:65:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:53:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:53:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:53:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:53:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:53:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts:53:14 // N's a2: (x: T) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 671c09b3d7906..c020a9900b7e6 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -92,12 +92,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I2 extends A { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}, {|U|2|}>' incorrectly extends interface '{|A|3|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'. +!!! error TS2430: Type '(x: {|T|4|}) => {|U|5|}[]' is not assignable to type '(x: number) => string[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'number' is not assignable to type 'T'. -!!! error TS2430: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'number' is not assignable to type '{|T|6|}'. +!!! error TS2430: 'number' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:25 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:25 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:51:22 a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -108,14 +117,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I4 extends A { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'a8' are incompatible. -!!! error TS2430: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. +!!! error TS2430: Type '<{|T|2|} extends {|Base|3|}, {|U|4|} extends {|Derived|5|}>(x: (arg: {|T|6|}) => {|U|7|}, y: (arg2: { {|foo|8|}: number; }) => {|U|9|}) => (r: {|T|10|}) => {|U|11|}' is not assignable to type '(x: (arg: {|Base|12|}) => {|Derived|13|}, y: (arg2: {|Base|14|}) => {|Derived|15|}) => (r: {|Base|16|}) => {|Derived|17|}'. !!! error TS2430: Types of parameters 'y' and 'y' are incompatible. !!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. -!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2430: Type '{ {|foo|18|}: number; }' is not assignable to type '{|Base|19|}'. !!! error TS2430: Types of property 'foo' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:60:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:34 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:34 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:83 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:34 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:34 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:61:83 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } @@ -133,25 +162,56 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I6 extends A { ~~ -!!! error TS2430: Interface 'I6' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I6|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'a15' are incompatible. -!!! error TS2430: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'. +!!! error TS2430: Type '<{|T|2|}>(x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}' is not assignable to type '(x: { {|a|8|}: string; {|b|9|}: number; }) => number'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. +!!! error TS2430: Type '{ {|a|10|}: string; {|b|11|}: number; }' is not assignable to type '{ {|a|12|}: string; {|b|13|}: string; }'. !!! error TS2430: Types of property 'b' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:76:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:19 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:27 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:33 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:19 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:24 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:35 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:24 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:35 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:27 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:77:33 a15: (x: { a: T; b: T }) => T; // error, T is {} which isn't an acceptable return type } interface I7 extends A { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I7|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'a15' are incompatible. -!!! error TS2430: Type '(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'. +!!! error TS2430: Type '<{|T|2|} extends {|Base|3|}>(x: { {|a|4|}: {|T|5|}; {|b|6|}: {|T|7|}; }) => number' is not assignable to type '(x: { {|a|8|}: string; {|b|9|}: number; }) => number'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2430: Type '{ {|a|10|}: string; {|b|11|}: number; }' is not assignable to type '{ {|a|12|}: {|Base|13|}; {|b|14|}: {|Base|15|}; }'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|16|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:80:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:19 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:40 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:46 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:24 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:35 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:24 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:23:35 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:40 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:81:46 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:5:11 a15: (x: { a: T; b: T }) => number; // error, T defaults to Base, which is not compatible with number or string } @@ -173,12 +233,23 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I6 extends B { ~~ -!!! error TS2430: Interface 'I6' incorrectly extends interface 'B'. +!!! error TS2430: Interface '{|I6|0|}' incorrectly extends interface '{|B|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. -!!! error TS2430: Type 'string[]' is not assignable to type 'T[]'. -!!! error TS2430: Type 'string' is not assignable to type 'T'. -!!! error TS2430: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '<{|T|2|}>(x: {|T|3|}) => string[]' is not assignable to type '<{|T|4|}>(x: {|T|5|}) => {|T|6|}[]'. +!!! error TS2430: Type 'string[]' is not assignable to type '{|T|7|}[]'. +!!! error TS2430: Type 'string' is not assignable to type '{|T|8|}'. +!!! error TS2430: 'string' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:100:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:96:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:101:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:101:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:97:18 a2: (x: T) => string[]; // error } @@ -189,11 +260,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign interface I7 extends C { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'C'. +!!! error TS2430: Interface '{|I7|0|}' incorrectly extends interface '{|C|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. -!!! error TS2430: Type 'T[]' is not assignable to type 'string[]'. -!!! error TS2430: Type 'T' is not assignable to type 'string'. +!!! error TS2430: Type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}[]' is not assignable to type '<{|T|5|}>(x: {|T|6|}) => string[]'. +!!! error TS2430: Type '{|T|7|}[]' is not assignable to type 'string[]'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:109:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:105:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:110:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:110:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:110:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:106:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:106:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:106:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:106:18 a2: (x: T) => T[]; // error } } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt index f6526347975c7..5f254e172b364 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt @@ -75,84 +75,213 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign // S's interface I extends A { ~ -!!! error TS2430: Interface 'I' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '(x: T) => T[]' is not assignable to type '(x: T) => T[]'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}[]' is not assignable to type '<{|T|5|}>(x: {|T|6|}) => {|T|7|}[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:12:9 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:12:9 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:12:9 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:12:9 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:12:9 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:24:13 a: (x: T) => T[]; } interface I2 extends A { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => string[]' is not assignable to type '(x: T) => string[]'. +!!! error TS2430: Type '(x: {|T|3|}) => string[]' is not assignable to type '<{|T|4|}>(x: {|T|5|}) => string[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:28:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:13:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:13:10 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:13:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:13:10 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:28:14 a2: (x: T) => string[]; } interface I3 extends A { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '(x: T) => void'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x: {|T|6|}) => void'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:14:10 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:14:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:14:10 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:14:10 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:32:14 a3: (x: T) => T; } interface I4 extends A { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I4|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type '(x: T, y: U) => string' is not assignable to type '(x: T, y: U) => string'. +!!! error TS2430: Type '<{|U|3|}>(x: {|T|4|}, y: {|U|5|}) => string' is not assignable to type '<{|T|6|}, {|U|7|}>(x: {|T|8|}, y: {|U|9|}) => string'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:37:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:37:10 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:12 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:10 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:12 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:10 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:10 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:36:14 a4: (x: T, y: U) => string; } interface I5 extends A { ~~ -!!! error TS2430: Interface 'I5' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I5|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type '(x: (arg: T) => U) => T' is not assignable to type '(x: (arg: T) => U) => T'. +!!! error TS2430: Type '<{|U|3|}>(x: (arg: {|T|4|}) => {|U|5|}) => {|T|6|}' is not assignable to type '<{|T|7|}, {|U|8|}>(x: (arg: {|T|9|}) => {|U|10|}) => {|T|11|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|12|}' is not assignable to type '{|T|13|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:41:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:41:10 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:10 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:12 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:10 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:12 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:10 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:10 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:10 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:16:10 a5: (x: (arg: T) => U) => T; } interface I7 extends A { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I7|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a11' are incompatible. -!!! error TS2430: Type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base'. +!!! error TS2430: Type '<{|U|3|}>(x: { {|foo|4|}: {|T|5|}; }, y: { {|foo|6|}: {|U|7|}; {|bar|8|}: {|U|9|}; }) => {|Base|10|}' is not assignable to type '<{|T|11|}>(x: { {|foo|12|}: {|T|13|}; }, y: { {|foo|14|}: {|T|15|}; {|bar|16|}: {|T|17|}; }) => {|Base|18|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ foo: T; }' is not assignable to type '{ foo: T; }'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: Type '{ {|foo|19|}: {|T|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; }'. Two different types with this name exist, but they are unrelated. !!! error TS2430: Types of property 'foo' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|23|}' is not assignable to type '{|T|24|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|25|}' is assignable to the constraint of type '{|T|26|}', but '{|T|27|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:34 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:42 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:19 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:34 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:42 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:19 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:45:19 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:44:14 a11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; } interface I9 extends A { ~~ -!!! error TS2430: Interface 'I9' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I9|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a16' are incompatible. -!!! error TS2430: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: T; b: T; }) => T[]'. +!!! error TS2430: Type '(x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}[]' is not assignable to type '<{|T|8|} extends {|Base|9|}>(x: { {|a|10|}: {|T|11|}; {|b|12|}: {|T|13|}; }) => {|T|14|}[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ a: T; b: T; }'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: Type '{ {|a|15|}: {|T|16|}; {|b|17|}: {|T|18|}; }' is not assignable to type '{ {|a|19|}: {|T|20|}; {|b|21|}: {|T|22|}; }'. Two different types with this name exist, but they are unrelated. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2430: Type 'Base' is not assignable to type 'T'. -!!! error TS2430: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|23|}' is not assignable to type '{|T|24|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|25|}' is assignable to the constraint of type '{|T|26|}', but '{|T|27|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|Base|28|}' is not assignable to type '{|T|29|}'. +!!! error TS2430: '{|Base|30|}' is assignable to the constraint of type '{|T|31|}', but '{|T|32|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:49:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:49:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:32 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:38 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:32 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:38 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:49:16 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:49:22 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:20:11 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 30 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 31 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 32 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:48:14 a16: (x: { a: T; b: T }) => T[]; } \ No newline at end of file diff --git a/tests/baselines/reference/castingTuple.errors.txt b/tests/baselines/reference/castingTuple.errors.txt index 4ddb42ed2d91d..59943aca244f3 100644 --- a/tests/baselines/reference/castingTuple.errors.txt +++ b/tests/baselines/reference/castingTuple.errors.txt @@ -44,8 +44,18 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot var interfaceIITuple = <[I, I]>classCDTuple; var classCDATuple = <[C, D, A]>classCDTuple; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property '2' is missing in type '[C, D]' but required in type '[C, D, A]'. +!!! error TS2352: Conversion of type '[{|C|0|}, {|D|1|}]' to type '[{|C|2|}, {|D|3|}, {|A|4|}]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property '2' is missing in type '[{|C|5|}, {|D|6|}]' but required in type '[{|C|7|}, {|D|8|}, {|A|9|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/castingTuple.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/tuple/castingTuple.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/tuple/castingTuple.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/tuple/castingTuple.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/tuple/castingTuple.ts:2:7 +!!! annotated symbol 5 tests/cases/conformance/types/tuple/castingTuple.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/tuple/castingTuple.ts:4:7 +!!! annotated symbol 7 tests/cases/conformance/types/tuple/castingTuple.ts:3:7 +!!! annotated symbol 8 tests/cases/conformance/types/tuple/castingTuple.ts:4:7 +!!! annotated symbol 9 tests/cases/conformance/types/tuple/castingTuple.ts:2:7 var eleFromCDA1 = classCDATuple[2]; // A var eleFromCDA2 = classCDATuple[5]; // C | D | A ~ @@ -65,9 +75,15 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot !!! error TS2352: Type 'string' is not comparable to type 'number'. var t9 = <[A, I]>classCDTuple; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '[C, D]' to type '[A, I]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'a' is missing in type 'C' but required in type 'A'. +!!! error TS2352: Conversion of type '[{|C|0|}, {|D|1|}]' to type '[{|A|2|}, {|I|3|}]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'a' is missing in type '{|C|4|}' but required in type '{|A|5|}'. !!! related TS2728 tests/cases/conformance/types/tuple/castingTuple.ts:2:11: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/castingTuple.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/tuple/castingTuple.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/tuple/castingTuple.ts:2:7 +!!! annotated symbol 3 tests/cases/conformance/types/tuple/castingTuple.ts:1:11 +!!! annotated symbol 4 tests/cases/conformance/types/tuple/castingTuple.ts:3:7 +!!! annotated symbol 5 tests/cases/conformance/types/tuple/castingTuple.ts:2:7 var array1 = numStrTuple; ~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'. diff --git a/tests/baselines/reference/chainedAssignment1.errors.txt b/tests/baselines/reference/chainedAssignment1.errors.txt index 32ae0f63dc751..7e026c4e445d3 100644 --- a/tests/baselines/reference/chainedAssignment1.errors.txt +++ b/tests/baselines/reference/chainedAssignment1.errors.txt @@ -26,10 +26,14 @@ tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2322: Type 'Z' is not var c3 = new Z(); c1 = c2 = c3; // a bug made this not report the same error as below ~~ -!!! error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. +!!! error TS2741: Property 'a' is missing in type '{|Z|0|}' but required in type '{|X|1|}'. !!! related TS2728 tests/cases/compiler/chainedAssignment1.ts:3:5: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/chainedAssignment1.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/chainedAssignment1.ts:1:7 ~~ !!! error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b c2 = c3; // Error TS111: Cannot convert Z to Y ~~ -!!! error TS2322: Type 'Z' is not assignable to type 'Y'. \ No newline at end of file +!!! error TS2322: Type '{|Z|0|}' is not assignable to type '{|Y|1|}'. +!!! annotated symbol 0 tests/cases/compiler/chainedAssignment1.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/chainedAssignment1.ts:6:7 \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment3.errors.txt b/tests/baselines/reference/chainedAssignment3.errors.txt index 16f6b2fe6529b..c1c91e827909f 100644 --- a/tests/baselines/reference/chainedAssignment3.errors.txt +++ b/tests/baselines/reference/chainedAssignment3.errors.txt @@ -22,11 +22,15 @@ tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2322: Type 'A' is not // error cases b = a = new A(); ~ -!!! error TS2741: Property 'value' is missing in type 'A' but required in type 'B'. +!!! error TS2741: Property 'value' is missing in type '{|A|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/chainedAssignment3.ts:6:5: 'value' is declared here. +!!! annotated symbol 0 tests/cases/compiler/chainedAssignment3.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/chainedAssignment3.ts:5:7 a = b = new A(); ~ -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|B|1|}'. +!!! annotated symbol 0 tests/cases/compiler/chainedAssignment3.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/chainedAssignment3.ts:5:7 \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignmentChecking.errors.txt b/tests/baselines/reference/chainedAssignmentChecking.errors.txt index 567a599b63ee5..a2412a6b86f30 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.errors.txt +++ b/tests/baselines/reference/chainedAssignmentChecking.errors.txt @@ -25,8 +25,10 @@ tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2739: Type 'Z' c1 = c2 = c3; // Should be error ~~ -!!! error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. +!!! error TS2741: Property 'a' is missing in type '{|Z|0|}' but required in type '{|X|1|}'. !!! related TS2728 tests/cases/compiler/chainedAssignmentChecking.ts:3:3: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/chainedAssignmentChecking.ts:12:7 +!!! annotated symbol 1 tests/cases/compiler/chainedAssignmentChecking.ts:1:7 ~~ !!! error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 2e39f19d86ad3..06d9c73b679c6 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -22,6 +22,8 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ~~~~~ -!!! error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. +!!! error TS2741: Property 'z' is missing in type '{|B|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file +!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:11:7 +!!! annotated symbol 1 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:14:7 \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index e0091e407dfc5..f40e07a5ccb8a 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -16,16 +16,26 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); ~ -!!! error TS2322: Type 'T' is not assignable to type 'S'. -!!! error TS2322: 'T' is assignable to the constraint of type 'S', but 'S' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|S|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|S|3|}', but '{|S|4|}' could be instantiated with a different subtype of constraint '{}'. !!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:27: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13 +!!! annotated symbol 1 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:10 +!!! annotated symbol 2 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13 +!!! annotated symbol 3 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:10 +!!! annotated symbol 4 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:10 // But error to try to climb up the chain (new Chain(s)).then(ss => t); ~ -!!! error TS2322: Type 'T' is not assignable to type 'S'. -!!! error TS2322: 'T' is assignable to the constraint of type 'S', but 'S' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|S|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|S|3|}', but '{|S|4|}' could be instantiated with a different subtype of constraint '{}'. !!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:27: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13 +!!! annotated symbol 1 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:10 +!!! annotated symbol 2 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13 +!!! annotated symbol 3 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:10 +!!! annotated symbol 4 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:10 // Staying at T or S should be fine (new Chain(t)).then(tt => t).then(tt => t).then(tt => t); diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt b/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt index 014087ff6275e..397e435d7770f 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt +++ b/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt @@ -23,10 +23,22 @@ tests/cases/compiler/checkInfiniteExpansionTermination.ts(16,1): error TS2322: T var values2: ISubject; values = values2; ~~~~~~ -!!! error TS2322: Type 'ISubject' is not assignable to type 'IObservable'. +!!! error TS2322: Type '{|ISubject|0|}<{|Bar|1|}>' is not assignable to type '{|IObservable|2|}<{|Foo|3|}>'. !!! error TS2322: Types of property 'n' are incompatible. -!!! error TS2322: Type 'IObservable' is not assignable to type 'IObservable'. -!!! error TS2322: Type 'Bar[]' is not assignable to type 'Foo[]'. -!!! error TS2322: Property 'x' is missing in type 'Bar' but required in type 'Foo'. +!!! error TS2322: Type '{|IObservable|4|}<{|Bar|5|}[]>' is not assignable to type '{|IObservable|6|}<{|Foo|7|}[]>'. +!!! error TS2322: Type '{|Bar|8|}[]' is not assignable to type '{|Foo|9|}[]'. +!!! error TS2322: Property 'x' is missing in type '{|Bar|10|}' but required in type '{|Foo|11|}'. !!! related TS2728 tests/cases/compiler/checkInfiniteExpansionTermination.ts:11:17: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/checkInfiniteExpansionTermination.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/checkInfiniteExpansionTermination.ts:12:11 +!!! annotated symbol 2 tests/cases/compiler/checkInfiniteExpansionTermination.ts:4:11 +!!! annotated symbol 3 tests/cases/compiler/checkInfiniteExpansionTermination.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/checkInfiniteExpansionTermination.ts:4:11 +!!! annotated symbol 5 tests/cases/compiler/checkInfiniteExpansionTermination.ts:12:11 +!!! annotated symbol 6 tests/cases/compiler/checkInfiniteExpansionTermination.ts:4:11 +!!! annotated symbol 7 tests/cases/compiler/checkInfiniteExpansionTermination.ts:11:11 +!!! annotated symbol 8 tests/cases/compiler/checkInfiniteExpansionTermination.ts:12:11 +!!! annotated symbol 9 tests/cases/compiler/checkInfiniteExpansionTermination.ts:11:11 +!!! annotated symbol 10 tests/cases/compiler/checkInfiniteExpansionTermination.ts:12:11 +!!! annotated symbol 11 tests/cases/compiler/checkInfiniteExpansionTermination.ts:11:11 \ No newline at end of file diff --git a/tests/baselines/reference/checkJsdocTypeTag6.errors.txt b/tests/baselines/reference/checkJsdocTypeTag6.errors.txt index bbc2e8cd6b1df..6f85526a3e36e 100644 --- a/tests/baselines/reference/checkJsdocTypeTag6.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTag6.errors.txt @@ -14,8 +14,9 @@ tests/cases/conformance/jsdoc/test.js(10,5): error TS8030: The type of a functio /** @type {{ prop: string }} */ var g = function (prop) { ~ -!!! error TS2741: Property 'prop' is missing in type '(prop: any) => void' but required in type '{ prop: string; }'. +!!! error TS2741: Property 'prop' is missing in type '(prop: any) => void' but required in type '{ {|prop|0|}: string; }'. !!! related TS2728 tests/cases/conformance/jsdoc/test.js:6:14: 'prop' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/test.js:6:14 } /** @type {(a: number) => number} */ diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt index 66078776c5f9c..bfd48dcbe81eb 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt @@ -24,11 +24,22 @@ tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,18): error TS2 const testErr = ~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly'. +!!! error TS2322: Type '{ {|children|0|}: [{|Element|1|}, {|Element|2|}, {|Element|3|}]; }' is not assignable to type '{|Readonly|4|}<{|ResizablePanelProps|5|}>'. !!! error TS2322: Types of property 'children' are incompatible. -!!! error TS2322: Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'. +!!! error TS2322: Type '[{|Element|6|}, {|Element|7|}, {|Element|8|}]' is not assignable to type '[{|ReactNode|9|}, {|ReactNode|10|}]'. !!! error TS2322: Types of property 'length' are incompatible. !!! error TS2322: Type '3' is not assignable to type '2'. +!!! annotated dropped!: 0 +!!! annotated symbol 1 /.lib/react16.d.ts:2371:23 +!!! annotated symbol 2 /.lib/react16.d.ts:2371:23 +!!! annotated symbol 3 /.lib/react16.d.ts:2371:23 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 5 tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx:5:11 +!!! annotated symbol 6 /.lib/react16.d.ts:2371:23 +!!! annotated symbol 7 /.lib/react16.d.ts:2371:23 +!!! annotated symbol 8 /.lib/react16.d.ts:2371:23 +!!! annotated symbol 9 /.lib/react16.d.ts:218:14 +!!! annotated symbol 10 /.lib/react16.d.ts:218:14
diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt index 605a293ffaab3..45747824ad16d 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt @@ -18,14 +18,25 @@ tests/cases/conformance/jsx/file.tsx(12,13): error TS2322: Type '{ children: Ele // Not OK (excess children) const k3 =
} />; ~~~ -!!! error TS2322: Type '{ children: Element; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ {|children|0|}: {|Element|1|}; }' is not assignable to type '{|IntrinsicAttributes|2|}'. !!! error TS2322: Property 'children' does not exist on type 'IntrinsicAttributes'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:10:17 +!!! annotated symbol 1 /.lib/react.d.ts:2359:15 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 const k4 =
; ~~~ -!!! error TS2322: Type '{ children: Element; key: string; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ {|children|0|}: {|Element|1|}; {|key|2|}: string; }' is not assignable to type '{|IntrinsicAttributes|3|}'. !!! error TS2322: Property 'children' does not exist on type 'IntrinsicAttributes'. +!!! annotated dropped!: 0 +!!! annotated symbol 1 /.lib/react.d.ts:2359:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:11:17 +!!! annotated symbol 3 /.lib/react.d.ts:2367:15 const k5 =
; ~~~ -!!! error TS2322: Type '{ children: Element[]; key: string; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ {|children|0|}: {|Element|1|}[]; {|key|2|}: string; }' is not assignable to type '{|IntrinsicAttributes|3|}'. !!! error TS2322: Property 'children' does not exist on type 'IntrinsicAttributes'. +!!! annotated dropped!: 0 +!!! annotated symbol 1 /.lib/react.d.ts:2359:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:12:17 +!!! annotated symbol 3 /.lib/react.d.ts:2367:15 \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt index b289fb97d2bba..4043e0971ff58 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt @@ -22,8 +22,11 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2746: This JSX tag's 'childr // Error: missing children let k = ; ~~~~ -!!! error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. +!!! error TS2741: Property 'children' is missing in type '{ {|a|0|}: number; {|b|1|}: string; }' but required in type '{|Prop|2|}'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:6:5: 'children' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:14:15 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:14:22 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:11 let k0 = diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index 34bd218996483..e260d70834719 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -50,18 +50,24 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +!!! error TS2322: Type '(user: {|IUser|0|}) => {|Element|1|}' is not assignable to type 'string | number | boolean | any[] | {|ReactElement|2|}'. !!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props !!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression? +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:3:11 +!!! annotated symbol 1 /.lib/react.d.ts:2359:15 +!!! annotated symbol 2 /.lib/react.d.ts:25:15 { user => ( ~~~~~~~~~

{ user.Name }

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) } ~~~~~~~~~~~~~ -!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement'. +!!! error TS2322: Type '(user: {|IUser|0|}) => {|Element|1|}' is not assignable to type 'string | number | boolean | any[] | {|ReactElement|2|}'. !!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement': type, props !!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression? +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:3:11 +!!! annotated symbol 1 /.lib/react.d.ts:2359:15 +!!! annotated symbol 2 /.lib/react.d.ts:25:15 ); } \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt index 476644ee33603..b39152e540376 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt @@ -25,8 +25,11 @@ tests/cases/conformance/jsx/file.tsx(29,10): error TS2740: Type 'typeof Button' // Error: no children specified let k = ; ~~~~ -!!! error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. +!!! error TS2741: Property 'children' is missing in type '{ {|a|0|}: number; {|b|1|}: string; }' but required in type '{|Prop|2|}'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:6:5: 'children' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:20:15 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:20:22 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:11 // Error: JSX.element is not the same as JSX.ElementClass let k1 = diff --git a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt index 36ebc70b76ce3..5179dffbc795c 100644 --- a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt +++ b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt @@ -18,7 +18,15 @@ tests/cases/conformance/jsx/file.tsx(13,54): error TS2322: Type '(a: { x: string let c = ({ x: a.x })} />; // No Error let d = a.x} />; // Error - `string` is not assignable to `{x: string}` ~~~~~~~~~~ -!!! error TS2322: Type '(a: { x: string; }) => string' is not assignable to type '((a: { x: string; }) => string) & ((cur: { x: string; }) => { x: string; })'. -!!! error TS2322: Type '(a: { x: string; }) => string' is not assignable to type '(cur: { x: string; }) => { x: string; }'. -!!! error TS2322: Type 'string' is not assignable to type '{ x: string; }'. -!!! related TS6500 tests/cases/conformance/jsx/file.tsx:13:54: The expected type comes from property 'nextValues' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes string; }, { x: string; }>> & { initialValues: { x: string; }; nextValues: (a: { x: string; }) => string; } & BaseProps<{ x: string; }> & { children?: ReactNode; }' \ No newline at end of file +!!! error TS2322: Type '(a: { {|x|0|}: string; }) => string' is not assignable to type '((a: { {|x|1|}: string; }) => string) & ((cur: { {|x|2|}: string; }) => { {|x|3|}: string; })'. +!!! error TS2322: Type '(a: { {|x|4|}: string; }) => string' is not assignable to type '(cur: { {|x|5|}: string; }) => { {|x|6|}: string; }'. +!!! error TS2322: Type 'string' is not assignable to type '{ {|x|7|}: string; }'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:13:54: The expected type comes from property 'nextValues' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes string; }, { x: string; }>> & { initialValues: { x: string; }; nextValues: (a: { x: string; }) => string; } & BaseProps<{ x: string; }> & { children?: ReactNode; }' +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 5 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 6 tests/cases/conformance/jsx/file.tsx:13:44 +!!! annotated symbol 7 tests/cases/conformance/jsx/file.tsx:13:44 \ No newline at end of file diff --git a/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt b/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt index 74835c4a55b2f..1b0db6ed53257 100644 --- a/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt +++ b/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt @@ -100,39 +100,840 @@ tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfin component: C ) => ConnectedComponentClass, keyof Shared>> & TNeedsProps>; ~~~~~~~~~~~ -!!! error TS2344: Type 'GetProps' does not satisfy the constraint 'Shared>'. -!!! error TS2344: Type 'unknown' is not assignable to type 'Shared>'. -!!! error TS2344: Type 'Matching>' is not assignable to type 'Shared>'. -!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps[P] ? GetProps[P] : TInjectedProps[P] : GetProps[P]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[P] | (TInjectedProps[P] extends GetProps[P] ? GetProps[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[P]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[P]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[Extract>] extends GetProps[Extract>] ? GetProps[Extract>] : TInjectedProps[Extract>] : GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[Extract>] | (TInjectedProps[Extract>] extends GetProps[Extract>] ? GetProps[Extract>] : TInjectedProps[Extract>])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type '(Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]) | (Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]) | (Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>]) | GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>] | GetProps[keyof TInjectedProps & Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'keyof GetProps & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string] : GetProps[keyof GetProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[keyof GetProps & string] | (TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[keyof GetProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[keyof GetProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'keyof GetProps & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string] : GetProps[keyof GetProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[Extract>] extends GetProps[Extract>] ? GetProps[Extract>] : TInjectedProps[Extract>] : GetProps[Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps[P] ? GetProps[P] : TInjectedProps[P] : GetProps[P]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. +!!! error TS2344: Type '{|GetProps|0|}<{|C|1|}>' does not satisfy the constraint '{|Shared|2|}<{|TInjectedProps|3|}, {|GetProps|4|}<{|C|5|}>>'. +!!! error TS2344: Type 'unknown' is not assignable to type '{|Shared|6|}<{|TInjectedProps|7|}, {|GetProps|8|}<{|C|9|}>>'. +!!! error TS2344: Type '{|Matching|10|}<{|TInjectedProps|11|}, {|GetProps|12|}<{|C|13|}>>' is not assignable to type '{|Shared|14|}<{|TInjectedProps|15|}, {|GetProps|16|}<{|C|17|}>>'. +!!! error TS2344: Type '{|P|18|} extends keyof {|TInjectedProps|19|} ? {|TInjectedProps|20|}[{|P|21|}] extends {|GetProps|22|}<{|C|23|}>[{|P|24|}] ? {|GetProps|25|}<{|C|26|}>[{|P|27|}] : {|TInjectedProps|28|}[{|P|29|}] : {|GetProps|30|}<{|C|31|}>[{|P|32|}]' is not assignable to type '({|TInjectedProps|33|}[{|P|34|}] extends {|GetProps|35|}<{|C|36|}>[{|P|37|}] ? {|GetProps|38|}<{|C|39|}>[{|P|40|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|41|}<{|C|42|}>[{|P|43|}] | ({|TInjectedProps|44|}[{|P|45|}] extends {|GetProps|46|}<{|C|47|}>[{|P|48|}] ? {|GetProps|49|}<{|C|50|}>[{|P|51|}] : {|TInjectedProps|52|}[{|P|53|}])' is not assignable to type '({|TInjectedProps|54|}[{|P|55|}] extends {|GetProps|56|}<{|C|57|}>[{|P|58|}] ? {|GetProps|59|}<{|C|60|}>[{|P|61|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|62|}<{|C|63|}>[{|P|64|}]' is not assignable to type '({|TInjectedProps|65|}[{|P|66|}] extends {|GetProps|67|}<{|C|68|}>[{|P|69|}] ? {|GetProps|70|}<{|C|71|}>[{|P|72|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|73|}<{|C|74|}>[{|P|75|}]' is not assignable to type '{|TInjectedProps|76|}[{|P|77|}] extends {|GetProps|78|}<{|C|79|}>[{|P|80|}] ? {|GetProps|81|}<{|C|82|}>[{|P|83|}] : never'. +!!! error TS2344: Type '{|Extract|84|}> extends keyof {|TInjectedProps|88|} ? {|TInjectedProps|89|}[{|Extract|90|}>] extends {|GetProps|94|}<{|C|95|}>[{|Extract|96|}>] ? {|GetProps|100|}<{|C|101|}>[{|Extract|102|}>] : {|TInjectedProps|106|}[{|Extract|107|}>] : {|GetProps|111|}<{|C|112|}>[{|Extract|113|}>]' is not assignable to type '({|TInjectedProps|117|}[{|P|118|}] extends {|GetProps|119|}<{|C|120|}>[{|P|121|}] ? {|GetProps|122|}<{|C|123|}>[{|P|124|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|125|}<{|C|126|}>[{|Extract|127|}>] | ({|TInjectedProps|131|}[{|Extract|132|}>] extends {|GetProps|136|}<{|C|137|}>[{|Extract|138|}>] ? {|GetProps|142|}<{|C|143|}>[{|Extract|144|}>] : {|TInjectedProps|148|}[{|Extract|149|}>])' is not assignable to type '({|TInjectedProps|153|}[{|P|154|}] extends {|GetProps|155|}<{|C|156|}>[{|P|157|}] ? {|GetProps|158|}<{|C|159|}>[{|P|160|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|161|}<{|C|162|}>[{|Extract|163|}>]' is not assignable to type '({|TInjectedProps|167|}[{|P|168|}] extends {|GetProps|169|}<{|C|170|}>[{|P|171|}] ? {|GetProps|172|}<{|C|173|}>[{|P|174|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|175|}<{|C|176|}>[{|Extract|177|}>]' is not assignable to type '{|TInjectedProps|181|}[{|P|182|}] extends {|GetProps|183|}<{|C|184|}>[{|P|185|}] ? {|GetProps|186|}<{|C|187|}>[{|P|188|}] : never'. +!!! error TS2344: Type '({|Extract|189|}> extends keyof {|TInjectedProps|192|} ? {|TInjectedProps|193|}[keyof {|TInjectedProps|194|} & {|Extract|195|}>] extends {|GetProps|198|}<{|C|199|}>[keyof {|TInjectedProps|200|} & {|Extract|201|}>] ? {|GetProps|204|}<{|C|205|}>[keyof {|TInjectedProps|206|} & {|Extract|207|}>] : {|TInjectedProps|210|}[keyof {|TInjectedProps|211|} & {|Extract|212|}>] : {|GetProps|215|}<{|C|216|}>[{|Extract|217|}>]) | ({|Extract|220|}> extends keyof {|TInjectedProps|223|} ? {|TInjectedProps|224|}[keyof {|TInjectedProps|225|} & {|Extract|226|}>] extends {|GetProps|229|}<{|C|230|}>[keyof {|TInjectedProps|231|} & {|Extract|232|}>] ? {|GetProps|235|}<{|C|236|}>[keyof {|TInjectedProps|237|} & {|Extract|238|}>] : {|TInjectedProps|241|}[keyof {|TInjectedProps|242|} & {|Extract|243|}>] : {|GetProps|246|}<{|C|247|}>[{|Extract|248|}>]) | ({|Extract|251|}> extends keyof {|TInjectedProps|254|} ? {|TInjectedProps|255|}[keyof {|TInjectedProps|256|} & {|Extract|257|}>] extends {|GetProps|260|}<{|C|261|}>[keyof {|TInjectedProps|262|} & {|Extract|263|}>] ? {|GetProps|266|}<{|C|267|}>[keyof {|TInjectedProps|268|} & {|Extract|269|}>] : {|TInjectedProps|272|}[keyof {|TInjectedProps|273|} & {|Extract|274|}>] : {|GetProps|277|}<{|C|278|}>[{|Extract|279|}>])' is not assignable to type '({|TInjectedProps|282|}[{|P|283|}] extends {|GetProps|284|}<{|C|285|}>[{|P|286|}] ? {|GetProps|287|}<{|C|288|}>[{|P|289|}] : never) | undefined'. +!!! error TS2344: Type '{|Extract|290|}> extends keyof {|TInjectedProps|293|} ? {|TInjectedProps|294|}[keyof {|TInjectedProps|295|} & {|Extract|296|}>] extends {|GetProps|299|}<{|C|300|}>[keyof {|TInjectedProps|301|} & {|Extract|302|}>] ? {|GetProps|305|}<{|C|306|}>[keyof {|TInjectedProps|307|} & {|Extract|308|}>] : {|TInjectedProps|311|}[keyof {|TInjectedProps|312|} & {|Extract|313|}>] : {|GetProps|316|}<{|C|317|}>[{|Extract|318|}>]' is not assignable to type '({|TInjectedProps|321|}[{|P|322|}] extends {|GetProps|323|}<{|C|324|}>[{|P|325|}] ? {|GetProps|326|}<{|C|327|}>[{|P|328|}] : never) | undefined'. +!!! error TS2344: Type '({|TInjectedProps|329|}[keyof {|TInjectedProps|330|} & {|Extract|331|}>] extends {|GetProps|334|}<{|C|335|}>[keyof {|TInjectedProps|336|} & {|Extract|337|}>] ? {|GetProps|340|}<{|C|341|}>[keyof {|TInjectedProps|342|} & {|Extract|343|}>] : {|TInjectedProps|346|}[keyof {|TInjectedProps|347|} & {|Extract|348|}>]) | {|GetProps|351|}<{|C|352|}>[{|Extract|353|}>]' is not assignable to type '({|TInjectedProps|356|}[{|P|357|}] extends {|GetProps|358|}<{|C|359|}>[{|P|360|}] ? {|GetProps|361|}<{|C|362|}>[{|P|363|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|364|}[keyof {|TInjectedProps|365|} & {|Extract|366|}>] extends {|GetProps|369|}<{|C|370|}>[keyof {|TInjectedProps|371|} & {|Extract|372|}>] ? {|GetProps|375|}<{|C|376|}>[keyof {|TInjectedProps|377|} & {|Extract|378|}>] : {|TInjectedProps|381|}[keyof {|TInjectedProps|382|} & {|Extract|383|}>]' is not assignable to type '({|TInjectedProps|386|}[{|P|387|}] extends {|GetProps|388|}<{|C|389|}>[{|P|390|}] ? {|GetProps|391|}<{|C|392|}>[{|P|393|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|394|}[keyof {|TInjectedProps|395|} & {|Extract|396|}>] | {|GetProps|399|}<{|C|400|}>[keyof {|TInjectedProps|401|} & {|Extract|402|}>]' is not assignable to type '({|TInjectedProps|405|}[{|P|406|}] extends {|GetProps|407|}<{|C|408|}>[{|P|409|}] ? {|GetProps|410|}<{|C|411|}>[{|P|412|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|413|}[keyof {|TInjectedProps|414|} & {|Extract|415|}>]' is not assignable to type '({|TInjectedProps|418|}[{|P|419|}] extends {|GetProps|420|}<{|C|421|}>[{|P|422|}] ? {|GetProps|423|}<{|C|424|}>[{|P|425|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|426|}[string]' is not assignable to type '({|TInjectedProps|427|}[{|P|428|}] extends {|GetProps|429|}<{|C|430|}>[{|P|431|}] ? {|GetProps|432|}<{|C|433|}>[{|P|434|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|435|}[string]' is not assignable to type '{|TInjectedProps|436|}[{|P|437|}] extends {|GetProps|438|}<{|C|439|}>[{|P|440|}] ? {|GetProps|441|}<{|C|442|}>[{|P|443|}] : never'. +!!! error TS2344: Type '{|TInjectedProps|444|}[keyof {|TInjectedProps|445|} & {|Extract|446|}>]' is not assignable to type '{|TInjectedProps|449|}[{|P|450|}] extends {|GetProps|451|}<{|C|452|}>[{|P|453|}] ? {|GetProps|454|}<{|C|455|}>[{|P|456|}] : never'. +!!! error TS2344: Type '{|TInjectedProps|457|}[string]' is not assignable to type '{|TInjectedProps|458|}[{|P|459|}] extends {|GetProps|460|}<{|C|461|}>[{|P|462|}] ? {|GetProps|463|}<{|C|464|}>[{|P|465|}] : never'. +!!! error TS2344: Type '{|TInjectedProps|466|}[keyof {|TInjectedProps|467|} & {|Extract|468|}>] extends {|GetProps|471|}<{|C|472|}>[keyof {|TInjectedProps|473|} & {|Extract|474|}>] ? {|GetProps|477|}<{|C|478|}>[keyof {|TInjectedProps|479|} & {|Extract|480|}>] : {|TInjectedProps|483|}[keyof {|TInjectedProps|484|} & {|Extract|485|}>]' is not assignable to type '{|TInjectedProps|488|}[{|P|489|}] extends {|GetProps|490|}<{|C|491|}>[{|P|492|}] ? {|GetProps|493|}<{|C|494|}>[{|P|495|}] : never'. +!!! error TS2344: Type 'keyof {|GetProps|496|}<{|C|497|}> & string extends keyof {|TInjectedProps|498|} ? {|TInjectedProps|499|}[keyof {|TInjectedProps|500|} & keyof {|GetProps|501|}<{|C|502|}> & string] extends {|GetProps|503|}<{|C|504|}>[keyof {|TInjectedProps|505|} & keyof {|GetProps|506|}<{|C|507|}> & string] ? {|GetProps|508|}<{|C|509|}>[keyof {|TInjectedProps|510|} & keyof {|GetProps|511|}<{|C|512|}> & string] : {|TInjectedProps|513|}[keyof {|TInjectedProps|514|} & keyof {|GetProps|515|}<{|C|516|}> & string] : {|GetProps|517|}<{|C|518|}>[keyof {|GetProps|519|}<{|C|520|}> & string]' is not assignable to type '({|TInjectedProps|521|}[{|P|522|}] extends {|GetProps|523|}<{|C|524|}>[{|P|525|}] ? {|GetProps|526|}<{|C|527|}>[{|P|528|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|529|}<{|C|530|}>[keyof {|GetProps|531|}<{|C|532|}> & string] | ({|TInjectedProps|533|}[keyof {|TInjectedProps|534|} & keyof {|GetProps|535|}<{|C|536|}> & string] extends {|GetProps|537|}<{|C|538|}>[keyof {|TInjectedProps|539|} & keyof {|GetProps|540|}<{|C|541|}> & string] ? {|GetProps|542|}<{|C|543|}>[keyof {|TInjectedProps|544|} & keyof {|GetProps|545|}<{|C|546|}> & string] : {|TInjectedProps|547|}[keyof {|TInjectedProps|548|} & keyof {|GetProps|549|}<{|C|550|}> & string])' is not assignable to type '({|TInjectedProps|551|}[{|P|552|}] extends {|GetProps|553|}<{|C|554|}>[{|P|555|}] ? {|GetProps|556|}<{|C|557|}>[{|P|558|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|559|}<{|C|560|}>[keyof {|GetProps|561|}<{|C|562|}> & string]' is not assignable to type '({|TInjectedProps|563|}[{|P|564|}] extends {|GetProps|565|}<{|C|566|}>[{|P|567|}] ? {|GetProps|568|}<{|C|569|}>[{|P|570|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|571|}<{|C|572|}>[keyof {|GetProps|573|}<{|C|574|}> & string]' is not assignable to type '{|TInjectedProps|575|}[{|P|576|}] extends {|GetProps|577|}<{|C|578|}>[{|P|579|}] ? {|GetProps|580|}<{|C|581|}>[{|P|582|}] : never'. +!!! error TS2344: Type 'string extends keyof {|TInjectedProps|583|} ? {|TInjectedProps|584|}[keyof {|TInjectedProps|585|} & string] extends {|GetProps|586|}<{|C|587|}>[keyof {|TInjectedProps|588|} & string] ? {|GetProps|589|}<{|C|590|}>[keyof {|TInjectedProps|591|} & string] : {|TInjectedProps|592|}[keyof {|TInjectedProps|593|} & string] : {|GetProps|594|}<{|C|595|}>[string]' is not assignable to type '({|TInjectedProps|596|}[{|P|597|}] extends {|GetProps|598|}<{|C|599|}>[{|P|600|}] ? {|GetProps|601|}<{|C|602|}>[{|P|603|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|604|}<{|C|605|}>[string] | ({|TInjectedProps|606|}[keyof {|TInjectedProps|607|} & string] extends {|GetProps|608|}<{|C|609|}>[keyof {|TInjectedProps|610|} & string] ? {|GetProps|611|}<{|C|612|}>[keyof {|TInjectedProps|613|} & string] : {|TInjectedProps|614|}[keyof {|TInjectedProps|615|} & string])' is not assignable to type '({|TInjectedProps|616|}[{|P|617|}] extends {|GetProps|618|}<{|C|619|}>[{|P|620|}] ? {|GetProps|621|}<{|C|622|}>[{|P|623|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|624|}<{|C|625|}>[string]' is not assignable to type '({|TInjectedProps|626|}[{|P|627|}] extends {|GetProps|628|}<{|C|629|}>[{|P|630|}] ? {|GetProps|631|}<{|C|632|}>[{|P|633|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|634|}<{|C|635|}>[string]' is not assignable to type '{|TInjectedProps|636|}[{|P|637|}] extends {|GetProps|638|}<{|C|639|}>[{|P|640|}] ? {|GetProps|641|}<{|C|642|}>[{|P|643|}] : never'. +!!! error TS2344: Type 'string extends keyof {|TInjectedProps|644|} ? {|TInjectedProps|645|}[keyof {|TInjectedProps|646|} & string] extends {|GetProps|647|}<{|C|648|}>[keyof {|TInjectedProps|649|} & string] ? {|GetProps|650|}<{|C|651|}>[keyof {|TInjectedProps|652|} & string] : {|TInjectedProps|653|}[keyof {|TInjectedProps|654|} & string] : {|GetProps|655|}<{|C|656|}>[string]' is not assignable to type '{|TInjectedProps|657|}[{|P|658|}] extends {|GetProps|659|}<{|C|660|}>[{|P|661|}] ? {|GetProps|662|}<{|C|663|}>[{|P|664|}] : never'. +!!! error TS2344: Type 'keyof {|GetProps|665|}<{|C|666|}> & string extends keyof {|TInjectedProps|667|} ? {|TInjectedProps|668|}[keyof {|TInjectedProps|669|} & keyof {|GetProps|670|}<{|C|671|}> & string] extends {|GetProps|672|}<{|C|673|}>[keyof {|TInjectedProps|674|} & keyof {|GetProps|675|}<{|C|676|}> & string] ? {|GetProps|677|}<{|C|678|}>[keyof {|TInjectedProps|679|} & keyof {|GetProps|680|}<{|C|681|}> & string] : {|TInjectedProps|682|}[keyof {|TInjectedProps|683|} & keyof {|GetProps|684|}<{|C|685|}> & string] : {|GetProps|686|}<{|C|687|}>[keyof {|GetProps|688|}<{|C|689|}> & string]' is not assignable to type '{|TInjectedProps|690|}[{|P|691|}] extends {|GetProps|692|}<{|C|693|}>[{|P|694|}] ? {|GetProps|695|}<{|C|696|}>[{|P|697|}] : never'. +!!! error TS2344: Type '{|Extract|698|}> extends keyof {|TInjectedProps|701|} ? {|TInjectedProps|702|}[keyof {|TInjectedProps|703|} & {|Extract|704|}>] extends {|GetProps|707|}<{|C|708|}>[keyof {|TInjectedProps|709|} & {|Extract|710|}>] ? {|GetProps|713|}<{|C|714|}>[keyof {|TInjectedProps|715|} & {|Extract|716|}>] : {|TInjectedProps|719|}[keyof {|TInjectedProps|720|} & {|Extract|721|}>] : {|GetProps|724|}<{|C|725|}>[{|Extract|726|}>]' is not assignable to type '{|TInjectedProps|729|}[{|P|730|}] extends {|GetProps|731|}<{|C|732|}>[{|P|733|}] ? {|GetProps|734|}<{|C|735|}>[{|P|736|}] : never'. +!!! error TS2344: Type '{|Extract|737|}> extends keyof {|TInjectedProps|741|} ? {|TInjectedProps|742|}[{|Extract|743|}>] extends {|GetProps|747|}<{|C|748|}>[{|Extract|749|}>] ? {|GetProps|753|}<{|C|754|}>[{|Extract|755|}>] : {|TInjectedProps|759|}[{|Extract|760|}>] : {|GetProps|764|}<{|C|765|}>[{|Extract|766|}>]' is not assignable to type '{|TInjectedProps|770|}[{|P|771|}] extends {|GetProps|772|}<{|C|773|}>[{|P|774|}] ? {|GetProps|775|}<{|C|776|}>[{|P|777|}] : never'. +!!! error TS2344: Type '{|P|778|} extends keyof {|TInjectedProps|779|} ? {|TInjectedProps|780|}[{|P|781|}] extends {|GetProps|782|}<{|C|783|}>[{|P|784|}] ? {|GetProps|785|}<{|C|786|}>[{|P|787|}] : {|TInjectedProps|788|}[{|P|789|}] : {|GetProps|790|}<{|C|791|}>[{|P|792|}]' is not assignable to type '{|TInjectedProps|793|}[{|P|794|}] extends {|GetProps|795|}<{|C|796|}>[{|P|797|}] ? {|GetProps|798|}<{|C|799|}>[{|P|800|}] : never'. +!!! annotated symbol 0 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 1 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 2 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:33:13 +!!! annotated symbol 3 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 4 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 5 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 6 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:33:13 +!!! annotated symbol 7 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 8 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 9 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 10 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:50:13 +!!! annotated symbol 11 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 12 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 13 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 14 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:33:13 +!!! annotated symbol 15 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 16 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 17 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 18 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 19 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 20 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 21 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 22 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 23 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 24 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 25 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 26 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 27 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 28 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 29 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 30 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 31 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 32 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 33 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 34 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 35 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 36 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 37 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 38 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 39 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 40 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 41 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 42 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 43 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 44 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 45 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 46 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 47 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 48 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 49 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 50 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 51 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 52 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 53 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 54 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 55 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 56 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 57 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 58 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 59 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 60 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 61 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 62 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 63 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 64 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 65 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 66 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 67 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 68 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 69 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 70 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 71 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 72 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 73 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 74 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 75 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 76 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 77 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 78 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 79 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 80 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 81 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 82 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 83 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 84 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 85 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 86 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 87 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 88 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 89 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 90 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 91 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 92 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 93 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 94 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 95 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 96 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 97 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 98 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 99 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 100 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 101 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 102 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 103 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 104 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 105 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 106 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 107 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 108 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 109 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 110 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 111 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 112 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 113 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 114 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 115 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 116 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 117 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 118 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 119 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 120 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 121 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 122 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 123 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 124 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 125 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 126 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 127 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 128 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 129 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 130 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 131 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 132 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 133 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 134 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 135 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 136 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 137 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 138 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 139 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 140 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 141 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 142 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 143 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 144 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 145 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 146 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 147 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 148 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 149 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 150 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 151 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 152 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 153 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 154 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 155 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 156 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 157 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 158 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 159 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 160 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 161 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 162 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 163 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 164 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 165 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 166 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 167 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 168 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 169 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 170 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 171 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 172 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 173 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 174 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 175 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 176 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 177 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 178 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 179 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 180 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 181 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 182 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 183 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 184 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 185 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 186 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 187 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 188 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 189 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 190 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 191 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 192 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 193 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 194 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 195 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 196 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 197 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 198 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 199 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 200 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 201 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 202 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 203 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 204 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 205 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 206 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 207 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 208 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 209 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 210 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 211 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 212 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 213 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 214 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 215 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 216 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 217 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 218 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 219 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 220 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 221 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 222 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 223 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 224 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 225 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 226 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 227 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 228 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 229 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 230 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 231 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 232 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 233 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 234 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 235 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 236 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 237 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 238 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 239 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 240 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 241 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 242 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 243 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 244 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 245 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 246 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 247 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 248 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 249 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 250 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 251 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 252 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 253 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 254 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 255 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 256 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 257 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 258 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 259 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 260 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 261 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 262 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 263 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 264 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 265 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 266 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 267 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 268 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 269 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 270 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 271 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 272 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 273 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 274 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 275 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 276 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 277 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 278 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 279 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 280 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 281 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 282 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 283 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 284 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 285 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 286 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 287 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 288 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 289 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 290 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 291 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 292 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 293 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 294 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 295 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 296 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 297 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 298 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 299 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 300 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 301 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 302 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 303 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 304 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 305 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 306 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 307 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 308 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 309 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 310 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 311 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 312 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 313 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 314 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 315 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 316 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 317 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 318 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 319 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 320 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 321 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 322 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 323 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 324 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 325 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 326 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 327 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 328 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 329 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 330 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 331 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 332 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 333 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 334 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 335 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 336 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 337 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 338 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 339 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 340 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 341 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 342 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 343 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 344 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 345 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 346 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 347 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 348 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 349 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 350 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 351 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 352 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 353 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 354 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 355 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 356 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 357 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 358 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 359 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 360 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 361 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 362 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 363 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 364 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 365 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 366 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 367 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 368 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 369 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 370 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 371 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 372 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 373 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 374 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 375 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 376 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 377 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 378 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 379 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 380 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 381 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 382 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 383 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 384 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 385 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 386 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 387 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 388 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 389 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 390 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 391 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 392 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 393 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 394 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 395 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 396 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 397 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 398 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 399 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 400 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 401 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 402 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 403 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 404 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 405 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 406 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 407 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 408 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 409 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 410 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 411 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 412 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 413 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 414 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 415 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 416 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 417 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 418 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 419 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 420 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 421 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 422 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 423 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 424 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 425 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 426 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 427 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 428 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 429 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 430 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 431 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 432 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 433 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 434 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 435 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 436 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 437 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 438 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 439 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 440 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 441 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 442 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 443 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 444 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 445 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 446 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 447 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 448 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 449 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 450 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 451 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 452 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 453 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 454 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 455 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 456 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 457 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 458 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 459 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 460 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 461 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 462 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 463 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 464 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 465 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 466 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 467 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 468 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 469 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 470 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 471 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 472 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 473 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 474 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 475 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 476 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 477 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 478 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 479 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 480 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 481 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 482 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 483 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 484 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 485 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 486 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 487 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 488 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 489 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 490 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 491 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 492 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 493 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 494 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 495 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 496 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 497 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 498 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 499 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 500 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 501 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 502 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 503 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 504 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 505 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 506 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 507 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 508 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 509 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 510 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 511 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 512 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 513 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 514 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 515 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 516 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 517 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 518 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 519 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 520 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 521 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 522 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 523 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 524 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 525 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 526 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 527 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 528 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 529 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 530 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 531 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 532 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 533 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 534 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 535 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 536 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 537 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 538 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 539 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 540 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 541 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 542 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 543 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 544 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 545 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 546 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 547 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 548 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 549 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 550 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 551 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 552 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 553 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 554 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 555 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 556 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 557 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 558 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 559 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 560 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 561 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 562 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 563 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 564 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 565 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 566 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 567 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 568 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 569 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 570 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 571 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 572 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 573 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 574 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 575 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 576 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 577 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 578 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 579 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 580 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 581 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 582 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 583 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 584 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 585 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 586 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 587 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 588 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 589 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 590 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 591 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 592 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 593 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 594 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 595 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 596 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 597 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 598 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 599 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 600 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 601 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 602 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 603 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 604 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 605 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 606 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 607 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 608 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 609 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 610 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 611 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 612 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 613 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 614 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 615 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 616 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 617 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 618 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 619 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 620 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 621 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 622 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 623 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 624 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 625 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 626 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 627 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 628 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 629 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 630 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 631 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 632 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 633 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 634 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 635 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 636 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 637 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 638 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 639 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 640 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 641 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 642 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 643 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 644 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 645 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 646 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 647 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 648 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 649 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 650 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 651 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 652 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 653 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 654 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 655 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 656 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 657 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 658 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 659 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 660 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 661 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 662 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 663 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 664 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 665 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 666 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 667 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 668 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 669 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 670 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 671 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 672 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 673 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 674 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 675 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 676 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 677 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 678 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 679 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 680 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 681 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 682 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 683 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 684 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 685 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 686 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 687 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 688 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 689 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 690 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 691 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 692 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 693 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 694 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 695 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 696 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 697 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 698 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 699 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 700 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 701 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 702 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 703 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 704 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 705 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 706 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 707 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 708 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 709 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 710 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 711 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 712 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 713 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 714 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 715 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 716 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 717 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 718 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 719 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 720 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 721 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 722 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 723 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 724 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 725 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 726 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 727 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 728 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 729 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 730 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 731 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 732 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 733 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 734 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 735 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 736 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 737 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 738 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 739 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 740 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 741 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 742 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 743 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 744 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 745 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 746 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 747 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 748 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 749 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 750 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 751 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 752 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 753 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 754 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 755 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 756 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 757 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 758 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 759 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 760 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 761 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 762 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 763 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 764 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 765 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 766 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 767 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 768 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 769 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 770 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 771 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 772 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 773 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 774 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 775 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 776 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 777 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 778 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 779 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 780 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 781 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 782 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 783 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 784 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 785 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 786 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 787 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 788 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 789 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 790 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 791 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 792 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 793 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:60:49 +!!! annotated symbol 794 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 795 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 796 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 797 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 +!!! annotated symbol 798 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:41:13 +!!! annotated symbol 799 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:61:6 +!!! annotated symbol 800 tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts:37:10 \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.errors.txt b/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.errors.txt index fbcc597409a21..bbc3ce379da10 100644 --- a/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.errors.txt +++ b/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.errors.txt @@ -12,8 +12,11 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst // AA = A; // okay AAA = A; // error. ~~~ -!!! error TS2322: Type 'typeof A' is not assignable to type 'new () => A'. +!!! error TS2322: Type 'typeof {|A|0|}' is not assignable to type 'new () => {|A|1|}'. !!! error TS2322: Cannot assign an abstract constructor type to a non-abstract constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAssignabilityConstructorFunction.ts:1:16 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAssignabilityConstructorFunction.ts:1:16 AAA = "asdf"; ~~~ -!!! error TS2322: Type '"asdf"' is not assignable to type 'new () => A'. \ No newline at end of file +!!! error TS2322: Type '"asdf"' is not assignable to type 'new () => {|A|0|}'. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractAssignabilityConstructorFunction.ts:1:16 \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractClinterfaceAssignability.errors.txt b/tests/baselines/reference/classAbstractClinterfaceAssignability.errors.txt index d9462f28a2219..7611e42b5bdeb 100644 --- a/tests/baselines/reference/classAbstractClinterfaceAssignability.errors.txt +++ b/tests/baselines/reference/classAbstractClinterfaceAssignability.errors.txt @@ -27,5 +27,7 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst var AAA: typeof I; AAA = A; ~~~ -!!! error TS2322: Type 'typeof A' is not assignable to type 'IConstructor'. -!!! error TS2322: Cannot assign an abstract constructor type to a non-abstract constructor type. \ No newline at end of file +!!! error TS2322: Type 'typeof {|A|0|}' is not assignable to type '{|IConstructor|1|}'. +!!! error TS2322: Cannot assign an abstract constructor type to a non-abstract constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractClinterfaceAssignability.ts:14:16 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractClinterfaceAssignability.ts:5:11 \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.errors.txt b/tests/baselines/reference/classAbstractConstructorAssignability.errors.txt index 3ad45cc2b04ee..535af39189721 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.errors.txt +++ b/tests/baselines/reference/classAbstractConstructorAssignability.errors.txt @@ -14,13 +14,17 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst var AA : typeof A = B; ~~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2322: Type 'typeof {|B|0|}' is not assignable to type 'typeof {|A|1|}'. !!! error TS2322: Cannot assign an abstract constructor type to a non-abstract constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructorAssignability.ts:3:16 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructorAssignability.ts:1:7 var BB : typeof B = A; var CC : typeof C = B; ~~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof C'. +!!! error TS2322: Type 'typeof {|B|0|}' is not assignable to type 'typeof {|C|1|}'. !!! error TS2322: Cannot assign an abstract constructor type to a non-abstract constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructorAssignability.ts:3:16 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractConstructorAssignability.ts:5:7 new AA; new BB; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.errors.txt b/tests/baselines/reference/classAbstractFactoryFunction.errors.txt index 2e7b3ad8f4634..acdf3746068e1 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.errors.txt +++ b/tests/baselines/reference/classAbstractFactoryFunction.errors.txt @@ -20,8 +20,10 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst NewA(A); NewA(B); ~ -!!! error TS2345: Argument of type 'typeof B' is not assignable to parameter of type 'typeof A'. +!!! error TS2345: Argument of type 'typeof {|B|0|}' is not assignable to parameter of type 'typeof {|A|1|}'. !!! error TS2345: Cannot assign an abstract constructor type to a non-abstract constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractFactoryFunction.ts:2:16 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractFactoryFunction.ts:1:7 NewB(A); NewB(B); \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractInstantiations2.errors.txt b/tests/baselines/reference/classAbstractInstantiations2.errors.txt index 3d1cb33d483f7..61410a0c5d2ac 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.errors.txt +++ b/tests/baselines/reference/classAbstractInstantiations2.errors.txt @@ -27,8 +27,10 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst var BB: typeof B = B; var AA: typeof A = BB; // error, AA is not of abstract type. ~~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2322: Type 'typeof {|B|0|}' is not assignable to type 'typeof {|A|1|}'. !!! error TS2322: Cannot assign an abstract constructor type to a non-abstract constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts:5:16 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts:1:7 new AA; function constructB(Factory : typeof B) { diff --git a/tests/baselines/reference/classCanExtendConstructorFunction.errors.txt b/tests/baselines/reference/classCanExtendConstructorFunction.errors.txt index 02c5940be143e..8ea81f44fc9b2 100644 --- a/tests/baselines/reference/classCanExtendConstructorFunction.errors.txt +++ b/tests/baselines/reference/classCanExtendConstructorFunction.errors.txt @@ -91,13 +91,21 @@ tests/cases/conformance/salsa/second.ts(17,15): error TS2345: Argument of type ' // ok class Conestoga extends Wagon { ~~~~~~~~~ -!!! error TS2417: Class static side 'typeof Conestoga' incorrectly extends base class static side 'typeof Wagon'. +!!! error TS2417: Class static side 'typeof {|Conestoga|0|}' incorrectly extends base class static side 'typeof {|Wagon|1|}'. !!! error TS2417: Types of property 'circle' are incompatible. -!!! error TS2417: Type '(others: (typeof Wagon)[]) => number' is not assignable to type '(wagons?: Wagon[]) => number'. +!!! error TS2417: Type '(others: (typeof {|Wagon|2|})[]) => number' is not assignable to type '(wagons?: {|Wagon|3|}[]) => number'. !!! error TS2417: Types of parameters 'others' and 'wagons' are incompatible. -!!! error TS2417: Type 'Wagon[]' is not assignable to type '(typeof Wagon)[]'. -!!! error TS2417: Property 'circle' is missing in type 'Wagon' but required in type 'typeof Wagon'. +!!! error TS2417: Type '{|Wagon|4|}[]' is not assignable to type '(typeof {|Wagon|5|})[]'. +!!! error TS2417: Property 'circle' is missing in type '{|Wagon|6|}' but required in type 'typeof {|Wagon|7|}'. !!! related TS2728 tests/cases/conformance/salsa/first.js:9:1: 'circle' is declared here. +!!! annotated symbol 0 tests/cases/conformance/salsa/second.ts:14:7 +!!! annotated symbol 1 tests/cases/conformance/salsa/first.js:5:10 +!!! annotated symbol 2 tests/cases/conformance/salsa/first.js:5:10 +!!! annotated symbol 3 tests/cases/conformance/salsa/first.js:5:10 +!!! annotated symbol 4 tests/cases/conformance/salsa/first.js:5:10 +!!! annotated symbol 5 tests/cases/conformance/salsa/first.js:5:10 +!!! annotated symbol 6 tests/cases/conformance/salsa/first.js:5:10 +!!! annotated symbol 7 tests/cases/conformance/salsa/first.js:5:10 constructor(public drunkOO: true) { // error: wrong type super('nope'); @@ -138,6 +146,7 @@ tests/cases/conformance/salsa/second.ts(17,15): error TS2345: Argument of type ' !!! related TS6210 tests/cases/conformance/salsa/generic.js:5:15: An argument for 'flavour' was not provided. var errorArgType = new Chowder(0); ~ -!!! error TS2345: Argument of type '0' is not assignable to parameter of type '{ claim: "ignorant" | "malicious"; }'. +!!! error TS2345: Argument of type '0' is not assignable to parameter of type '{ {|claim|0|}: "ignorant" | "malicious"; }'. +!!! annotated symbol 0 tests/cases/conformance/salsa/generic.js:8:22 \ No newline at end of file diff --git a/tests/baselines/reference/classConstructorAccessibility3.errors.txt b/tests/baselines/reference/classConstructorAccessibility3.errors.txt index 57fc9f58c1fc4..8e34594a17b13 100644 --- a/tests/baselines/reference/classConstructorAccessibility3.errors.txt +++ b/tests/baselines/reference/classConstructorAccessibility3.errors.txt @@ -28,12 +28,16 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib a = Bar; a = Baz; // error Baz is protected ~ -!!! error TS2322: Type 'typeof Baz' is not assignable to type 'typeof Foo'. +!!! error TS2322: Type 'typeof {|Baz|0|}' is not assignable to type 'typeof {|Foo|1|}'. !!! error TS2322: Cannot assign a 'protected' constructor type to a 'public' constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts:1:7 a = Qux; // error Qux is private ~ -!!! error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Foo'. +!!! error TS2322: Type 'typeof {|Qux|0|}' is not assignable to type 'typeof {|Foo|1|}'. !!! error TS2322: Cannot assign a 'private' constructor type to a 'public' constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts:1:7 // b is protected let b = Baz; @@ -41,8 +45,10 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib b = Bar; b = Qux; // error Qux is private ~ -!!! error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Baz'. +!!! error TS2322: Type 'typeof {|Qux|0|}' is not assignable to type 'typeof {|Baz|1|}'. !!! error TS2322: Cannot assign a 'private' constructor type to a 'protected' constructor type. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts:9:7 // c is private let c = Qux; diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt index ea3927b51d136..355c2644ce4c6 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt @@ -14,8 +14,10 @@ tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7) class D2 implements I { ~~ -!!! error TS2420: Class 'D2' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|D2|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts:6:11 public foo(x: any) { return x } private x = 3; other(x: any) { return x } diff --git a/tests/baselines/reference/classImplementsClass2.errors.txt b/tests/baselines/reference/classImplementsClass2.errors.txt index 192d3447f75a9..2b8d0ffecfa01 100644 --- a/tests/baselines/reference/classImplementsClass2.errors.txt +++ b/tests/baselines/reference/classImplementsClass2.errors.txt @@ -7,9 +7,14 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2741: Property 'foo class A { foo(): number { return 1; } } class C implements A {} // error ~ -!!! error TS2720: Class 'C' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? -!!! error TS2720: Property 'foo' is missing in type 'C' but required in type 'A'. +!!! error TS2720: Class '{|C|0|}' incorrectly implements class '{|A|1|}'. Did you mean to extend '{|A|2|}' and inherit its members as a subclass? +!!! error TS2720: Property 'foo' is missing in type '{|C|3|}' but required in type '{|A|4|}'. !!! related TS2728 tests/cases/compiler/classImplementsClass2.ts:1:11: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass2.ts:2:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass2.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/classImplementsClass2.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/classImplementsClass2.ts:2:7 +!!! annotated symbol 4 tests/cases/compiler/classImplementsClass2.ts:1:7 class C2 extends A { foo() { @@ -22,5 +27,7 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2741: Property 'foo c = c2; c2 = c; ~~ -!!! error TS2741: Property 'foo' is missing in type 'C' but required in type 'C2'. -!!! related TS2728 tests/cases/compiler/classImplementsClass2.ts:5:5: 'foo' is declared here. \ No newline at end of file +!!! error TS2741: Property 'foo' is missing in type '{|C|0|}' but required in type '{|C2|1|}'. +!!! related TS2728 tests/cases/compiler/classImplementsClass2.ts:5:5: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass2.ts:2:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass2.ts:4:7 \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass4.errors.txt b/tests/baselines/reference/classImplementsClass4.errors.txt index 9cb8b9dd1bae5..e5b94843ad133 100644 --- a/tests/baselines/reference/classImplementsClass4.errors.txt +++ b/tests/baselines/reference/classImplementsClass4.errors.txt @@ -10,9 +10,14 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2741: Property 'x' } class C implements A { ~ -!!! error TS2720: Class 'C' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? -!!! error TS2720: Property 'x' is missing in type 'C' but required in type 'A'. +!!! error TS2720: Class '{|C|0|}' incorrectly implements class '{|A|1|}'. Did you mean to extend '{|A|2|}' and inherit its members as a subclass? +!!! error TS2720: Property 'x' is missing in type '{|C|3|}' but required in type '{|A|4|}'. !!! related TS2728 tests/cases/compiler/classImplementsClass4.ts:2:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass4.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass4.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/classImplementsClass4.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/classImplementsClass4.ts:5:7 +!!! annotated symbol 4 tests/cases/compiler/classImplementsClass4.ts:1:7 foo() { return 1; } @@ -25,5 +30,7 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2741: Property 'x' c = c2; c2 = c; ~~ -!!! error TS2741: Property 'x' is missing in type 'C' but required in type 'C2'. -!!! related TS2728 tests/cases/compiler/classImplementsClass4.ts:2:13: 'x' is declared here. \ No newline at end of file +!!! error TS2741: Property 'x' is missing in type '{|C|0|}' but required in type '{|C2|1|}'. +!!! related TS2728 tests/cases/compiler/classImplementsClass4.ts:2:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass4.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass4.ts:11:7 \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass5.errors.txt b/tests/baselines/reference/classImplementsClass5.errors.txt index a291da15407bc..b5211257c6cad 100644 --- a/tests/baselines/reference/classImplementsClass5.errors.txt +++ b/tests/baselines/reference/classImplementsClass5.errors.txt @@ -13,8 +13,11 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n } class C implements A { ~ -!!! error TS2720: Class 'C' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? +!!! error TS2720: Class '{|C|0|}' incorrectly implements class '{|A|1|}'. Did you mean to extend '{|A|2|}' and inherit its members as a subclass? !!! error TS2720: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass5.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass5.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/classImplementsClass5.ts:1:7 private x = 1; foo() { return 1; @@ -27,9 +30,13 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n var c2: C2; c = c2; ~ -!!! error TS2322: Type 'C2' is not assignable to type 'C'. +!!! error TS2322: Type '{|C2|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass5.ts:12:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass5.ts:5:7 c2 = c; ~~ -!!! error TS2322: Type 'C' is not assignable to type 'C2'. -!!! error TS2322: Types have separate declarations of a private property 'x'. \ No newline at end of file +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|C2|1|}'. +!!! error TS2322: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass5.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass5.ts:12:7 \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass7.errors.txt b/tests/baselines/reference/classImplementsClass7.errors.txt index 013552a011dea..0ba8551755fa4 100644 --- a/tests/baselines/reference/classImplementsClass7.errors.txt +++ b/tests/baselines/reference/classImplementsClass7.errors.txt @@ -9,7 +9,12 @@ tests/cases/compiler/classImplementsClass7.ts(5,7): error TS2720: Class 'B' inco class B implements A {} ~ -!!! error TS2720: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass? -!!! error TS2720: Property 'x' is missing in type 'B' but required in type 'A'. +!!! error TS2720: Class '{|B|0|}' incorrectly implements class '{|A|1|}'. Did you mean to extend '{|A|2|}' and inherit its members as a subclass? +!!! error TS2720: Property 'x' is missing in type '{|B|3|}' but required in type '{|A|4|}'. !!! related TS2728 tests/cases/compiler/classImplementsClass7.ts:2:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/classImplementsClass7.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classImplementsClass7.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/classImplementsClass7.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/classImplementsClass7.ts:5:7 +!!! annotated symbol 4 tests/cases/compiler/classImplementsClass7.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsMergedClassInterface.errors.txt b/tests/baselines/reference/classImplementsMergedClassInterface.errors.txt index aa16538eaff8c..4703a3a586828 100644 --- a/tests/baselines/reference/classImplementsMergedClassInterface.errors.txt +++ b/tests/baselines/reference/classImplementsMergedClassInterface.errors.txt @@ -17,23 +17,36 @@ tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInte class C2 implements C1 { // error -- missing x ~~ -!!! error TS2720: Class 'C2' incorrectly implements class 'C1'. Did you mean to extend 'C1' and inherit its members as a subclass? +!!! error TS2720: Class '{|C2|0|}' incorrectly implements class '{|C1|1|}'. Did you mean to extend '{|C1|2|}' and inherit its members as a subclass? !!! error TS2720: Type 'C2' is missing the following properties from type 'C1': x, y +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 +!!! annotated symbol 2 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 } class C3 implements C1 { // error -- missing y ~~ -!!! error TS2720: Class 'C3' incorrectly implements class 'C1'. Did you mean to extend 'C1' and inherit its members as a subclass? -!!! error TS2720: Property 'y' is missing in type 'C3' but required in type 'C1'. +!!! error TS2720: Class '{|C3|0|}' incorrectly implements class '{|C1|1|}'. Did you mean to extend '{|C1|2|}' and inherit its members as a subclass? +!!! error TS2720: Property 'y' is missing in type '{|C3|3|}' but required in type '{|C1|4|}'. !!! related TS2728 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:6:5: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 +!!! annotated symbol 2 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 +!!! annotated symbol 3 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:12:7 +!!! annotated symbol 4 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 x : number; } class C4 implements C1 { // error -- missing x ~~ -!!! error TS2720: Class 'C4' incorrectly implements class 'C1'. Did you mean to extend 'C1' and inherit its members as a subclass? -!!! error TS2720: Property 'x' is missing in type 'C4' but required in type 'C1'. +!!! error TS2720: Class '{|C4|0|}' incorrectly implements class '{|C1|1|}'. Did you mean to extend '{|C1|2|}' and inherit its members as a subclass? +!!! error TS2720: Property 'x' is missing in type '{|C4|3|}' but required in type '{|C1|4|}'. !!! related TS2728 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:2:5: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:16:7 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 +!!! annotated symbol 2 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 +!!! annotated symbol 3 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:16:7 +!!! annotated symbol 4 tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts:1:15 y : number; } diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt index 8b84602b807c5..e537c7e72df3e 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt @@ -18,8 +18,10 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla foo: { ~~~ !!! error TS2416: Property 'foo' in type 'Derived2' is not assignable to the same property in base type 'Base<{ bar: string; }>'. -!!! error TS2416: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'. +!!! error TS2416: Type '{ {|bar|0|}?: string; }' is not assignable to type '{ {|bar|1|}: string; }'. !!! error TS2416: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'. +!!! annotated symbol 0 tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts:13:9 +!!! annotated symbol 1 tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts:11:31 bar?: string; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/classPropertyErrorOnNameOnly.errors.txt b/tests/baselines/reference/classPropertyErrorOnNameOnly.errors.txt index 7ef791997dd32..934c7e21eafca 100644 --- a/tests/baselines/reference/classPropertyErrorOnNameOnly.errors.txt +++ b/tests/baselines/reference/classPropertyErrorOnNameOnly.errors.txt @@ -15,9 +15,11 @@ tests/cases/compiler/classPropertyErrorOnNameOnly.ts(24,7): error TS2322: Type ' class Example { insideClass: FuncType = function(val) { // error span goes from here ~~~~~~~~~~~ -!!! error TS2322: Type '(val: Values) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'FuncType'. +!!! error TS2322: Type '(val: {|Values|0|}) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type '{|FuncType|1|}'. !!! error TS2322: Type '"1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'string'. !!! error TS2322: Type 'undefined' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/classPropertyErrorOnNameOnly.ts:1:6 +!!! annotated symbol 1 tests/cases/compiler/classPropertyErrorOnNameOnly.ts:3:6 switch (val) { case 1: return "1"; @@ -36,9 +38,11 @@ tests/cases/compiler/classPropertyErrorOnNameOnly.ts(24,7): error TS2322: Type ' const outsideClass: FuncType = function(val) { // compare to errors only on this line in this case ~~~~~~~~~~~~ -!!! error TS2322: Type '(val: Values) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'FuncType'. +!!! error TS2322: Type '(val: {|Values|0|}) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type '{|FuncType|1|}'. !!! error TS2322: Type '"1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'string'. !!! error TS2322: Type 'undefined' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/classPropertyErrorOnNameOnly.ts:1:6 +!!! annotated symbol 1 tests/cases/compiler/classPropertyErrorOnNameOnly.ts:3:6 switch (val) { case 1: return "1"; diff --git a/tests/baselines/reference/classSideInheritance3.errors.txt b/tests/baselines/reference/classSideInheritance3.errors.txt index c845defa5b89c..1cb01318fb34a 100644 --- a/tests/baselines/reference/classSideInheritance3.errors.txt +++ b/tests/baselines/reference/classSideInheritance3.errors.txt @@ -20,8 +20,12 @@ tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof var r1: typeof A = B; // error ~~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2322: Type 'typeof {|B|0|}' is not assignable to type 'typeof {|A|1|}'. +!!! annotated symbol 0 tests/cases/compiler/classSideInheritance3.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classSideInheritance3.ts:1:7 var r2: new (x: string) => A = B; // error ~~ -!!! error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'. +!!! error TS2322: Type 'typeof {|B|0|}' is not assignable to type 'new (x: string) => {|A|1|}'. +!!! annotated symbol 0 tests/cases/compiler/classSideInheritance3.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/classSideInheritance3.ts:1:7 var r3: typeof A = C; // ok \ No newline at end of file diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index 59e9bc9ced182..7309bd559615d 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -92,8 +92,10 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st class L extends G { ~ -!!! error TS2415: Class 'L' incorrectly extends base class 'G'. +!!! error TS2415: Class '{|L|0|}' incorrectly extends base class '{|G|1|}'. !!! error TS2415: Property 'p1' is private in type 'L' but not in type 'G'. +!!! annotated symbol 0 tests/cases/compiler/classUpdateTests.ts:63:7 +!!! annotated symbol 1 tests/cases/compiler/classUpdateTests.ts:37:7 constructor(private p1:number) { super(); // NO ERROR } @@ -101,8 +103,10 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st class M extends G { ~ -!!! error TS2415: Class 'M' incorrectly extends base class 'G'. +!!! error TS2415: Class '{|M|0|}' incorrectly extends base class '{|G|1|}'. !!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'. +!!! annotated symbol 0 tests/cases/compiler/classUpdateTests.ts:69:7 +!!! annotated symbol 1 tests/cases/compiler/classUpdateTests.ts:37:7 constructor(private p1:number) { // ERROR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt index 6f254c3c198e9..585ccbe20cb05 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt +++ b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt @@ -22,8 +22,10 @@ tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2420: Class class D implements I, J { ~ -!!! error TS2420: Class 'D' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|D|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Type 'D' is missing the following properties from type 'I': foo, bar +!!! annotated symbol 0 tests/cases/compiler/classWithMultipleBaseClasses.ts:18:7 +!!! annotated symbol 1 tests/cases/compiler/classWithMultipleBaseClasses.ts:9:11 baz() { } bat() { } } diff --git a/tests/baselines/reference/clodulesDerivedClasses.errors.txt b/tests/baselines/reference/clodulesDerivedClasses.errors.txt index 5bb3ff2983dca..1d7ccc82e5c7a 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.errors.txt +++ b/tests/baselines/reference/clodulesDerivedClasses.errors.txt @@ -14,10 +14,16 @@ tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2417: Class static class Path extends Shape { ~~~~ -!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. +!!! error TS2417: Class static side 'typeof {|Path|0|}' incorrectly extends base class static side 'typeof {|Shape|1|}'. !!! error TS2417: Types of property 'Utils' are incompatible. -!!! error TS2417: Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. +!!! error TS2417: Property 'convert' is missing in type 'typeof {|Path|2|}.{|Utils|3|}' but required in type 'typeof {|Shape|4|}.{|Utils|5|}'. !!! related TS2728 tests/cases/compiler/clodulesDerivedClasses.ts:6:21: 'convert' is declared here. +!!! annotated symbol 0 tests/cases/compiler/clodulesDerivedClasses.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/clodulesDerivedClasses.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/clodulesDerivedClasses.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/clodulesDerivedClasses.ts:14:13 +!!! annotated symbol 4 tests/cases/compiler/clodulesDerivedClasses.ts:1:7 +!!! annotated symbol 5 tests/cases/compiler/clodulesDerivedClasses.ts:5:14 name: string; } diff --git a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt index d2c8c0111aede..fdb9e65e2dfbe 100644 --- a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt +++ b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt @@ -19,6 +19,11 @@ tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOpera var y: T2; var result: T1 = (x, y); //error here ~~~~~~ -!!! error TS2322: Type 'T2' is not assignable to type 'T1'. -!!! error TS2322: 'T2' is assignable to the constraint of type 'T1', but 'T1' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T2|0|}' is not assignable to type '{|T1|1|}'. +!!! error TS2322: '{|T2|2|}' is assignable to the constraint of type '{|T1|3|}', but '{|T1|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts:9:19 +!!! annotated symbol 1 tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts:9:15 +!!! annotated symbol 2 tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts:9:19 +!!! annotated symbol 3 tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts:9:15 +!!! annotated symbol 4 tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts:9:15 } \ No newline at end of file diff --git a/tests/baselines/reference/complexRecursiveCollections.errors.txt b/tests/baselines/reference/complexRecursiveCollections.errors.txt index 27bb24bc5cc14..088858df72c99 100644 --- a/tests/baselines/reference/complexRecursiveCollections.errors.txt +++ b/tests/baselines/reference/complexRecursiveCollections.errors.txt @@ -379,11 +379,29 @@ tests/cases/compiler/immutable.ts(391,22): error TS2430: Interface 'Set' inco export function Keyed(obj: {[key: string]: V}): Collection.Keyed; export interface Keyed extends Collection { ~~~~~ -!!! error TS2430: Interface 'Keyed' incorrectly extends interface 'Collection'. +!!! error TS2430: Interface '{|Keyed|0|}<{|K|1|}, {|V|2|}>' incorrectly extends interface '{|Collection|3|}<{|K|4|}, {|V|5|}>'. !!! error TS2430: Types of property 'toSeq' are incompatible. -!!! error TS2430: Type '() => Keyed' is not assignable to type '() => this'. -!!! error TS2430: Type 'Keyed' is not assignable to type 'this'. -!!! error TS2430: 'Keyed' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Keyed'. +!!! error TS2430: Type '() => {|Keyed|6|}<{|K|7|}, {|V|8|}>' is not assignable to type '() => this'. +!!! error TS2430: Type '{|Keyed|9|}<{|K|10|}, {|V|11|}>' is not assignable to type 'this'. +!!! error TS2430: '{|Keyed|12|}<{|K|13|}, {|V|14|}>' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint '{|Keyed|15|}<{|K|16|}, {|V|17|}>'. +!!! annotated symbol 0 tests/cases/compiler/immutable.ts:339:21 +!!! annotated symbol 1 tests/cases/compiler/immutable.ts:341:28 +!!! annotated symbol 2 tests/cases/compiler/immutable.ts:341:31 +!!! annotated symbol 3 tests/cases/compiler/immutable.ts:404:19 +!!! annotated symbol 4 tests/cases/compiler/immutable.ts:341:28 +!!! annotated symbol 5 tests/cases/compiler/immutable.ts:341:31 +!!! annotated symbol 6 tests/cases/compiler/immutable.ts:266:21 +!!! annotated symbol 7 tests/cases/compiler/immutable.ts:341:28 +!!! annotated symbol 8 tests/cases/compiler/immutable.ts:341:31 +!!! annotated symbol 9 tests/cases/compiler/immutable.ts:266:21 +!!! annotated symbol 10 tests/cases/compiler/immutable.ts:341:28 +!!! annotated symbol 11 tests/cases/compiler/immutable.ts:341:31 +!!! annotated symbol 12 tests/cases/compiler/immutable.ts:266:21 +!!! annotated symbol 13 tests/cases/compiler/immutable.ts:341:28 +!!! annotated symbol 14 tests/cases/compiler/immutable.ts:341:31 +!!! annotated symbol 15 tests/cases/compiler/immutable.ts:339:21 +!!! annotated symbol 16 tests/cases/compiler/immutable.ts:341:28 +!!! annotated symbol 17 tests/cases/compiler/immutable.ts:341:31 toJS(): Object; toJSON(): { [key: string]: V }; toSeq(): Seq.Keyed; @@ -403,11 +421,23 @@ tests/cases/compiler/immutable.ts(391,22): error TS2430: Interface 'Set' inco export function Indexed(collection: Iterable): Collection.Indexed; export interface Indexed extends Collection { ~~~~~~~ -!!! error TS2430: Interface 'Indexed' incorrectly extends interface 'Collection'. +!!! error TS2430: Interface '{|Indexed|0|}<{|T|1|}>' incorrectly extends interface '{|Collection|2|}'. !!! error TS2430: Types of property 'toSeq' are incompatible. -!!! error TS2430: Type '() => Indexed' is not assignable to type '() => this'. -!!! error TS2430: Type 'Indexed' is not assignable to type 'this'. -!!! error TS2430: 'Indexed' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Indexed'. +!!! error TS2430: Type '() => {|Indexed|4|}<{|T|5|}>' is not assignable to type '() => this'. +!!! error TS2430: Type '{|Indexed|6|}<{|T|7|}>' is not assignable to type 'this'. +!!! error TS2430: '{|Indexed|8|}<{|T|9|}>' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint '{|Indexed|10|}<{|T|11|}>'. +!!! annotated symbol 0 tests/cases/compiler/immutable.ts:358:21 +!!! annotated symbol 1 tests/cases/compiler/immutable.ts:359:30 +!!! annotated symbol 2 tests/cases/compiler/immutable.ts:404:19 +!!! annotated symbol 3 tests/cases/compiler/immutable.ts:359:30 +!!! annotated symbol 4 tests/cases/compiler/immutable.ts:286:21 +!!! annotated symbol 5 tests/cases/compiler/immutable.ts:359:30 +!!! annotated symbol 6 tests/cases/compiler/immutable.ts:286:21 +!!! annotated symbol 7 tests/cases/compiler/immutable.ts:359:30 +!!! annotated symbol 8 tests/cases/compiler/immutable.ts:286:21 +!!! annotated symbol 9 tests/cases/compiler/immutable.ts:359:30 +!!! annotated symbol 10 tests/cases/compiler/immutable.ts:358:21 +!!! annotated symbol 11 tests/cases/compiler/immutable.ts:359:30 toJS(): Array; toJSON(): Array; // Reading values @@ -441,11 +471,23 @@ tests/cases/compiler/immutable.ts(391,22): error TS2430: Interface 'Set' inco export function Set(collection: Iterable): Collection.Set; export interface Set extends Collection { ~~~ -!!! error TS2430: Interface 'Set' incorrectly extends interface 'Collection'. +!!! error TS2430: Interface '{|Set|0|}<{|T|1|}>' incorrectly extends interface '{|Collection|2|}'. !!! error TS2430: Types of property 'toSeq' are incompatible. -!!! error TS2430: Type '() => Set' is not assignable to type '() => this'. -!!! error TS2430: Type 'Set' is not assignable to type 'this'. -!!! error TS2430: 'Set' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Set'. +!!! error TS2430: Type '() => {|Set|4|}<{|T|5|}>' is not assignable to type '() => this'. +!!! error TS2430: Type '{|Set|6|}<{|T|7|}>' is not assignable to type 'this'. +!!! error TS2430: '{|Set|8|}<{|T|9|}>' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint '{|Set|10|}<{|T|11|}>'. +!!! annotated symbol 0 tests/cases/compiler/immutable.ts:390:21 +!!! annotated symbol 1 tests/cases/compiler/immutable.ts:391:26 +!!! annotated symbol 2 tests/cases/compiler/immutable.ts:404:19 +!!! annotated symbol 3 tests/cases/compiler/immutable.ts:391:26 +!!! annotated symbol 4 tests/cases/compiler/immutable.ts:302:21 +!!! annotated symbol 5 tests/cases/compiler/immutable.ts:391:26 +!!! annotated symbol 6 tests/cases/compiler/immutable.ts:302:21 +!!! annotated symbol 7 tests/cases/compiler/immutable.ts:391:26 +!!! annotated symbol 8 tests/cases/compiler/immutable.ts:302:21 +!!! annotated symbol 9 tests/cases/compiler/immutable.ts:391:26 +!!! annotated symbol 10 tests/cases/compiler/immutable.ts:390:21 +!!! annotated symbol 11 tests/cases/compiler/immutable.ts:391:26 toJS(): Array; toJSON(): Array; toSeq(): Seq.Set; diff --git a/tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt b/tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt index af63c18523d6a..3abdc40149af3 100644 --- a/tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt +++ b/tests/baselines/reference/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt @@ -56,27 +56,91 @@ tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.t const localChannelId = `blahblahblah`; return { type, localChannelId }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel | ChannelOfType>'. -!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick | ChannelOfType, "type">'. +!!! error TS2322: Type '{ {|type|0|}: {|T|1|}; {|localChannelId|2|}: string; }' is not assignable to type '{|NewChannel|3|}<{|ChannelOfType|4|}<{|T|5|}, {|TextChannel|6|}> | {|ChannelOfType|7|}<{|T|8|}, {|EmailChannel|9|}>>'. +!!! error TS2322: Type '{ {|type|10|}: {|T|11|}; {|localChannelId|12|}: string; }' is not assignable to type '{|Pick|13|}<{|ChannelOfType|14|}<{|T|15|}, {|TextChannel|16|}> | {|ChannelOfType|17|}<{|T|18|}, {|EmailChannel|19|}>, "type">'. !!! error TS2322: Types of property 'type' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. -!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. -!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. -!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType["type"]'. -!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType["type"]'. -!!! error TS2322: Type '"text" | "email"' is not assignable to type 'ChannelOfType["type"]'. -!!! error TS2322: Type '"text"' is not assignable to type 'ChannelOfType["type"]'. -!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'. -!!! error TS2322: Type '"text"' is not assignable to type 'T'. -!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. -!!! error TS2322: Type 'T' is not assignable to type 'T & "text"'. -!!! error TS2322: Type '"text" | "email"' is not assignable to type 'T & "text"'. -!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'. -!!! error TS2322: Type '"text"' is not assignable to type 'T'. -!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. -!!! error TS2322: Type 'T' is not assignable to type '"text"'. +!!! error TS2322: Type '{|T|20|}' is not assignable to type '{|ChannelOfType|21|}<{|T|22|}, {|TextChannel|23|}>["type"] & {|ChannelOfType|24|}<{|T|25|}, {|EmailChannel|26|}>["type"]'. +!!! error TS2322: Type '"text" | "email"' is not assignable to type '{|ChannelOfType|27|}<{|T|28|}, {|TextChannel|29|}>["type"] & {|ChannelOfType|30|}<{|T|31|}, {|EmailChannel|32|}>["type"]'. +!!! error TS2322: Type '"text"' is not assignable to type '{|ChannelOfType|33|}<{|T|34|}, {|TextChannel|35|}>["type"] & {|ChannelOfType|36|}<{|T|37|}, {|EmailChannel|38|}>["type"]'. +!!! error TS2322: Type '"text"' is not assignable to type '{|ChannelOfType|39|}<{|T|40|}, {|TextChannel|41|}>["type"]'. +!!! error TS2322: Type '{|T|42|}' is not assignable to type '{|ChannelOfType|43|}<{|T|44|}, {|TextChannel|45|}>["type"]'. +!!! error TS2322: Type '"text" | "email"' is not assignable to type '{|ChannelOfType|46|}<{|T|47|}, {|TextChannel|48|}>["type"]'. +!!! error TS2322: Type '"text"' is not assignable to type '{|ChannelOfType|49|}<{|T|50|}, {|TextChannel|51|}>["type"]'. +!!! error TS2322: Type '"text"' is not assignable to type '{|T|52|} & "text"'. +!!! error TS2322: Type '"text"' is not assignable to type '{|T|53|}'. +!!! error TS2322: '"text"' is assignable to the constraint of type '{|T|54|}', but '{|T|55|}' could be instantiated with a different subtype of constraint '"text" | "email"'. +!!! error TS2322: Type '{|T|56|}' is not assignable to type '{|T|57|} & "text"'. +!!! error TS2322: Type '"text" | "email"' is not assignable to type '{|T|58|} & "text"'. +!!! error TS2322: Type '"text"' is not assignable to type '{|T|59|} & "text"'. +!!! error TS2322: Type '"text"' is not assignable to type '{|T|60|}'. +!!! error TS2322: '"text"' is assignable to the constraint of type '{|T|61|}', but '{|T|62|}' could be instantiated with a different subtype of constraint '"text" | "email"'. +!!! error TS2322: Type '{|T|63|}' is not assignable to type '"text"'. !!! error TS2322: Type '"text" | "email"' is not assignable to type '"text"'. !!! error TS2322: Type '"email"' is not assignable to type '"text"'. +!!! annotated symbol 0 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:33:14 +!!! annotated symbol 1 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 2 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:33:20 +!!! annotated symbol 3 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:27:13 +!!! annotated symbol 4 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 5 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 6 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 7 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 8 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 9 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:7:11 +!!! annotated symbol 10 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:33:14 +!!! annotated symbol 11 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 12 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:33:20 +!!! annotated symbol 13 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 14 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 15 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 16 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 17 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 18 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 19 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:7:11 +!!! annotated symbol 20 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 21 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 22 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 23 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 24 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 25 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 26 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:7:11 +!!! annotated symbol 27 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 28 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 29 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 30 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 31 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 32 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:7:11 +!!! annotated symbol 33 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 34 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 35 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 36 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 37 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 38 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:7:11 +!!! annotated symbol 39 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 40 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 41 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 42 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 43 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 44 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 45 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 46 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 47 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 48 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 49 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:22:6 +!!! annotated symbol 50 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 51 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:1:11 +!!! annotated symbol 52 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 53 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 54 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 55 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 56 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 57 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 58 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 59 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 60 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 61 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 62 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 +!!! annotated symbol 63 tests/cases/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts:31:32 } const newTextChannel = makeNewChannel('text'); diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt index 6bbebeb6ec767..dea40b43cd8cb 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt @@ -22,12 +22,14 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen var x3: E; x3 += ''; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'E'. +!!! error TS2322: Type 'string' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts:2:6 var x4: {a: string}; x4 += ''; ~~ -!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }'. +!!! error TS2322: Type 'string' is not assignable to type '{ {|a|0|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts:13:10 var x5: void; x5 += ''; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.errors.txt index 7fa95fe942616..52152ad968b91 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.errors.txt @@ -11,10 +11,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualTy var o: I = { ~ -!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type '{|I|0|}'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType10_ES5.ts:1:11 [+"foo"]: "", [+"bar"]: 0 } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesContextualType10_ES6.errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType10_ES6.errors.txt index 116cd1a25311e..da45dededcc3b 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType10_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesContextualType10_ES6.errors.txt @@ -11,10 +11,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualTy var o: I = { ~ -!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type '{|I|0|}'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType10_ES6.ts:1:11 [+"foo"]: "", [+"bar"]: 0 } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.errors.txt index ee36609095a04..88830f382b833 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.errors.txt @@ -12,10 +12,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualTy var o: I = { ~ -!!! error TS2322: Type '{ [x: string]: string | number; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ [x: string]: string | number; }' is not assignable to type '{|I|0|}'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType8_ES5.ts:1:11 [""+"foo"]: "", [""+"bar"]: 0 } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesContextualType8_ES6.errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType8_ES6.errors.txt index 1048fd2e119e7..130f877a9e59b 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType8_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesContextualType8_ES6.errors.txt @@ -12,10 +12,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualTy var o: I = { ~ -!!! error TS2322: Type '{ [x: string]: string | number; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ [x: string]: string | number; }' is not assignable to type '{|I|0|}'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType8_ES6.ts:1:11 [""+"foo"]: "", [""+"bar"]: 0 } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.errors.txt index e76b3a704dc6e..0a84b029a66fe 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.errors.txt @@ -12,10 +12,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualTy var o: I = { ~ -!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type '{|I|0|}'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType9_ES5.ts:1:11 [+"foo"]: "", [+"bar"]: 0 } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesContextualType9_ES6.errors.txt b/tests/baselines/reference/computedPropertyNamesContextualType9_ES6.errors.txt index 468ad400c26cc..6bf9b0911210f 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType9_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesContextualType9_ES6.errors.txt @@ -12,10 +12,11 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualTy var o: I = { ~ -!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ [x: number]: string | number; }' is not assignable to type '{|I|0|}'. !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType9_ES6.ts:1:11 [+"foo"]: "", [+"bar"]: 0 } \ No newline at end of file diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt index 0215b4ee7cae3..5e79db35e2339 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt @@ -30,30 +30,55 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithou //Be contextually typed and and bct is not identical, results in errors that union type is not assignable to target var result2: A = true ? a : b; ~~~~~~~ -!!! error TS2322: Type 'A | B' is not assignable to type 'A'. -!!! error TS2322: Property 'propertyA' is missing in type 'B' but required in type 'A'. +!!! error TS2322: Type '{|A|0|} | {|B|1|}' is not assignable to type '{|A|2|}'. +!!! error TS2322: Property 'propertyA' is missing in type '{|B|3|}' but required in type '{|A|4|}'. !!! related TS2728 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:3:21: 'propertyA' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:3:7 var result3: B = true ? a : b; ~~~~~~~ -!!! error TS2322: Type 'A | B' is not assignable to type 'B'. -!!! error TS2322: Property 'propertyB' is missing in type 'A' but required in type 'B'. +!!! error TS2322: Type '{|A|0|} | {|B|1|}' is not assignable to type '{|B|2|}'. +!!! error TS2322: Property 'propertyB' is missing in type '{|A|3|}' but required in type '{|B|4|}'. !!! related TS2728 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:4:21: 'propertyB' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:4:7 var result31: A | B = true ? a : b; var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'. -!!! error TS2322: Type '(n: X) => string' is not assignable to type '(t: X) => number'. +!!! error TS2322: Type '((m: {|X|0|}) => number) | ((n: {|X|1|}) => string)' is not assignable to type '(t: {|X|2|}) => number'. +!!! error TS2322: Type '(n: {|X|3|}) => string' is not assignable to type '(t: {|X|4|}) => number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 4 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'. -!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => string'. +!!! error TS2322: Type '((m: {|X|0|}) => number) | ((n: {|X|1|}) => string)' is not assignable to type '(t: {|X|2|}) => string'. +!!! error TS2322: Type '(m: {|X|3|}) => number' is not assignable to type '(t: {|X|4|}) => string'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 4 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'. -!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => boolean'. +!!! error TS2322: Type '((m: {|X|0|}) => number) | ((n: {|X|1|}) => string)' is not assignable to type '(t: {|X|2|}) => boolean'. +!!! error TS2322: Type '(m: {|X|3|}) => number' is not assignable to type '(t: {|X|4|}) => boolean'. !!! error TS2322: Type 'number' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 +!!! annotated symbol 4 tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts:2:7 var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.propertyX2; \ No newline at end of file diff --git a/tests/baselines/reference/conditionalTypes1.errors.txt b/tests/baselines/reference/conditionalTypes1.errors.txt index 7abcf55b8e7cb..e7669ba51a199 100644 --- a/tests/baselines/reference/conditionalTypes1.errors.txt +++ b/tests/baselines/reference/conditionalTypes1.errors.txt @@ -68,21 +68,32 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS x = y; y = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'NonNullable'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|NonNullable|1|}<{|T|2|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:10:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:10:13 } function f2(x: T, y: NonNullable) { x = y; y = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'string | undefined' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'undefined' is not assignable to type 'NonNullable'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|NonNullable|1|}<{|T|2|}>'. +!!! error TS2322: Type 'string | undefined' is not assignable to type '{|NonNullable|3|}<{|T|4|}>'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|NonNullable|5|}<{|T|6|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:15:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:15:13 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:15:13 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes1.ts:15:13 let s1: string = x; // Error ~~ -!!! error TS2322: Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'string'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. !!! error TS2322: Type 'undefined' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:15:13 let s2: string = y; } @@ -90,22 +101,40 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS x = y; y = x; // Error ~ -!!! error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'NonNullable[keyof T]>'. -!!! error TS2322: Type 'undefined' is not assignable to type 'NonNullable[keyof T]>'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}] | undefined' is not assignable to type '{|NonNullable|2|}<{|Partial|3|}<{|T|4|}>[keyof {|T|5|}]>'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|NonNullable|6|}<{|Partial|7|}<{|T|8|}>[keyof {|T|9|}]>'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:22:13 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:22:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:22:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:22:13 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:22:13 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes1.ts:22:13 } function f4(x: T["x"], y: NonNullable) { x = y; y = x; // Error ~ -!!! error TS2322: Type 'T["x"]' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'string | undefined' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'undefined' is not assignable to type 'NonNullable'. +!!! error TS2322: Type '{|T|0|}["x"]' is not assignable to type '{|NonNullable|1|}<{|T|2|}["x"]>'. +!!! error TS2322: Type 'string | undefined' is not assignable to type '{|NonNullable|3|}<{|T|4|}["x"]>'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|NonNullable|5|}<{|T|6|}["x"]>'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:27:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:27:13 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:27:13 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes1.ts:27:13 let s1: string = x; // Error ~~ -!!! error TS2322: Type 'T["x"]' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|0|}["x"]' is not assignable to type 'string'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. !!! error TS2322: Type 'undefined' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:27:13 let s2: string = y; } @@ -180,22 +209,116 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS function f7(x: T, y: FunctionProperties, z: NonFunctionProperties) { x = y; // Error ~ -!!! error TS2322: Type 'Pick' is not assignable to type 'T'. -!!! error TS2322: 'Pick' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Pick|0|}<{|T|1|}, { [{|K|2|} in keyof {|T|3|}]: {|T|4|}[{|K|5|}] extends {|Function|6|} ? {|K|7|} : never; }[keyof {|T|8|}]>' is not assignable to type '{|T|9|}'. +!!! error TS2322: '{|Pick|10|}<{|T|11|}, { [{|K|12|} in keyof {|T|13|}]: {|T|14|}[{|K|15|}] extends {|Function|16|} ? {|K|17|} : never; }[keyof {|T|18|}]>' is assignable to the constraint of type '{|T|19|}', but '{|T|20|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 15 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 16 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 18 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 19 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 20 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 x = z; // Error ~ -!!! error TS2322: Type 'Pick' is not assignable to type 'T'. -!!! error TS2322: 'Pick' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Pick|0|}<{|T|1|}, { [{|K|2|} in keyof {|T|3|}]: {|T|4|}[{|K|5|}] extends {|Function|6|} ? never : {|K|7|}; }[keyof {|T|8|}]>' is not assignable to type '{|T|9|}'. +!!! error TS2322: '{|Pick|10|}<{|T|11|}, { [{|K|12|} in keyof {|T|13|}]: {|T|14|}[{|K|15|}] extends {|Function|16|} ? never : {|K|17|}; }[keyof {|T|18|}]>' is assignable to the constraint of type '{|T|19|}', but '{|T|20|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 15 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 16 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 18 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 19 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 20 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 y = x; y = z; // Error ~ -!!! error TS2322: Type 'Pick' is not assignable to type 'Pick'. -!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. +!!! error TS2322: Type '{|Pick|0|}<{|T|1|}, { [{|K|2|} in keyof {|T|3|}]: {|T|4|}[{|K|5|}] extends {|Function|6|} ? never : {|K|7|}; }[keyof {|T|8|}]>' is not assignable to type '{|Pick|9|}<{|T|10|}, { [{|K|11|} in keyof {|T|12|}]: {|T|13|}[{|K|14|}] extends {|Function|15|} ? {|K|16|} : never; }[keyof {|T|17|}]>'. +!!! error TS2322: Type '{|T|18|}[keyof {|T|19|}] extends {|Function|20|} ? keyof {|T|21|} : never' is not assignable to type '{|T|22|}[keyof {|T|23|}] extends {|Function|24|} ? never : keyof {|T|25|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 16 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 18 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 19 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 20 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 21 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 22 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 23 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 24 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 25 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 z = x; z = y; // Error ~ -!!! error TS2322: Type 'Pick' is not assignable to type 'Pick'. -!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. +!!! error TS2322: Type '{|Pick|0|}<{|T|1|}, { [{|K|2|} in keyof {|T|3|}]: {|T|4|}[{|K|5|}] extends {|Function|6|} ? {|K|7|} : never; }[keyof {|T|8|}]>' is not assignable to type '{|Pick|9|}<{|T|10|}, { [{|K|11|} in keyof {|T|12|}]: {|T|13|}[{|K|14|}] extends {|Function|15|} ? never : {|K|16|}; }[keyof {|T|17|}]>'. +!!! error TS2322: Type '{|T|18|}[keyof {|T|19|}] extends {|Function|20|} ? never : keyof {|T|21|}' is not assignable to type '{|T|22|}[keyof {|T|23|}] extends {|Function|24|} ? keyof {|T|25|} : never'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:93:36 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 16 tests/cases/conformance/types/conditional/conditionalTypes1.ts:96:39 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 18 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 19 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 20 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 21 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 22 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 23 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 +!!! annotated symbol 24 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 25 tests/cases/conformance/types/conditional/conditionalTypes1.ts:102:13 } function f8(x: keyof T, y: FunctionPropertyNames, z: NonFunctionPropertyNames) { @@ -203,24 +326,68 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS x = z; y = x; // Error ~ -!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. -!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. +!!! error TS2322: Type 'keyof {|T|0|}' is not assignable to type '{|T|1|}[keyof {|T|2|}] extends {|Function|3|} ? keyof {|T|4|} : never'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type '{|T|5|}[keyof {|T|6|}] extends {|Function|7|} ? keyof {|T|8|} : never'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|9|}[keyof {|T|10|}] extends {|Function|11|} ? keyof {|T|12|} : never'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 y = z; // Error ~ -!!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'never'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}] extends {|Function|2|} ? never : keyof {|T|3|}' is not assignable to type '{|T|4|}[keyof {|T|5|}] extends {|Function|6|} ? keyof {|T|7|} : never'. +!!! error TS2322: Type 'keyof {|T|8|}' is not assignable to type 'never'. !!! error TS2322: Type 'string | number | symbol' is not assignable to type 'never'. !!! error TS2322: Type 'string' is not assignable to type 'never'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 z = x; // Error ~ -!!! error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. -!!! error TS2322: Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. +!!! error TS2322: Type 'keyof {|T|0|}' is not assignable to type '{|T|1|}[keyof {|T|2|}] extends {|Function|3|} ? never : keyof {|T|4|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type '{|T|5|}[keyof {|T|6|}] extends {|Function|7|} ? never : keyof {|T|8|}'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|9|}[keyof {|T|10|}] extends {|Function|11|} ? never : keyof {|T|12|}'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 z = y; // Error ~ -!!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'never'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}] extends {|Function|2|} ? keyof {|T|3|} : never' is not assignable to type '{|T|4|}[keyof {|T|5|}] extends {|Function|6|} ? never : keyof {|T|7|}'. +!!! error TS2322: Type 'keyof {|T|8|}' is not assignable to type 'never'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:111:13 } type DeepReadonly = @@ -272,20 +439,45 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS let z2: 0 | "" = y; x = y; // Error ~ -!!! error TS2322: Type 'ZeroOf' is not assignable to type 'T'. -!!! error TS2322: 'ZeroOf' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'. -!!! error TS2322: Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'. -!!! error TS2322: Type '0' is not assignable to type 'T'. -!!! error TS2322: '0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'. -!!! error TS2322: Type '"" | 0' is not assignable to type 'T'. -!!! error TS2322: '"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'. -!!! error TS2322: Type '""' is not assignable to type 'T'. -!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'. +!!! error TS2322: Type '{|ZeroOf|0|}<{|T|1|}>' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{|ZeroOf|3|}<{|T|4|}>' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint 'string | number'. +!!! error TS2322: Type '0 | ({|T|7|} extends string ? "" : false)' is not assignable to type '{|T|8|}'. +!!! error TS2322: Type '0' is not assignable to type '{|T|9|}'. +!!! error TS2322: '0' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint 'string | number'. +!!! error TS2322: Type '"" | 0' is not assignable to type '{|T|12|}'. +!!! error TS2322: '"" | 0' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint 'string | number'. +!!! error TS2322: Type '""' is not assignable to type '{|T|15|}'. +!!! error TS2322: '""' is assignable to the constraint of type '{|T|16|}', but '{|T|17|}' could be instantiated with a different subtype of constraint 'string | number'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:140:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:140:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 15 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 16 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 y = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'ZeroOf'. -!!! error TS2322: Type 'string | number' is not assignable to type 'ZeroOf'. -!!! error TS2322: Type 'string' is not assignable to type 'ZeroOf'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|ZeroOf|1|}<{|T|2|}>'. +!!! error TS2322: Type 'string | number' is not assignable to type '{|ZeroOf|3|}<{|T|4|}>'. +!!! error TS2322: Type 'string' is not assignable to type '{|ZeroOf|5|}<{|T|6|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:140:6 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:140:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes1.ts:140:6 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes1.ts:156:14 } type T35 = T[]; @@ -417,8 +609,12 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS const f44 = (value: T94): T95 => value; const f45 = (value: T95): T94 => value; // Error ~~~~~ -!!! error TS2322: Type 'T95' is not assignable to type 'T94'. +!!! error TS2322: Type '{|T95|0|}<{|U|1|}>' is not assignable to type '{|T94|2|}<{|U|3|}>'. !!! error TS2322: Type 'boolean' is not assignable to type 'true'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes1.ts:286:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes1.ts:288:14 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes1.ts:285:6 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes1.ts:288:14 // Repro from #21863 diff --git a/tests/baselines/reference/conditionalTypes2.errors.txt b/tests/baselines/reference/conditionalTypes2.errors.txt index 1cf5b0eca44fa..9f606849cd4b1 100644 --- a/tests/baselines/reference/conditionalTypes2.errors.txt +++ b/tests/baselines/reference/conditionalTypes2.errors.txt @@ -50,43 +50,99 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2 a = b; b = a; // Error ~ -!!! error TS2322: Type 'Covariant
' is not assignable to type 'Covariant'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. -!!! error TS2322: 'A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Covariant|0|}<{|A|1|}>' is not assignable to type '{|Covariant|2|}<{|B|3|}>'. +!!! error TS2322: Type '{|A|4|}' is not assignable to type '{|B|5|}'. +!!! error TS2322: '{|A|6|}' is assignable to the constraint of type '{|B|7|}', but '{|B|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes2.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:16 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:16 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:13 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:16 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:13:16 } function f2(a: Contravariant, b: Contravariant) { a = b; // Error ~ -!!! error TS2322: Type 'Contravariant' is not assignable to type 'Contravariant'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. -!!! error TS2322: 'A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Contravariant|0|}<{|B|1|}>' is not assignable to type '{|Contravariant|2|}<{|A|3|}>'. +!!! error TS2322: Type '{|A|4|}' is not assignable to type '{|B|5|}'. +!!! error TS2322: '{|A|6|}' is assignable to the constraint of type '{|B|7|}', but '{|B|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes2.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:16 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:5:11 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:16 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:13 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:16 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:18:16 b = a; } function f3(a: Invariant, b: Invariant) { a = b; // Error ~ -!!! error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. +!!! error TS2322: Type '{|Invariant|0|}<{|B|1|}>' is not assignable to type '{|Invariant|2|}<{|A|3|}>'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'B extends string ? keyof B : B' is not assignable to type 'A extends string ? keyof A : A'. -!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof A'. -!!! error TS2322: Type 'string' is not assignable to type 'keyof A'. -!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'. -!!! error TS2322: Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'. -!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof A'. -!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof A'. -!!! error TS2322: Type 'string' is not assignable to type 'keyof A'. +!!! error TS2322: Type '{|B|4|} extends string ? keyof {|B|5|} : {|B|6|}' is not assignable to type '{|A|7|} extends string ? keyof {|A|8|} : {|A|9|}'. +!!! error TS2322: Type 'keyof {|B|10|}' is not assignable to type 'keyof {|A|11|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof {|A|12|}'. +!!! error TS2322: Type 'string' is not assignable to type 'keyof {|A|13|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof {|A|14|}'. +!!! error TS2322: Type 'keyof {|B|15|}' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof {|A|16|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof {|A|17|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | keyof {|A|18|}'. +!!! error TS2322: Type 'keyof {|B|19|}' is not assignable to type 'keyof {|A|20|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof {|A|21|}'. +!!! error TS2322: Type 'string' is not assignable to type 'keyof {|A|22|}'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes2.ts:9:11 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:9:11 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 15 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 16 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 18 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 19 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 20 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 21 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 22 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 b = a; // Error ~ -!!! error TS2322: Type 'Invariant' is not assignable to type 'Invariant'. +!!! error TS2322: Type '{|Invariant|0|}<{|A|1|}>' is not assignable to type '{|Invariant|2|}<{|B|3|}>'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type 'A extends string ? keyof A : A' is not assignable to type 'B extends string ? keyof B : B'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. -!!! error TS2322: 'A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|A|4|} extends string ? keyof {|A|5|} : {|A|6|}' is not assignable to type '{|B|7|} extends string ? keyof {|B|8|} : {|B|9|}'. +!!! error TS2322: Type '{|A|10|}' is not assignable to type '{|B|11|}'. +!!! error TS2322: '{|A|12|}' is assignable to the constraint of type '{|B|13|}', but '{|B|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes2.ts:9:11 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:9:11 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:13 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes2.ts:23:16 } // Extract is a T that is known to be a Function @@ -136,23 +192,68 @@ tests/cases/conformance/types/conditional/conditionalTypes2.ts(75,12): error TS2 function f21(x: Extract, Bar>, y: Extract, z: Extract2) { fooBat(x); // Error ~ -!!! error TS2345: Argument of type 'Extract, Bar>' is not assignable to parameter of type '{ foo: string; bat: string; }'. -!!! error TS2345: Property 'bat' is missing in type 'Bar & Foo' but required in type '{ foo: string; bat: string; }'. -!!! error TS2345: Type 'Extract' is not assignable to type '{ foo: string; bat: string; }'. -!!! error TS2345: Property 'bat' is missing in type 'Bar & Foo' but required in type '{ foo: string; bat: string; }'. +!!! error TS2345: Argument of type '{|Extract|0|}<{|Extract|1|}<{|T|2|}, {|Foo|3|}>, {|Bar|4|}>' is not assignable to parameter of type '{ {|foo|5|}: string; {|bat|6|}: string; }'. +!!! error TS2345: Property 'bat' is missing in type '{|Bar|7|} & {|Foo|8|}' but required in type '{ {|foo|9|}: string; {|bat|10|}: string; }'. +!!! error TS2345: Type '{|Extract|11|}<{|T|12|}, {|Bar|13|}>' is not assignable to type '{ {|foo|14|}: string; {|bat|15|}: string; }'. +!!! error TS2345: Property 'bat' is missing in type '{|Bar|16|} & {|Foo|17|}' but required in type '{ {|foo|18|}: string; {|bat|19|}: string; }'. !!! related TS2728 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43: 'bat' is declared here. !!! related TS2728 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43: 'bat' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:72:14 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes2.ts:72:14 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 15 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 +!!! annotated symbol 16 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 17 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 18 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 19 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 fooBat(y); // Error ~ -!!! error TS2345: Argument of type 'Extract' is not assignable to parameter of type '{ foo: string; bat: string; }'. -!!! error TS2345: Property 'bat' is missing in type 'Foo & Bar' but required in type '{ foo: string; bat: string; }'. +!!! error TS2345: Argument of type '{|Extract|0|}<{|T|1|}, {|Foo|2|} & {|Bar|3|}>' is not assignable to parameter of type '{ {|foo|4|}: string; {|bat|5|}: string; }'. +!!! error TS2345: Property 'bat' is missing in type '{|Foo|6|} & {|Bar|7|}' but required in type '{ {|foo|8|}: string; {|bat|9|}: string; }'. !!! related TS2728 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43: 'bat' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes2.ts:72:14 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 fooBat(z); // Error ~ -!!! error TS2345: Argument of type 'Extract2' is not assignable to parameter of type '{ foo: string; bat: string; }'. -!!! error TS2345: Type 'T extends Bar ? T : never' is not assignable to type '{ foo: string; bat: string; }'. -!!! error TS2345: Property 'bat' is missing in type 'Bar & Foo' but required in type '{ foo: string; bat: string; }'. +!!! error TS2345: Argument of type '{|Extract2|0|}<{|T|1|}, {|Foo|2|}, {|Bar|3|}>' is not assignable to parameter of type '{ {|foo|4|}: string; {|bat|5|}: string; }'. +!!! error TS2345: Type '{|T|6|} extends {|Bar|7|} ? {|T|8|} : never' is not assignable to type '{ {|foo|9|}: string; {|bat|10|}: string; }'. +!!! error TS2345: Property 'bat' is missing in type '{|Bar|11|} & {|Foo|12|}' but required in type '{ {|foo|13|}: string; {|bat|14|}: string; }'. !!! related TS2728 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43: 'bat' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypes2.ts:64:6 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypes2.ts:72:14 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypes2.ts:72:14 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypes2.ts:72:14 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypes2.ts:59:6 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypes2.ts:58:6 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:30 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypes2.ts:62:43 } // Repros from #22860 diff --git a/tests/baselines/reference/conditionalTypesExcessProperties.errors.txt b/tests/baselines/reference/conditionalTypesExcessProperties.errors.txt index 24669d3426d93..7c93ee010acf3 100644 --- a/tests/baselines/reference/conditionalTypesExcessProperties.errors.txt +++ b/tests/baselines/reference/conditionalTypesExcessProperties.errors.txt @@ -14,11 +14,39 @@ tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts(9, function testFunc2(a: A, sa: Something) { sa = { test: 'hi', arg: a }; // not excess (but currently still not assignable) ~~ -!!! error TS2322: Type '{ test: string; arg: A; }' is not assignable to type 'Something'. -!!! error TS2322: Type '{ test: string; arg: A; }' is not assignable to type 'A extends object ? { arg: A; } : { arg?: undefined; }'. +!!! error TS2322: Type '{ {|test|0|}: string; {|arg|1|}: {|A|2|}; }' is not assignable to type '{|Something|3|}<{|A|4|}>'. +!!! error TS2322: Type '{ {|test|5|}: string; {|arg|6|}: {|A|7|}; }' is not assignable to type '{|A|8|} extends object ? { {|arg|9|}: {|A|10|}; } : { {|arg|11|}?: undefined; }'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:8:12 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:8:24 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:1:6 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:8:12 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:8:24 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:2:5 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:4:5 sa = { test: 'bye', arg: a, arr: a } // excess ~~ -!!! error TS2322: Type '{ test: string; arg: A; arr: A; }' is not assignable to type 'Something'. -!!! error TS2322: Type '{ test: string; arg: A; arr: A; }' is not assignable to type 'A extends object ? { arg: A; } : { arg?: undefined; }'. +!!! error TS2322: Type '{ {|test|0|}: string; {|arg|1|}: {|A|2|}; {|arr|3|}: {|A|4|}; }' is not assignable to type '{|Something|5|}<{|A|6|}>'. +!!! error TS2322: Type '{ {|test|7|}: string; {|arg|8|}: {|A|9|}; {|arr|10|}: {|A|11|}; }' is not assignable to type '{|A|12|} extends object ? { {|arg|13|}: {|A|14|}; } : { {|arg|15|}?: undefined; }'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:9:12 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:9:25 +!!! annotated symbol 2 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 3 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:9:33 +!!! annotated symbol 4 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 5 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:1:6 +!!! annotated symbol 6 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 7 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:9:12 +!!! annotated symbol 8 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:9:25 +!!! annotated symbol 9 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 10 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:9:33 +!!! annotated symbol 11 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 12 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 13 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:2:5 +!!! annotated symbol 14 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:7:20 +!!! annotated symbol 15 tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts:4:5 } \ No newline at end of file diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt index 76de0b10e47cb..1f8e068232e20 100644 --- a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt @@ -24,13 +24,17 @@ tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(38,5): error TS2 function mixed1(x: Record2<'a', string>, y: Record) { x = y; // error ~ -!!! error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", string>'. +!!! error TS2741: Property 'a' is missing in type '{|Record|0|}' but required in type '{|Record2|1|}<"a", string>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 1 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:5:6 } function mixed2(x: Record<'a', string>, y: Record2) { x = y; // error ~ -!!! error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", string>'. +!!! error TS2741: Property 'a' is missing in type '{|Record2|0|}' but required in type '{|Record|1|}<"a", string>'. +!!! annotated symbol 0 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:5:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1452:6 } function defaultRecord2(x: Record<'a', T>, y: Record) { @@ -44,12 +48,20 @@ tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(38,5): error TS2 function mixed3(x: Record2<'a', T>, y: Record) { x = y; // error ~ -!!! error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", T>'. +!!! error TS2741: Property 'a' is missing in type '{|Record|0|}' but required in type '{|Record2|2|}<"a", {|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 1 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:33:17 +!!! annotated symbol 2 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:5:6 +!!! annotated symbol 3 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:33:17 } function mixed4(x: Record<'a', T>, y: Record2) { x = y; // error ~ -!!! error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", T>'. +!!! error TS2741: Property 'a' is missing in type '{|Record2|0|}' but required in type '{|Record|2|}<"a", {|T|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:5:6 +!!! annotated symbol 1 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:37:17 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 3 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts:37:17 } \ No newline at end of file diff --git a/tests/baselines/reference/constEnumPropertyAccess2.errors.txt b/tests/baselines/reference/constEnumPropertyAccess2.errors.txt index c80283f65367e..8d484e4626c64 100644 --- a/tests/baselines/reference/constEnumPropertyAccess2.errors.txt +++ b/tests/baselines/reference/constEnumPropertyAccess2.errors.txt @@ -26,7 +26,8 @@ tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(18,3): error TS25 var g: G; g = "string"; ~ -!!! error TS2322: Type '"string"' is not assignable to type 'G'. +!!! error TS2322: Type '"string"' is not assignable to type '{|G|0|}'. +!!! annotated symbol 0 tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts:5:12 function foo(x: G) { } G.B = 3; ~ diff --git a/tests/baselines/reference/constraints0.errors.txt b/tests/baselines/reference/constraints0.errors.txt index 4759fcfbe1462..35884157f3867 100644 --- a/tests/baselines/reference/constraints0.errors.txt +++ b/tests/baselines/reference/constraints0.errors.txt @@ -18,8 +18,12 @@ tests/cases/compiler/constraints0.ts(14,11): error TS2344: Type 'B' does not sat var v1: C; // should work var v2: C; // should not work ~ -!!! error TS2344: Type 'B' does not satisfy the constraint 'A'. -!!! error TS2344: Property 'a' is missing in type 'B' but required in type 'A'. +!!! error TS2344: Type '{|B|0|}' does not satisfy the constraint '{|A|1|}'. +!!! error TS2344: Property 'a' is missing in type '{|B|2|}' but required in type '{|A|3|}'. !!! related TS2728 tests/cases/compiler/constraints0.ts:2:2: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/constraints0.ts:5:11 +!!! annotated symbol 1 tests/cases/compiler/constraints0.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/constraints0.ts:5:11 +!!! annotated symbol 3 tests/cases/compiler/constraints0.ts:1:11 var y = v1.x.a; // 'a' should be of type 'number' \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt index e326d163c8ced..6ce21d8cab400 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt @@ -72,10 +72,12 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc // S's interface I2 extends Base2 { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I2|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:61:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:54:15 // N's a: new (x: number) => string; // error because base returns non-void; } @@ -83,11 +85,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc // S's interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => string' is not assignable to type 'new (x: T) => T'. -!!! error TS2430: Type 'string' is not assignable to type 'T'. -!!! error TS2430: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new <{|T|2|}>(x: {|T|3|}) => string' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type 'string' is not assignable to type '{|T|7|}'. +!!! error TS2430: 'string' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:67:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:54:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:69:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:69:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:57:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:57:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:57:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:57:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:57:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts:57:18 // N's a2: new (x: T) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt index 59d8105c59cc9..c8e9427d115a1 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt @@ -82,12 +82,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I2 extends A { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}, {|U|2|}>' incorrectly extends interface '{|A|3|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'. +!!! error TS2430: Type 'new (x: {|T|4|}) => {|U|5|}[]' is not assignable to type 'new (x: number) => string[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'number' is not assignable to type 'T'. -!!! error TS2430: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'number' is not assignable to type '{|T|6|}'. +!!! error TS2430: 'number' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:25 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:25 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:22 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:41:22 a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -98,14 +107,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I4 extends A { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'a8' are incompatible. -!!! error TS2430: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. +!!! error TS2430: Type 'new <{|T|2|} extends {|Base|3|}, {|U|4|} extends {|Derived|5|}>(x: (arg: {|T|6|}) => {|U|7|}, y: (arg2: { {|foo|8|}: number; }) => {|U|9|}) => (r: {|T|10|}) => {|U|11|}' is not assignable to type 'new (x: (arg: {|Base|12|}) => {|Derived|13|}, y: (arg2: {|Base|14|}) => {|Derived|15|}) => (r: {|Base|16|}) => {|Derived|17|}'. !!! error TS2430: Types of parameters 'y' and 'y' are incompatible. !!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible. -!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'. +!!! error TS2430: Type '{ {|foo|18|}: number; }' is not assignable to type '{|Base|19|}'. !!! error TS2430: Types of property 'foo' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:50:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:38 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:38 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:87 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:38 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:22 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:38 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:6:11 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:51:87 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } @@ -123,25 +152,56 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I6 extends A { ~~ -!!! error TS2430: Interface 'I6' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I6|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'a15' are incompatible. -!!! error TS2430: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => number'. +!!! error TS2430: Type 'new <{|T|2|}>(x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}' is not assignable to type 'new (x: { {|a|8|}: string; {|b|9|}: number; }) => number'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. +!!! error TS2430: Type '{ {|a|10|}: string; {|b|11|}: number; }' is not assignable to type '{ {|a|12|}: string; {|b|13|}: string; }'. !!! error TS2430: Types of property 'b' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:66:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:37 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:23 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:23 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:28 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:39 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:28 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:39 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:31 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:67:37 a15: new (x: { a: T; b: T }) => T; // error, T is {} which isn't an acceptable return type } interface I7 extends A { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I7|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'a15' are incompatible. -!!! error TS2430: Type 'new (x: { a: T; b: T; }) => number' is not assignable to type 'new (x: { a: string; b: number; }) => number'. +!!! error TS2430: Type 'new <{|T|2|} extends {|Base|3|}>(x: { {|a|4|}: {|T|5|}; {|b|6|}: {|T|7|}; }) => number' is not assignable to type 'new (x: { {|a|8|}: string; {|b|9|}: number; }) => number'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. +!!! error TS2430: Type '{ {|a|10|}: string; {|b|11|}: number; }' is not assignable to type '{ {|a|12|}: {|Base|13|}; {|b|14|}: {|Base|15|}; }'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|16|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:70:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:12:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:44 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:23 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:50 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:23 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:28 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:39 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:28 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:23:39 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:44 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:71:50 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:5:11 a15: new (x: { a: T; b: T }) => number; // error, T defaults to Base, which is not compatible with number or string } @@ -159,12 +219,23 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I6 extends B { ~~ -!!! error TS2430: Interface 'I6' incorrectly extends interface 'B'. +!!! error TS2430: Interface '{|I6|0|}' incorrectly extends interface '{|B|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. -!!! error TS2430: Type 'string[]' is not assignable to type 'T[]'. -!!! error TS2430: Type 'string' is not assignable to type 'T'. -!!! error TS2430: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new <{|T|2|}>(x: {|T|3|}) => string[]' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}) => {|T|6|}[]'. +!!! error TS2430: Type 'string[]' is not assignable to type '{|T|7|}[]'. +!!! error TS2430: Type 'string' is not assignable to type '{|T|8|}'. +!!! error TS2430: 'string' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:86:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:82:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:87:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:87:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:83:22 a2: new (x: T) => string[]; // error } @@ -175,11 +246,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc interface I7 extends C { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'C'. +!!! error TS2430: Interface '{|I7|0|}' incorrectly extends interface '{|C|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. -!!! error TS2430: Type 'T[]' is not assignable to type 'string[]'. -!!! error TS2430: Type 'T' is not assignable to type 'string'. +!!! error TS2430: Type 'new <{|T|2|}>(x: {|T|3|}) => {|T|4|}[]' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => string[]'. +!!! error TS2430: Type '{|T|7|}[]' is not assignable to type 'string[]'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:95:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:91:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:96:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:96:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:96:22 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:92:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:92:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:92:22 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts:92:22 a2: new (x: T) => T[]; // error } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.errors.txt index a2ea2c70c65ee..a85b699583901 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.errors.txt @@ -75,84 +75,213 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc // S's interface I extends A { ~ -!!! error TS2430: Interface 'I' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => T[]'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}[]' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => {|T|7|}[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:12:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:12:13 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:12:13 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:12:13 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:12:13 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:13 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:24:13 a: new (x: T) => T[]; } interface I2 extends A { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => string[]'. +!!! error TS2430: Type 'new (x: {|T|3|}) => string[]' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}) => string[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:28:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:13:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:13:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:13:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:13:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:28:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:28:14 a2: new (x: T) => string[]; } interface I3 extends A { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new (x: T) => void'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => void'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:14:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:14:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:14:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:14:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:32:14 a3: new (x: T) => T; } interface I4 extends A { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I4|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type 'new (x: T, y: U) => string' is not assignable to type 'new (x: T, y: U) => string'. +!!! error TS2430: Type 'new <{|U|3|}>(x: {|T|4|}, y: {|U|5|}) => string' is not assignable to type 'new <{|T|6|}, {|U|7|}>(x: {|T|8|}, y: {|U|9|}) => string'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:37:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:37:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:15:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:15:17 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:15:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:15:17 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:15:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:15:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:36:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:36:14 a4: new (x: T, y: U) => string; } interface I5 extends A { ~~ -!!! error TS2430: Interface 'I5' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I5|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type 'new (x: (arg: T) => U) => T' is not assignable to type 'new (x: (arg: T) => U) => T'. +!!! error TS2430: Type 'new <{|U|3|}>(x: (arg: {|T|4|}) => {|U|5|}) => {|T|6|}' is not assignable to type 'new <{|T|7|}, {|U|8|}>(x: (arg: {|T|9|}) => {|U|10|}) => {|T|11|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|12|}' is not assignable to type '{|T|13|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:41:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:41:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:17 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:17 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:40:14 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:14 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:16:14 a5: new (x: (arg: T) => U) => T; } interface I7 extends A { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I7|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a11' are incompatible. -!!! error TS2430: Type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base'. +!!! error TS2430: Type 'new <{|U|3|}>(x: { {|foo|4|}: {|T|5|}; }, y: { {|foo|6|}: {|U|7|}; {|bar|8|}: {|U|9|}; }) => {|Base|10|}' is not assignable to type 'new <{|T|11|}>(x: { {|foo|12|}: {|T|13|}; }, y: { {|foo|14|}: {|T|15|}; {|bar|16|}: {|T|17|}; }) => {|Base|18|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ foo: T; }' is not assignable to type '{ foo: T; }'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: Type '{ {|foo|19|}: {|T|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; }'. Two different types with this name exist, but they are unrelated. !!! error TS2430: Types of property 'foo' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|23|}' is not assignable to type '{|T|24|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|25|}' is assignable to the constraint of type '{|T|26|}', but '{|T|27|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:38 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:46 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:23 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:38 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:46 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:23 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:45:23 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:18:15 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:14 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:44:14 a11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; } interface I9 extends A { ~~ -!!! error TS2430: Interface 'I9' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I9|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a16' are incompatible. -!!! error TS2430: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: T; b: T; }) => T[]'. +!!! error TS2430: Type 'new (x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}[]' is not assignable to type 'new <{|T|8|} extends {|Base|9|}>(x: { {|a|10|}: {|T|11|}; {|b|12|}: {|T|13|}; }) => {|T|14|}[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ a: T; b: T; }'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: Type '{ {|a|15|}: {|T|16|}; {|b|17|}: {|T|18|}; }' is not assignable to type '{ {|a|19|}: {|T|20|}; {|b|21|}: {|T|22|}; }'. Two different types with this name exist, but they are unrelated. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2430: Type 'Base' is not assignable to type 'T'. -!!! error TS2430: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|23|}' is not assignable to type '{|T|24|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|25|}' is assignable to the constraint of type '{|T|26|}', but '{|T|27|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|Base|28|}' is not assignable to type '{|T|29|}'. +!!! error TS2430: '{|Base|30|}' is assignable to the constraint of type '{|T|31|}', but '{|T|32|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:49:20 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:49:26 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:36 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:42 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:36 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:42 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:49:20 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:49:26 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:20:15 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 30 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:5:7 +!!! annotated symbol 31 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 +!!! annotated symbol 32 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance6.ts:48:14 a16: new (x: { a: T; b: T }) => T[]; } \ No newline at end of file diff --git a/tests/baselines/reference/constructorAsType.errors.txt b/tests/baselines/reference/constructorAsType.errors.txt index 780abecc1bca5..a108b50031c0e 100644 --- a/tests/baselines/reference/constructorAsType.errors.txt +++ b/tests/baselines/reference/constructorAsType.errors.txt @@ -5,8 +5,10 @@ tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name ==== tests/cases/compiler/constructorAsType.ts (1 errors) ==== var Person:new () => {name: string;} = function () {return {name:"joe"};}; ~~~~~~ -!!! error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. +!!! error TS2322: Type '() => { {|name|0|}: string; }' is not assignable to type 'new () => { {|name|1|}: string; }'. !!! error TS2322: Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'. +!!! annotated symbol 0 tests/cases/compiler/constructorAsType.ts:1:61 +!!! annotated symbol 1 tests/cases/compiler/constructorAsType.ts:1:23 var Person2:{new() : {name:string;};}; diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt index 38fadde8f5b99..1c87ffda1bc81 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt @@ -21,11 +21,19 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co constructor(x: T, y: U); constructor(x: T = 1, public y: U = x) { // error ~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type 'T'. -!!! error TS2322: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '1' is not assignable to type '{|T|0|}'. +!!! error TS2322: '1' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:9 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:9 +!!! annotated symbol 2 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:9 ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:9 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:12 +!!! annotated symbol 2 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:9 +!!! annotated symbol 3 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:12 +!!! annotated symbol 4 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:8:12 var z = x; } } @@ -34,8 +42,14 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co constructor(x); constructor(x: T = new Date()) { // error ~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Date' is not assignable to type 'T'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:15:9 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:15:9 +!!! annotated symbol 4 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts:15:9 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 var y = x; } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index 2e8c79d159ab7..b64e67bf8252a 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -36,7 +36,8 @@ tests/cases/compiler/constructorOverloads1.ts(17,18): error TS2345: Argument of var f2 = new Foo(0); var f3 = new Foo(f1); ~~ -!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{|Foo|0|}' is not assignable to parameter of type 'number'. +!!! annotated symbol 0 tests/cases/compiler/constructorOverloads1.ts:1:7 var f4 = new Foo([f1,f2,f3]); ~~~~~~~~~~ !!! error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'number'. diff --git a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt index faab8a5514511..a0a1555184ba2 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt +++ b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt @@ -7,7 +7,8 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return constructor() { return 1; ~~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type 'X'. +!!! error TS2322: Type '1' is not assignable to type '{|X|0|}'. +!!! annotated symbol 0 tests/cases/compiler/constructorReturnsInvalidType.ts:1:7 ~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt index 499b31460b7dc..d5ae4e9e3be41 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt @@ -19,7 +19,8 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl constructor() { return 1; // error ~~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type 'D'. +!!! error TS2322: Type '1' is not assignable to type '{|D|0|}'. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts:9:7 ~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } @@ -39,9 +40,12 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl ~~~~~~~~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. ~ -!!! error TS2322: Type 'number' is not assignable to type 'T'. -!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'number' is not assignable to type '{|T|0|}'. +!!! error TS2322: 'number' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. !!! related TS6500 tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts:24:5: The expected type comes from property 'x' which is declared here on type 'F' +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts:23:9 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts:23:9 +!!! annotated symbol 2 tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts:23:9 } } diff --git a/tests/baselines/reference/contextualSignatureInstantiation.errors.txt b/tests/baselines/reference/contextualSignatureInstantiation.errors.txt index 6c14ad3c1503a..ab6f065d3747f 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation.errors.txt +++ b/tests/baselines/reference/contextualSignatureInstantiation.errors.txt @@ -30,19 +30,31 @@ tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatur var b: number | string; var b = foo(g); // Error, number and string are disjoint types ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => {|T|3|}' is not assignable to parameter of type '(x: number, y: string) => number'. !!! error TS2345: Types of parameters 'y' and 'y' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 var b = bar(1, "one", g); // Error, number and string are disjoint types ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => {|T|3|}' is not assignable to parameter of type '(x: number, y: string) => number'. !!! error TS2345: Types of parameters 'y' and 'y' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 var b = bar("one", 1, g); // Error, number and string are disjoint types ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => {|T|3|}' is not assignable to parameter of type '(x: string, y: number) => string'. !!! error TS2345: Types of parameters 'y' and 'y' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts:11:20 var b = baz(b, b, g); // Should be number | string var d: number[] | string[]; diff --git a/tests/baselines/reference/contextualSignatureInstatiationContravariance.errors.txt b/tests/baselines/reference/contextualSignatureInstatiationContravariance.errors.txt index 6ad28b5fc80f2..352de52f06a51 100644 --- a/tests/baselines/reference/contextualSignatureInstatiationContravariance.errors.txt +++ b/tests/baselines/reference/contextualSignatureInstatiationContravariance.errors.txt @@ -13,10 +13,18 @@ tests/cases/compiler/contextualSignatureInstatiationContravariance.ts(8,1): erro var g2: (g: Giraffe, e: Elephant) => void; g2 = f2; // error because Giraffe and Elephant are disjoint types ~~ -!!! error TS2322: Type '(x: T, y: T) => void' is not assignable to type '(g: Giraffe, e: Elephant) => void'. +!!! error TS2322: Type '<{|T|0|} extends {|Animal|1|}>(x: {|T|2|}, y: {|T|3|}) => void' is not assignable to type '(g: {|Giraffe|4|}, e: {|Elephant|5|}) => void'. !!! error TS2322: Types of parameters 'y' and 'e' are incompatible. -!!! error TS2322: Property 'y' is missing in type 'Elephant' but required in type 'Giraffe'. +!!! error TS2322: Property 'y' is missing in type '{|Elephant|6|}' but required in type '{|Giraffe|7|}'. !!! related TS2728 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:2:36: 'y' is declared here. +!!! annotated symbol 0 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:5:10 +!!! annotated symbol 1 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:5:10 +!!! annotated symbol 3 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:5:10 +!!! annotated symbol 4 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:2:11 +!!! annotated symbol 5 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:3:11 +!!! annotated symbol 7 tests/cases/compiler/contextualSignatureInstatiationContravariance.ts:2:11 var h2: (g1: Giraffe, g2: Giraffe) => void; h2 = f2; // valid because Giraffe satisfies the constraint. It is safe in the traditional contravariant fashion. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypeWithTuple.errors.txt b/tests/baselines/reference/contextualTypeWithTuple.errors.txt index 14228786ef043..2c8b005de488d 100644 --- a/tests/baselines/reference/contextualTypeWithTuple.errors.txt +++ b/tests/baselines/reference/contextualTypeWithTuple.errors.txt @@ -42,8 +42,9 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(25,1): error TS23 // error objNumTuple = [ {}, 5]; ~~ -!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: string; }'. +!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{ {|a|0|}: string; }'. !!! related TS2728 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:5:21: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:5:21 numStrBoolTuple = numStrTuple; ~~~~~~~~~~~~~~~ !!! error TS2741: Property '2' is missing in type '[number, string]' but required in type '[number, string, boolean]'. @@ -56,12 +57,18 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(25,1): error TS23 unionTuple = unionTuple1; unionTuple = unionTuple2; ~~~~~~~~~~ -!!! error TS2322: Type '[C, string | number, D]' is not assignable to type '[C, string | number]'. +!!! error TS2322: Type '[{|C|0|}, string | number, {|D|1|}]' is not assignable to type '[{|C|2|}, string | number]'. !!! error TS2322: Types of property 'length' are incompatible. !!! error TS2322: Type '3' is not assignable to type '2'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:8:7 +!!! annotated symbol 2 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:7:7 unionTuple2 = unionTuple; ~~~~~~~~~~~ -!!! error TS2741: Property '2' is missing in type '[C, string | number]' but required in type '[C, string | number, D]'. +!!! error TS2741: Property '2' is missing in type '[{|C|0|}, string | number]' but required in type '[{|C|1|}, string | number, {|D|2|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts:8:7 numStrTuple = unionTuple3; ~~~~~~~~~~~ !!! error TS2322: Type '[number, string | number]' is not assignable to type '[number, string]'. diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt index 733e18307fd43..24d6a7bb9f12a 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt +++ b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt @@ -45,11 +45,16 @@ tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts( // Since T is union Type we only allow the assignment of either object with property of type string or object with property of type number but do not allow object with property of type string | number var objStrOrNum3: { prop: string } | { prop: number } = { ~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: string | number; }' is not assignable to type '{ prop: string; } | { prop: number; }'. -!!! error TS2322: Type '{ prop: string | number; }' is not assignable to type '{ prop: number; }'. +!!! error TS2322: Type '{ {|prop|0|}: string | number; }' is not assignable to type '{ {|prop|1|}: string; } | { {|prop|2|}: number; }'. +!!! error TS2322: Type '{ {|prop|3|}: string | number; }' is not assignable to type '{ {|prop|4|}: number; }'. !!! error TS2322: Types of property 'prop' are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:15:5 +!!! annotated symbol 1 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:14:21 +!!! annotated symbol 2 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:14:40 +!!! annotated symbol 3 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:15:5 +!!! annotated symbol 4 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:14:40 prop: strOrNumber }; var objStrOrNum4: { prop: string | number } = { @@ -57,38 +62,75 @@ tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts( }; var objStrOrNum5: { prop: string; anotherP: string; } | { prop: number } = { prop: strOrNumber }; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: string | number; }' is not assignable to type '{ prop: string; anotherP: string; } | { prop: number; }'. -!!! error TS2322: Type '{ prop: string | number; }' is not assignable to type '{ prop: number; }'. +!!! error TS2322: Type '{ {|prop|0|}: string | number; }' is not assignable to type '{ {|prop|1|}: string; {|anotherP|2|}: string; } | { {|prop|3|}: number; }'. +!!! error TS2322: Type '{ {|prop|4|}: string | number; }' is not assignable to type '{ {|prop|5|}: number; }'. !!! error TS2322: Types of property 'prop' are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:20:78 +!!! annotated symbol 1 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:20:21 +!!! annotated symbol 2 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:20:35 +!!! annotated symbol 3 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:20:59 +!!! annotated symbol 4 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:20:78 +!!! annotated symbol 5 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:20:59 var objStrOrNum6: { prop: string; anotherP: string; } | { prop: number } = { ~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: string | number; anotherP: string; }' is not assignable to type '{ prop: string; anotherP: string; } | { prop: number; }'. -!!! error TS2322: Type '{ prop: string | number; anotherP: string; }' is not assignable to type '{ prop: string; anotherP: string; }'. +!!! error TS2322: Type '{ {|prop|0|}: string | number; {|anotherP|1|}: string; }' is not assignable to type '{ {|prop|2|}: string; {|anotherP|3|}: string; } | { {|prop|4|}: number; }'. +!!! error TS2322: Type '{ {|prop|5|}: string | number; {|anotherP|6|}: string; }' is not assignable to type '{ {|prop|7|}: string; {|anotherP|8|}: string; }'. !!! error TS2322: Types of property 'prop' are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'string'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:22:5 +!!! annotated symbol 1 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:23:5 +!!! annotated symbol 2 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:21:21 +!!! annotated symbol 3 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:21:35 +!!! annotated symbol 4 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:21:59 +!!! annotated symbol 5 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:22:5 +!!! annotated symbol 6 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:23:5 +!!! annotated symbol 7 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:21:21 +!!! annotated symbol 8 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:21:35 prop: strOrNumber, anotherP: str }; var objStrOrNum7: { prop: string; anotherP: string; } | { prop: number; anotherP1: number } = { ~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: string | number; anotherP: string; }' is not assignable to type '{ prop: string; anotherP: string; } | { prop: number; anotherP1: number; }'. -!!! error TS2322: Type '{ prop: string | number; anotherP: string; }' is not assignable to type '{ prop: string; anotherP: string; }'. +!!! error TS2322: Type '{ {|prop|0|}: string | number; {|anotherP|1|}: string; }' is not assignable to type '{ {|prop|2|}: string; {|anotherP|3|}: string; } | { {|prop|4|}: number; {|anotherP1|5|}: number; }'. +!!! error TS2322: Type '{ {|prop|6|}: string | number; {|anotherP|7|}: string; }' is not assignable to type '{ {|prop|8|}: string; {|anotherP|9|}: string; }'. !!! error TS2322: Types of property 'prop' are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'string'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:26:5 +!!! annotated symbol 1 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:27:5 +!!! annotated symbol 2 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:25:21 +!!! annotated symbol 3 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:25:35 +!!! annotated symbol 4 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:25:59 +!!! annotated symbol 5 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:25:73 +!!! annotated symbol 6 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:26:5 +!!! annotated symbol 7 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:27:5 +!!! annotated symbol 8 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:25:21 +!!! annotated symbol 9 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:25:35 prop: strOrNumber, anotherP: str }; var objStrOrNum8: { prop: string; anotherP: string; } | { prop: number; anotherP1: number } = { ~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: string | number; anotherP: string; anotherP1: number; }' is not assignable to type '{ prop: string; anotherP: string; } | { prop: number; anotherP1: number; }'. -!!! error TS2322: Type '{ prop: string | number; anotherP: string; anotherP1: number; }' is not assignable to type '{ prop: number; anotherP1: number; }'. +!!! error TS2322: Type '{ {|prop|0|}: string | number; {|anotherP|1|}: string; {|anotherP1|2|}: number; }' is not assignable to type '{ {|prop|3|}: string; {|anotherP|4|}: string; } | { {|prop|5|}: number; {|anotherP1|6|}: number; }'. +!!! error TS2322: Type '{ {|prop|7|}: string | number; {|anotherP|8|}: string; {|anotherP1|9|}: number; }' is not assignable to type '{ {|prop|10|}: number; {|anotherP1|11|}: number; }'. !!! error TS2322: Types of property 'prop' are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:30:5 +!!! annotated symbol 1 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:31:5 +!!! annotated symbol 2 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:32:5 +!!! annotated symbol 3 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:29:21 +!!! annotated symbol 4 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:29:35 +!!! annotated symbol 5 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:29:59 +!!! annotated symbol 6 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:29:73 +!!! annotated symbol 7 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:30:5 +!!! annotated symbol 8 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:31:5 +!!! annotated symbol 9 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:32:5 +!!! annotated symbol 10 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:29:59 +!!! annotated symbol 11 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:29:73 prop: strOrNumber, anotherP: str, anotherP1: num diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index b579ff5ca0811..c15bafc699b38 100644 --- a/tests/baselines/reference/contextualTyping.errors.txt +++ b/tests/baselines/reference/contextualTyping.errors.txt @@ -229,6 +229,7 @@ tests/cases/compiler/contextualTyping.ts(223,5): error TS2741: Property 'x' is m interface B extends A { } var x: B = { }; ~ -!!! error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. +!!! error TS2741: Property 'x' is missing in type '{}' but required in type '{|B|0|}'. !!! related TS2728 tests/cases/compiler/contextualTyping.ts:221:15: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping.ts:222:11 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping11.errors.txt b/tests/baselines/reference/contextualTyping11.errors.txt index 50215ac59221c..17b6df4272355 100644 --- a/tests/baselines/reference/contextualTyping11.errors.txt +++ b/tests/baselines/reference/contextualTyping11.errors.txt @@ -4,5 +4,7 @@ tests/cases/compiler/contextualTyping11.ts(1,42): error TS2741: Property 'id' is ==== tests/cases/compiler/contextualTyping11.ts (1 errors) ==== class foo { public bar:{id:number;}[] = [({})]; } ~~~~~~~~~ -!!! error TS2741: Property 'id' is missing in type 'foo' but required in type '{ id: number; }'. -!!! related TS2728 tests/cases/compiler/contextualTyping11.ts:1:25: 'id' is declared here. \ No newline at end of file +!!! error TS2741: Property 'id' is missing in type '{|foo|0|}' but required in type '{ {|id|1|}: number; }'. +!!! related TS2728 tests/cases/compiler/contextualTyping11.ts:1:25: 'id' is declared here. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping11.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping11.ts:1:25 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping12.errors.txt b/tests/baselines/reference/contextualTyping12.errors.txt index 3a2225b6817d0..d1387a9bf9e50 100644 --- a/tests/baselines/reference/contextualTyping12.errors.txt +++ b/tests/baselines/reference/contextualTyping12.errors.txt @@ -5,5 +5,8 @@ tests/cases/compiler/contextualTyping12.ts(1,57): error TS2322: Type '{ id: numb ==== tests/cases/compiler/contextualTyping12.ts (1 errors) ==== class foo { public bar:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; } ~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping12.ts:1:51 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping12.ts:1:57 +!!! annotated symbol 2 tests/cases/compiler/contextualTyping12.ts:1:25 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping17.errors.txt b/tests/baselines/reference/contextualTyping17.errors.txt index b6375c9c9c954..ffd2ec7dfab6a 100644 --- a/tests/baselines/reference/contextualTyping17.errors.txt +++ b/tests/baselines/reference/contextualTyping17.errors.txt @@ -5,5 +5,8 @@ tests/cases/compiler/contextualTyping17.ts(1,47): error TS2322: Type '{ id: numb ==== tests/cases/compiler/contextualTyping17.ts (1 errors) ==== var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; ~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping17.ts:1:40 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping17.ts:1:47 +!!! annotated symbol 2 tests/cases/compiler/contextualTyping17.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping2.errors.txt b/tests/baselines/reference/contextualTyping2.errors.txt index 1daa4a2a71f0d..bcc0bc1ffa4ed 100644 --- a/tests/baselines/reference/contextualTyping2.errors.txt +++ b/tests/baselines/reference/contextualTyping2.errors.txt @@ -5,5 +5,8 @@ tests/cases/compiler/contextualTyping2.ts(1,32): error TS2322: Type '{ id: numbe ==== tests/cases/compiler/contextualTyping2.ts (1 errors) ==== var foo: {id:number;} = {id:4, name:"foo"}; ~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping2.ts:1:26 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping2.ts:1:32 +!!! annotated symbol 2 tests/cases/compiler/contextualTyping2.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping20.errors.txt b/tests/baselines/reference/contextualTyping20.errors.txt index 968fb8f2dc1e3..a3809403b28a1 100644 --- a/tests/baselines/reference/contextualTyping20.errors.txt +++ b/tests/baselines/reference/contextualTyping20.errors.txt @@ -5,5 +5,8 @@ tests/cases/compiler/contextualTyping20.ts(1,58): error TS2322: Type '{ id: numb ==== tests/cases/compiler/contextualTyping20.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2, name:"foo"}]; ~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping20.ts:1:52 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping20.ts:1:58 +!!! annotated symbol 2 tests/cases/compiler/contextualTyping20.ts:1:10 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping21.errors.txt b/tests/baselines/reference/contextualTyping21.errors.txt index 85fbf26236cfa..ef2655597b647 100644 --- a/tests/baselines/reference/contextualTyping21.errors.txt +++ b/tests/baselines/reference/contextualTyping21.errors.txt @@ -4,4 +4,5 @@ tests/cases/compiler/contextualTyping21.ts(1,51): error TS2322: Type 'number' is ==== tests/cases/compiler/contextualTyping21.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; ~ -!!! error TS2322: Type 'number' is not assignable to type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type '{ {|id|0|}: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping21.ts:1:10 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping4.errors.txt b/tests/baselines/reference/contextualTyping4.errors.txt index c472e7ccb18d0..6e7cb5899cdb4 100644 --- a/tests/baselines/reference/contextualTyping4.errors.txt +++ b/tests/baselines/reference/contextualTyping4.errors.txt @@ -5,5 +5,8 @@ tests/cases/compiler/contextualTyping4.ts(1,46): error TS2322: Type '{ id: numbe ==== tests/cases/compiler/contextualTyping4.ts (1 errors) ==== class foo { public bar:{id:number;} = {id:5, name:"foo"}; } ~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping4.ts:1:40 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping4.ts:1:46 +!!! annotated symbol 2 tests/cases/compiler/contextualTyping4.ts:1:25 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping5.errors.txt b/tests/baselines/reference/contextualTyping5.errors.txt index 9b97259f9efe6..7c6f22552a9e3 100644 --- a/tests/baselines/reference/contextualTyping5.errors.txt +++ b/tests/baselines/reference/contextualTyping5.errors.txt @@ -4,5 +4,6 @@ tests/cases/compiler/contextualTyping5.ts(1,20): error TS2741: Property 'id' is ==== tests/cases/compiler/contextualTyping5.ts (1 errors) ==== class foo { public bar:{id:number;} = { }; } ~~~ -!!! error TS2741: Property 'id' is missing in type '{}' but required in type '{ id: number; }'. -!!! related TS2728 tests/cases/compiler/contextualTyping5.ts:1:25: 'id' is declared here. \ No newline at end of file +!!! error TS2741: Property 'id' is missing in type '{}' but required in type '{ {|id|0|}: number; }'. +!!! related TS2728 tests/cases/compiler/contextualTyping5.ts:1:25: 'id' is declared here. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping5.ts:1:25 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping9.errors.txt b/tests/baselines/reference/contextualTyping9.errors.txt index 05b7df1d0652c..ff2e166200ba9 100644 --- a/tests/baselines/reference/contextualTyping9.errors.txt +++ b/tests/baselines/reference/contextualTyping9.errors.txt @@ -5,5 +5,8 @@ tests/cases/compiler/contextualTyping9.ts(1,42): error TS2322: Type '{ id: numbe ==== tests/cases/compiler/contextualTyping9.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; ~~~~~~~~~~ -!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not assignable to type '{ {|id|2|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. +!!! annotated symbol 0 tests/cases/compiler/contextualTyping9.ts:1:36 +!!! annotated symbol 1 tests/cases/compiler/contextualTyping9.ts:1:42 +!!! annotated symbol 2 tests/cases/compiler/contextualTyping9.ts:1:10 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt index 4d0bf165891ef..ce6cd44798130 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt @@ -8,8 +8,9 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,26): error TS2322: Ty var x3: I = [new Date(), 1]; ~ -!!! error TS2322: Type 'number' is not assignable to type 'Date'. +!!! error TS2322: Type 'number' is not assignable to type '{|Date|0|}'. !!! related TS6501 tests/cases/compiler/contextualTypingOfArrayLiterals1.ts:2:4: The expected type comes from this index signature. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 var r2 = x3[1]; r2.getDate(); \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt index 4f2adf9921ef3..7b99fc89877a0 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt @@ -17,8 +17,12 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; ~~ -!!! error TS2322: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'. -!!! error TS2322: Type '(b: number) => void' is not assignable to type '(a: A) => void'. +!!! error TS2322: Type '((a: {|C|0|}) => number) | ((b: number) => void)' is not assignable to type '(a: {|A|1|}) => void'. +!!! error TS2322: Type '(b: number) => void' is not assignable to type '(a: {|A|2|}) => void'. !!! error TS2322: Types of parameters 'b' and 'a' are incompatible. -!!! error TS2322: Type 'A' is not assignable to type 'number'. +!!! error TS2322: Type '{|A|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/contextualTypingOfConditionalExpression2.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/contextualTypingOfConditionalExpression2.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/contextualTypingOfConditionalExpression2.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/contextualTypingOfConditionalExpression2.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt index c7b15e8efefec..6be8b4b34921a 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt @@ -22,10 +22,14 @@ tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32): var f = (x: number) => { return x.toFixed() }; var r5 = _.forEach(c2, f); ~ -!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. -!!! error TS2345: Type 'string' is not assignable to type 'Date'. +!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => {|Date|0|}'. +!!! error TS2345: Type 'string' is not assignable to type '{|Date|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 var r6 = _.forEach(c2, (x) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. -!!! error TS2345: Type 'string' is not assignable to type 'Date'. +!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => {|Date|0|}'. +!!! error TS2345: Type 'string' is not assignable to type '{|Date|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt index 747bbb9db8eed..91dbf2f349512 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt @@ -41,30 +41,54 @@ tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,13): err const b0 = {console.log(k)}}} extra />; // k has type "left" | "right" ~~~~~~~~~~ -!!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2322: Type '{ {|extra|0|}: true; {|onClick|1|}: (k: "left" | "right") => void; }' is not assignable to type '{|IntrinsicAttributes|2|} & {|LinkProps|3|}'. !!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:27:64 +!!! annotated symbol 1 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:27:29 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:12:18 const b2 = {console.log(k)}} extra />; // k has type "left" | "right" ~~~~~~~~~~ -!!! error TS2322: Type '{ onClick: (k: any) => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2322: Type '{ {|onClick|0|}: (k: any) => void; {|extra|1|}: true; }' is not assignable to type '{|IntrinsicAttributes|2|} & {|LinkProps|3|}'. !!! error TS2322: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:28:24 +!!! annotated symbol 1 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:28:56 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:12:18 const b3 = ; // goTo has type"home" | "contact" ~~~~~~~~~~ -!!! error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2322: Type '{ {|extra|0|}: true; {|goTo|1|}: "home"; }' is not assignable to type '{|IntrinsicAttributes|2|} & {|LinkProps|3|}'. !!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:29:43 +!!! annotated symbol 1 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:29:29 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:12:18 const b4 = ; // goTo has type "home" | "contact" ~~~~~~~~~~ -!!! error TS2322: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2322: Type '{ {|goTo|0|}: "home"; {|extra|1|}: true; }' is not assignable to type '{|IntrinsicAttributes|2|} & {|LinkProps|3|}'. !!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:30:24 +!!! annotated symbol 1 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:30:36 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:12:18 export function NoOverload(buttonProps: ButtonProps): JSX.Element { return undefined } const c1 = {console.log(k)}}} extra />; // k has type any ~~~~~~~~~~ -!!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2322: Type '{ {|extra|0|}: true; {|onClick|1|}: (k: "left" | "right") => void; }' is not assignable to type '{|IntrinsicAttributes|2|} & {|ButtonProps|3|}'. !!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:33:65 +!!! annotated symbol 1 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:33:30 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:8:18 export function NoOverload1(linkProps: LinkProps): JSX.Element { return undefined } const d1 = ; // goTo has type "home" | "contact" ~~~~~~~~~~~ -!!! error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2322: Type '{ {|extra|0|}: true; {|goTo|1|}: "home"; }' is not assignable to type '{|IntrinsicAttributes|2|} & {|LinkProps|3|}'. !!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:36:44 +!!! annotated symbol 1 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:36:30 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:12:18 \ No newline at end of file diff --git a/tests/baselines/reference/covariantCallbacks.errors.txt b/tests/baselines/reference/covariantCallbacks.errors.txt index 9ee5a9e2fedae..97c9a9da3f27e 100644 --- a/tests/baselines/reference/covariantCallbacks.errors.txt +++ b/tests/baselines/reference/covariantCallbacks.errors.txt @@ -39,17 +39,29 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covarian a = b; b = a; // Error ~ -!!! error TS2322: Type 'P' is not assignable to type 'P'. -!!! error TS2322: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2322: Type '{|P|0|}<{|A|1|}>' is not assignable to type '{|P|2|}<{|B|3|}>'. +!!! error TS2322: Property 'b' is missing in type '{|A|4|}' but required in type '{|B|5|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:25: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 } function f2(a: Promise, b: Promise) { a = b; b = a; // Error ~ -!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|Promise|0|}<{|A|1|}>' is not assignable to type '{|Promise|2|}<{|B|3|}>'. +!!! error TS2322: Type '{|A|4|}' is not assignable to type '{|B|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 } interface AList1 { @@ -64,12 +76,18 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covarian a = b; b = a; // Error ~ -!!! error TS2322: Type 'AList1' is not assignable to type 'BList1'. +!!! error TS2322: Type '{|AList1|0|}' is not assignable to type '{|BList1|1|}'. !!! error TS2322: Types of property 'forEach' are incompatible. -!!! error TS2322: Type '(cb: (item: A) => void) => void' is not assignable to type '(cb: (item: B) => void) => void'. +!!! error TS2322: Type '(cb: (item: {|A|2|}) => void) => void' is not assignable to type '(cb: (item: {|B|3|}) => void) => void'. !!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|A|4|}' is not assignable to type '{|B|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:20:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:24:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 } interface AList2 { @@ -84,11 +102,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covarian a = b; b = a; // Error ~ -!!! error TS2322: Type 'AList2' is not assignable to type 'BList2'. +!!! error TS2322: Type '{|AList2|0|}' is not assignable to type '{|BList2|1|}'. !!! error TS2322: Types of property 'forEach' are incompatible. -!!! error TS2322: Type '(cb: (item: A) => boolean) => void' is not assignable to type '(cb: (item: A) => void) => void'. +!!! error TS2322: Type '(cb: (item: {|A|2|}) => boolean) => void' is not assignable to type '(cb: (item: {|A|3|}) => void) => void'. !!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. !!! error TS2322: Type 'void' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:33:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:37:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 } interface AList3 { @@ -103,10 +125,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covarian a = b; b = a; // Error ~ -!!! error TS2322: Type 'AList3' is not assignable to type 'BList3'. +!!! error TS2322: Type '{|AList3|0|}' is not assignable to type '{|BList3|1|}'. !!! error TS2322: Types of property 'forEach' are incompatible. -!!! error TS2322: Type '(cb: (item: A) => void) => void' is not assignable to type '(cb: (item: A, context: any) => void) => void'. +!!! error TS2322: Type '(cb: (item: {|A|2|}) => void) => void' is not assignable to type '(cb: (item: {|A|3|}, context: any) => void) => void'. !!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:46:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:50:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 } interface AList4 { @@ -121,11 +147,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covarian a = b; b = a; // Error ~ -!!! error TS2322: Type 'AList4' is not assignable to type 'BList4'. +!!! error TS2322: Type '{|AList4|0|}' is not assignable to type '{|BList4|1|}'. !!! error TS2322: Types of property 'forEach' are incompatible. -!!! error TS2322: Type '(cb: (item: A) => A) => void' is not assignable to type '(cb: (item: B) => B) => void'. +!!! error TS2322: Type '(cb: (item: {|A|2|}) => {|A|3|}) => void' is not assignable to type '(cb: (item: {|B|4|}) => {|B|5|}) => void'. !!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|A|6|}' is not assignable to type '{|B|7|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:59:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:63:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:7:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/covariantCallbacks.ts:8:11 } \ No newline at end of file diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index 2fd1cc7e831c3..85962c7782da7 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt @@ -12,6 +12,8 @@ tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): e } var a: D = foo("hi", []); ~ -!!! error TS2741: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo' but required in type 'D'. +!!! error TS2741: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof {|foo|0|}' but required in type '{|D|1|}'. !!! related TS2728 tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts:2:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts:5:10 +!!! annotated symbol 1 tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts:4:7 \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.errors.txt b/tests/baselines/reference/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.errors.txt index 87fe273fb60b5..bc1b706a7e771 100644 --- a/tests/baselines/reference/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.errors.txt +++ b/tests/baselines/reference/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.errors.txt @@ -18,8 +18,10 @@ tests/cases/compiler/c.ts(4,14): error TS2415: Class 'D' incorrectly extends bas export class D extends C { ~ -!!! error TS2415: Class 'D' incorrectly extends base class 'C'. +!!! error TS2415: Class '{|D|0|}' incorrectly extends base class '{|C|1|}'. !!! error TS2415: Types have separate declarations of a private property '[x]'. +!!! annotated symbol 0 tests/cases/compiler/c.ts:4:14 +!!! annotated symbol 1 tests/cases/compiler/b.ts:3:14 private [x]: 12 = 12; } \ No newline at end of file diff --git a/tests/baselines/reference/declarationsAndAssignments.errors.txt b/tests/baselines/reference/declarationsAndAssignments.errors.txt index 312a0ed626c1b..3705d8dee0cef 100644 --- a/tests/baselines/reference/declarationsAndAssignments.errors.txt +++ b/tests/baselines/reference/declarationsAndAssignments.errors.txt @@ -168,7 +168,10 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9): f14([2, ["abc", { x: 0 }]]); f14([2, ["abc", { y: false }]]); // Error, no x ~~~~~~~~~~~~ -!!! error TS2741: Property 'x' is missing in type '{ y: boolean; }' but required in type '{ x: any; y?: boolean; }'. +!!! error TS2741: Property 'x' is missing in type '{ {|y|0|}: boolean; }' but required in type '{ {|x|1|}: any; {|y|2|}?: boolean; }'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts:106:19 +!!! annotated dropped!: 1 +!!! annotated dropped!: 2 module M { export var [a, b] = [1, 2]; diff --git a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt index d6944e0e033f6..072f3159d5e41 100644 --- a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt +++ b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt @@ -9,8 +9,10 @@ tests/cases/compiler/declareClassInterfaceImplementation.ts(5,15): error TS2420: declare class Buffer implements IBuffer { ~~~~~~ -!!! error TS2420: Class 'Buffer' incorrectly implements interface 'IBuffer'. +!!! error TS2420: Class '{|Buffer|0|}' incorrectly implements interface '{|IBuffer|1|}'. !!! error TS2420: Index signature is missing in type 'Buffer'. +!!! annotated symbol 0 tests/cases/compiler/declareClassInterfaceImplementation.ts:5:15 +!!! annotated symbol 1 tests/cases/compiler/declareClassInterfaceImplementation.ts:1:11 } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorCallGeneric.errors.txt b/tests/baselines/reference/decoratorCallGeneric.errors.txt index c2e4042743ec8..0b2081db678dd 100644 --- a/tests/baselines/reference/decoratorCallGeneric.errors.txt +++ b/tests/baselines/reference/decoratorCallGeneric.errors.txt @@ -13,10 +13,15 @@ tests/cases/conformance/decorators/decoratorCallGeneric.ts(7,2): error TS2345: A @dec ~~~ -!!! error TS2345: Argument of type 'typeof C' is not assignable to parameter of type 'I'. +!!! error TS2345: Argument of type 'typeof {|C|0|}' is not assignable to parameter of type '{|I|1|}<{|C|2|}>'. !!! error TS2345: Types of property 'm' are incompatible. -!!! error TS2345: Type '() => void' is not assignable to type '() => C'. -!!! error TS2345: Type 'void' is not assignable to type 'C'. +!!! error TS2345: Type '() => void' is not assignable to type '() => {|C|3|}'. +!!! error TS2345: Type 'void' is not assignable to type '{|C|4|}'. +!!! annotated symbol 0 tests/cases/conformance/decorators/decoratorCallGeneric.ts:8:7 +!!! annotated symbol 1 tests/cases/conformance/decorators/decoratorCallGeneric.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/decorators/decoratorCallGeneric.ts:8:7 +!!! annotated symbol 3 tests/cases/conformance/decorators/decoratorCallGeneric.ts:8:7 +!!! annotated symbol 4 tests/cases/conformance/decorators/decoratorCallGeneric.ts:8:7 class C { _brand: any; static m() {} diff --git a/tests/baselines/reference/decoratorOnClassMethod10.errors.txt b/tests/baselines/reference/decoratorOnClassMethod10.errors.txt index 49c45b4a6f9fc..153f44911b68e 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.errors.txt +++ b/tests/baselines/reference/decoratorOnClassMethod10.errors.txt @@ -8,6 +8,8 @@ tests/cases/conformance/decorators/class/method/decoratorOnClassMethod10.ts(4,6) class C { @dec method() {} ~~~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'Function'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type '{|Function|1|}'. !!! error TS2345: Type 'C' is missing the following properties from type 'Function': apply, call, bind, prototype, and 3 more. +!!! annotated symbol 0 tests/cases/conformance/decorators/class/method/decoratorOnClassMethod10.ts:3:7 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:272:11 } \ No newline at end of file diff --git a/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt b/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt index 6a83638ba9076..18a4bd898aaf6 100644 --- a/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt +++ b/tests/baselines/reference/deepExcessPropertyCheckingWhenTargetIsIntersection.errors.txt @@ -30,9 +30,12 @@ tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts(27,34 TestComponent({icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } }}); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. +!!! error TS2322: Type '{ {|INVALID_PROP_NAME|0|}: string; {|ariaLabel|1|}: string; }' is not assignable to type '{|ITestProps|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. !!! related TS6500 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:14:3: The expected type comes from property 'props' which is declared here on type 'NestedProp' +!!! annotated symbol 0 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:21:33 +!!! annotated symbol 1 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:21:61 +!!! annotated symbol 2 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:9:11 const TestComponent2: StatelessComponent = (props) => { return null; @@ -41,8 +44,16 @@ tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts(27,34 TestComponent2({icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } }}); ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2326: Types of property 'icon' are incompatible. -!!! error TS2326: Type '{ props: { INVALID_PROP_NAME: string; ariaLabel: string; }; }' is not assignable to type 'NestedProp'. +!!! error TS2326: Type '{ {|props|0|}: { {|INVALID_PROP_NAME|1|}: string; {|ariaLabel|2|}: string; }; }' is not assignable to type '{|NestedProp|3|}<{|ITestProps|4|}>'. !!! error TS2326: Types of property 'props' are incompatible. -!!! error TS2326: Type '{ INVALID_PROP_NAME: string; ariaLabel: string; }' is not assignable to type 'ITestProps'. +!!! error TS2326: Type '{ {|INVALID_PROP_NAME|5|}: string; {|ariaLabel|6|}: string; }' is not assignable to type '{|ITestProps|7|}'. !!! error TS2326: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'ITestProps'. +!!! annotated symbol 0 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:27:25 +!!! annotated symbol 1 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:27:34 +!!! annotated symbol 2 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:27:62 +!!! annotated symbol 3 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:13:11 +!!! annotated symbol 4 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:27:34 +!!! annotated symbol 6 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:27:62 +!!! annotated symbol 7 tests/cases/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.ts:9:11 \ No newline at end of file diff --git a/tests/baselines/reference/deepReadonlyAssignabilityError.errors.txt b/tests/baselines/reference/deepReadonlyAssignabilityError.errors.txt new file mode 100644 index 0000000000000..8df8e15f2c0f5 --- /dev/null +++ b/tests/baselines/reference/deepReadonlyAssignabilityError.errors.txt @@ -0,0 +1,30 @@ +tests/cases/compiler/deepReadonlyAssignabilityError.ts(14,9): error TS2741: Property 'z' is missing in type '{}' but required in type '{ z: { a: any; }; }'. + + +==== tests/cases/compiler/deepReadonlyAssignabilityError.ts (1 errors) ==== + type DeepReadonly = { + readonly [K in keyof T]: DeepReadonly; + } + + declare function f2(x: DeepReadonly): (x: T) => void; + + /** + * This produces a function whose argument type is a deeply recursive reverse mapped type + */ + const result = f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }); + + result({ + x: { + y: { + ~ +!!! error TS2741: Property 'z' is missing in type '{}' but required in type '{ {|z|0|}: { {|a|1|}: {|any|2|}; }; }'. +!!! related TS2728 tests/cases/compiler/deepReadonlyAssignabilityError.ts:10:31: 'z' is declared here. +!!! related TS6500 tests/cases/compiler/deepReadonlyAssignabilityError.ts:10:26: The expected type comes from property 'y' which is declared here on type '{ y: { z: any; }; }' +!!! annotated symbol 0 tests/cases/compiler/deepReadonlyAssignabilityError.ts:10:31 +!!! annotated symbol 1 tests/cases/compiler/deepReadonlyAssignabilityError.ts:10:36 +!!! annotated reveal 2: { b: any; } + + } + } + }); + \ No newline at end of file diff --git a/tests/baselines/reference/deepReadonlyAssignabilityError.js b/tests/baselines/reference/deepReadonlyAssignabilityError.js new file mode 100644 index 0000000000000..85d64c62fd447 --- /dev/null +++ b/tests/baselines/reference/deepReadonlyAssignabilityError.js @@ -0,0 +1,31 @@ +//// [deepReadonlyAssignabilityError.ts] +type DeepReadonly = { + readonly [K in keyof T]: DeepReadonly; +} + +declare function f2(x: DeepReadonly): (x: T) => void; + +/** + * This produces a function whose argument type is a deeply recursive reverse mapped type + */ +const result = f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }); + +result({ + x: { + y: { + + } + } +}); + + +//// [deepReadonlyAssignabilityError.js] +/** + * This produces a function whose argument type is a deeply recursive reverse mapped type + */ +var result = f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }); +result({ + x: { + y: {} + } +}); diff --git a/tests/baselines/reference/deepReadonlyAssignabilityError.symbols b/tests/baselines/reference/deepReadonlyAssignabilityError.symbols new file mode 100644 index 0000000000000..eb4ecb9025a9f --- /dev/null +++ b/tests/baselines/reference/deepReadonlyAssignabilityError.symbols @@ -0,0 +1,48 @@ +=== tests/cases/compiler/deepReadonlyAssignabilityError.ts === +type DeepReadonly = { +>DeepReadonly : Symbol(DeepReadonly, Decl(deepReadonlyAssignabilityError.ts, 0, 0)) +>T : Symbol(T, Decl(deepReadonlyAssignabilityError.ts, 0, 18)) + + readonly [K in keyof T]: DeepReadonly; +>K : Symbol(K, Decl(deepReadonlyAssignabilityError.ts, 1, 14)) +>T : Symbol(T, Decl(deepReadonlyAssignabilityError.ts, 0, 18)) +>DeepReadonly : Symbol(DeepReadonly, Decl(deepReadonlyAssignabilityError.ts, 0, 0)) +>T : Symbol(T, Decl(deepReadonlyAssignabilityError.ts, 0, 18)) +>K : Symbol(K, Decl(deepReadonlyAssignabilityError.ts, 1, 14)) +} + +declare function f2(x: DeepReadonly): (x: T) => void; +>f2 : Symbol(f2, Decl(deepReadonlyAssignabilityError.ts, 2, 1)) +>T : Symbol(T, Decl(deepReadonlyAssignabilityError.ts, 4, 20)) +>x : Symbol(x, Decl(deepReadonlyAssignabilityError.ts, 4, 23)) +>DeepReadonly : Symbol(DeepReadonly, Decl(deepReadonlyAssignabilityError.ts, 0, 0)) +>T : Symbol(T, Decl(deepReadonlyAssignabilityError.ts, 4, 20)) +>x : Symbol(x, Decl(deepReadonlyAssignabilityError.ts, 4, 45)) +>T : Symbol(T, Decl(deepReadonlyAssignabilityError.ts, 4, 20)) + +/** + * This produces a function whose argument type is a deeply recursive reverse mapped type + */ +const result = f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }); +>result : Symbol(result, Decl(deepReadonlyAssignabilityError.ts, 9, 5)) +>f2 : Symbol(f2, Decl(deepReadonlyAssignabilityError.ts, 2, 1)) +>x : Symbol(x, Decl(deepReadonlyAssignabilityError.ts, 9, 19)) +>y : Symbol(y, Decl(deepReadonlyAssignabilityError.ts, 9, 24)) +>z : Symbol(z, Decl(deepReadonlyAssignabilityError.ts, 9, 29)) +>a : Symbol(a, Decl(deepReadonlyAssignabilityError.ts, 9, 34)) +>b : Symbol(b, Decl(deepReadonlyAssignabilityError.ts, 9, 39)) +>c : Symbol(c, Decl(deepReadonlyAssignabilityError.ts, 9, 44)) + +result({ +>result : Symbol(result, Decl(deepReadonlyAssignabilityError.ts, 9, 5)) + + x: { +>x : Symbol(x, Decl(deepReadonlyAssignabilityError.ts, 11, 8)) + + y: { +>y : Symbol(y, Decl(deepReadonlyAssignabilityError.ts, 12, 8)) + + } + } +}); + diff --git a/tests/baselines/reference/deepReadonlyAssignabilityError.types b/tests/baselines/reference/deepReadonlyAssignabilityError.types new file mode 100644 index 0000000000000..06b71bfb827d7 --- /dev/null +++ b/tests/baselines/reference/deepReadonlyAssignabilityError.types @@ -0,0 +1,50 @@ +=== tests/cases/compiler/deepReadonlyAssignabilityError.ts === +type DeepReadonly = { +>DeepReadonly : DeepReadonly + + readonly [K in keyof T]: DeepReadonly; +} + +declare function f2(x: DeepReadonly): (x: T) => void; +>f2 : (x: DeepReadonly) => (x: T) => void +>x : DeepReadonly +>x : T + +/** + * This produces a function whose argument type is a deeply recursive reverse mapped type + */ +const result = f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }); +>result : (x: { x: { y: any; }; }) => void +>f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }) : (x: { x: { y: any; }; }) => void +>f2 : (x: DeepReadonly) => (x: T) => void +>{ x: { y: { z: { a: { b: { c: 12 } } } } } } : { x: { y: { z: { a: { b: { c: number; }; }; }; }; }; } +>x : { y: { z: { a: { b: { c: number; }; }; }; }; } +>{ y: { z: { a: { b: { c: 12 } } } } } : { y: { z: { a: { b: { c: number; }; }; }; }; } +>y : { z: { a: { b: { c: number; }; }; }; } +>{ z: { a: { b: { c: 12 } } } } : { z: { a: { b: { c: number; }; }; }; } +>z : { a: { b: { c: number; }; }; } +>{ a: { b: { c: 12 } } } : { a: { b: { c: number; }; }; } +>a : { b: { c: number; }; } +>{ b: { c: 12 } } : { b: { c: number; }; } +>b : { c: number; } +>{ c: 12 } : { c: number; } +>c : number +>12 : 12 + +result({ +>result({ x: { y: { } }}) : void +>result : (x: { x: { y: any; }; }) => void +>{ x: { y: { } }} : { x: { y: {}; }; } + + x: { +>x : { y: {}; } +>{ y: { } } : { y: {}; } + + y: { +>y : {} +>{ } : {} + + } + } +}); + diff --git a/tests/baselines/reference/deeplyNestedAssignabilityIssue.errors.txt b/tests/baselines/reference/deeplyNestedAssignabilityIssue.errors.txt index 493e746bc944a..1f303bb863567 100644 --- a/tests/baselines/reference/deeplyNestedAssignabilityIssue.errors.txt +++ b/tests/baselines/reference/deeplyNestedAssignabilityIssue.errors.txt @@ -50,16 +50,18 @@ more: { thing: {} ~~~~~ -!!! error TS2741: Property 'a' is missing in type '{}' but required in type 'A'. +!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{|A|0|}'. !!! related TS2728 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:2:5: 'a' is declared here. !!! related TS6500 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:9:17: The expected type comes from property 'thing' which is declared here on type '{ thing: A; }' +!!! annotated symbol 0 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:1:11 }, yetstill: { another: {} ~~~~~~~ -!!! error TS2741: Property 'a' is missing in type '{}' but required in type 'A'. +!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{|A|0|}'. !!! related TS2728 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:2:5: 'a' is declared here. !!! related TS6500 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:12:17: The expected type comes from property 'another' which is declared here on type '{ another: A; }' +!!! annotated symbol 0 tests/cases/compiler/deeplyNestedAssignabilityIssue.ts:1:11 } } } diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt index dd5a75362d1cd..7d0ee01cfaf36 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt @@ -12,8 +12,10 @@ tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts(8,7): error TS2415 } class DerivedClass extends BaseClass { ~~~~~~~~~~~~ -!!! error TS2415: Class 'DerivedClass' incorrectly extends base class 'BaseClass'. +!!! error TS2415: Class '{|DerivedClass|0|}' incorrectly extends base class '{|BaseClass|1|}'. !!! error TS2415: Types have separate declarations of a private property '_init'. +!!! annotated symbol 0 tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts:8:7 +!!! annotated symbol 1 tests/cases/compiler/derivedClassOverridesPrivateFunction1.ts:1:7 constructor() { super(); } diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt index 400d7d0d346b5..dedafc7c5672b 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt @@ -11,8 +11,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve class Derived extends Base { ~~~~~~~ -!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts:1:7 private x: { foo: string; bar: string; }; // error } @@ -22,7 +24,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve class Derived2 extends Base2 { ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'. +!!! error TS2417: Class static side 'typeof {|Derived2|0|}' incorrectly extends base class static side 'typeof {|Base2|1|}'. !!! error TS2417: Types have separate declarations of a private property 'y'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPrivates.ts:9:7 private static y: { foo: string; bar: string; }; // error } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt index faf228e8d55c2..afadbe6db74a5 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.errors.txt @@ -44,80 +44,100 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve // decrease visibility of all public members to protected class Derived1 extends Base { ~~~~~~~~ -!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived1|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:22:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected a: typeof x; constructor(a: typeof x) { super(a); } } class Derived2 extends Base { ~~~~~~~~ -!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived2|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:27:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected b(a: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived3 extends Base { ~~~~~~~~ -!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived3|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:32:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected get c() { return x; } constructor(a: typeof x) { super(a); } } class Derived4 extends Base { ~~~~~~~~ -!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived4|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'c' is protected in type 'Derived4' but public in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:37:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected set c(v: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived5 extends Base { ~~~~~~~~ -!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived5|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'd' is protected in type 'Derived5' but public in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:42:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected d: (a: typeof x) => void ; constructor(a: typeof x) { super(a); } } class Derived6 extends Base { ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived6|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:47:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected static r: typeof x; constructor(a: typeof x) { super(a); } } class Derived7 extends Base { ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived7|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:52:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected static s(a: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived8 extends Base { ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived8|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:57:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected static get t() { return x; } constructor(a: typeof x) { super(a); } } class Derived9 extends Base { ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived9|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:62:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected static set t(v: typeof x) { } constructor(a: typeof x) { super(a); } } class Derived10 extends Base { ~~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived10|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:67:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts:4:7 protected static u: (a: typeof x) => void ; constructor(a: typeof x) { super(a); } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt index 064e2e8d43c2f..fc3bb10b8130c 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.errors.txt @@ -16,7 +16,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOve class Derived2 extends Derived1 { ~~~~~~~~ -!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Derived1'. +!!! error TS2415: Class '{|Derived2|0|}' incorrectly extends base class '{|Derived1|1|}'. !!! error TS2415: Property 'a' is protected in type 'Derived2' but public in type 'Derived1'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers4.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers4.ts:8:7 protected a: typeof x; // Error, parent was public } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity.errors.txt b/tests/baselines/reference/derivedClassTransitivity.errors.txt index 5be930fa5da43..128b0ff01830d 100644 --- a/tests/baselines/reference/derivedClassTransitivity.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity.errors.txt @@ -25,10 +25,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x?: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts:3:7 var r = c.foo(1); var r2 = e.foo(''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity2.errors.txt b/tests/baselines/reference/derivedClassTransitivity2.errors.txt index e5f09911f559c..552582e2c835d 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity2.errors.txt @@ -25,10 +25,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts:3:7 var r = c.foo(1, 1); var r2 = e.foo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity3.errors.txt b/tests/baselines/reference/derivedClassTransitivity3.errors.txt index b3e59a0bf4c71..7f0f88602c753 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity3.errors.txt @@ -25,10 +25,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts:3:7 var r = c.foo('', ''); var r2 = e.foo('', 1); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity4.errors.txt b/tests/baselines/reference/derivedClassTransitivity4.errors.txt index 06319b163170c..0e8e38141522d 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity4.errors.txt @@ -26,11 +26,13 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra var e: E; c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x?: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts:3:7 var r = c.foo(1); ~~~ !!! error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses. diff --git a/tests/baselines/reference/derivedClassWithAny.errors.txt b/tests/baselines/reference/derivedClassWithAny.errors.txt index aa91979706b51..8fafe9710092a 100644 --- a/tests/baselines/reference/derivedClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedClassWithAny.errors.txt @@ -80,8 +80,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit c = d; c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts:36:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts:1:7 var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt index 06742e3e7204b..883e80b761c04 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.errors.txt @@ -16,8 +16,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // error, not a subtype class Derived extends Base { ~~~~~~~ -!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'x' is private in type 'Derived' but not in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingProtectedInstance.ts:1:7 private x: string; private fn(): string { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt index 6aeb5a7ec23a7..b487da23738a1 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt @@ -32,8 +32,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // error, not a subtype class Derived extends Base { ~~~~~~~ -!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'x' is private in type 'Derived' but not in type 'Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts:1:7 private x: string; private fn(): string { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt index 2567c6e8ce0da..f52a72da2bbb7 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.errors.txt @@ -16,8 +16,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // should be error class Derived extends Base { ~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingProtectedStatic.ts:1:7 private static x: string; private static fn(): string { return ''; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt index 88ec9eb44a855..69314cd9687b3 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt @@ -29,8 +29,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit // should be error class Derived extends Base { ~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Class static side 'typeof {|Derived|0|}' incorrectly extends base class static side 'typeof {|Base|1|}'. !!! error TS2417: Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts:1:7 private static x: string; private static fn(): string { return ''; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index e63849e4aa887..5598c92570e9e 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -51,13 +51,19 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~ -!!! error TS2322: Type '""' is not assignable to type 'T'. -!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type '""' is not assignable to type '{|T|0|}'. +!!! error TS2322: '""' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint 'string'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:9 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:9 +!!! annotated symbol 2 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:9 foo(): T { return ''; // error ~~~~~~~~~~ -!!! error TS2322: Type '""' is not assignable to type 'T'. -!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type '""' is not assignable to type '{|T|0|}'. +!!! error TS2322: '""' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint 'string'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:9 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:9 +!!! annotated symbol 2 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:9 } } @@ -68,7 +74,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC c = d; c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:28:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts:1:7 var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt index ae8fbe2ff5d6c..b167fe8534d9a 100644 --- a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt +++ b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt @@ -16,9 +16,12 @@ tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2430: Inte interface D3SvgArea extends D3SvgPath { ~~~~~~~~~ -!!! error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'. +!!! error TS2430: Interface '{|D3SvgArea|0|}' incorrectly extends interface '{|D3SvgPath|1|}'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. +!!! error TS2430: Type '(x: (data: any, index?: number) => number) => {|D3SvgArea|2|}' is not assignable to type '() => (data: any, index?: number) => number'. +!!! annotated symbol 0 tests/cases/compiler/derivedInterfaceCallSignature.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/derivedInterfaceCallSignature.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/derivedInterfaceCallSignature.ts:11:11 x(x: (data: any, index?: number) => number): D3SvgArea; y(y: (data: any, index?: number) => number): D3SvgArea; y0(): (data: any, index?: number) => number; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt index 19bf8d1ff2284..46d46ade16b53 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt @@ -18,8 +18,11 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara var r = super.foo({ a: 1 }); // { a: number } var r2 = super.foo({ a: 1, b: 2 }); // { a: number } ~~~~ -!!! error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'. +!!! error TS2345: Argument of type '{ {|a|0|}: number; {|b|1|}: number; }' is not assignable to parameter of type '{ {|a|2|}: number; }'. !!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. +!!! annotated symbol 0 tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts:14:30 +!!! annotated symbol 1 tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts:14:36 +!!! annotated symbol 2 tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts:2:14 var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt index 71fe36660c496..0667430ae651d 100644 --- a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt +++ b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt @@ -29,9 +29,11 @@ tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2430: interface F extends E { ~ -!!! error TS2430: Interface 'F' incorrectly extends interface 'E'. +!!! error TS2430: Interface '{|F|0|}' incorrectly extends interface '{|E|1|}'. !!! error TS2430: Index signatures are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/derivedTypeIncompatibleSignatures.ts:21:11 +!!! annotated symbol 1 tests/cases/compiler/derivedTypeIncompatibleSignatures.ts:17:11 [a: string]: number; // Number is not a subtype of string. Should error. } @@ -41,8 +43,10 @@ tests/cases/compiler/derivedTypeIncompatibleSignatures.ts(29,11): error TS2430: interface H extends G { ~ -!!! error TS2430: Interface 'H' incorrectly extends interface 'G'. +!!! error TS2430: Interface '{|H|0|}' incorrectly extends interface '{|G|1|}'. !!! error TS2430: Index signatures are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/derivedTypeIncompatibleSignatures.ts:29:11 +!!! annotated symbol 1 tests/cases/compiler/derivedTypeIncompatibleSignatures.ts:25:11 [a: number]: number; // Should error for the same reason } \ No newline at end of file diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment3.errors.txt b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment3.errors.txt index 5a906d7d43e5e..97dd8a64b6efd 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment3.errors.txt +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment3.errors.txt @@ -17,8 +17,10 @@ tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAs !!! error TS1005: ',' expected. var {i}: string | number = { i: 2 }; ~~~ -!!! error TS2322: Type '{ i: number; }' is not assignable to type 'string | number'. -!!! error TS2322: Type '{ i: number; }' is not assignable to type 'number'. +!!! error TS2322: Type '{ {|i|0|}: number; }' is not assignable to type 'string | number'. +!!! error TS2322: Type '{ {|i|1|}: number; }' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment3.ts:3:30 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment3.ts:3:30 ~ !!! error TS2339: Property 'i' does not exist on type 'string | number'. var {i1}: string | number| {} = { i1: 2 }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt index 6338e3d938c83..c8323bf170d0a 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration2.errors.txt @@ -83,12 +83,17 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( c0({ z: 1 }); // Error, implied type is { z: {x: any, y: {j: any}} } ~ -!!! error TS2322: Type 'number' is not assignable to type '{ x: any; y: { j: any; }; }'. +!!! error TS2322: Type 'number' is not assignable to type '{ {|x|0|}: any; {|y|1|}: { {|j|2|}: any; }; }'. +!!! annotated dropped!: 0 +!!! annotated dropped!: 1 +!!! annotated dropped!: 2 c1({}); // Error, implied type is {z:number}? ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ z: number; }'. -!!! error TS2345: Property 'z' is missing in type '{}' but required in type '{ z: number; }'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ {|z|0|}: number; }'. +!!! error TS2345: Property 'z' is missing in type '{}' but required in type '{ {|z|1|}: number; }'. !!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts:27:21: 'z' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts:27:21 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts:27:21 c1({ z: true }); // Error, implied type is {z:number}? ~ !!! error TS2322: Type 'true' is not assignable to type 'number'. @@ -131,9 +136,21 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts( d4({x, y, c}) { } ~~ !!! error TS2416: Property 'd4' in type 'C4' is not assignable to the same property in base type 'F2'. -!!! error TS2416: Type '({ x, y, c }: { x: any; y: any; c: any; }) => void' is not assignable to type '({ x, y, z }?: { x: any; y: any; z: any; }) => any'. +!!! error TS2416: Type '({ x, y, c }: { {|x|0|}: any; {|y|1|}: any; {|c|2|}: any; }) => void' is not assignable to type '({ x, y, z }?: { {|x|3|}: any; {|y|4|}: any; {|z|5|}: any; }) => any'. !!! error TS2416: Types of parameters '__0' and '__0' are incompatible. -!!! error TS2416: Property 'c' is missing in type '{ x: any; y: any; z: any; }' but required in type '{ x: any; y: any; c: any; }'. +!!! error TS2416: Property 'c' is missing in type '{ {|x|6|}: any; {|y|7|}: any; {|z|8|}: any; }' but required in type '{ {|x|9|}: any; {|y|10|}: any; {|c|11|}: any; }'. +!!! annotated dropped!: 0 +!!! annotated dropped!: 1 +!!! annotated dropped!: 2 +!!! annotated dropped!: 3 +!!! annotated dropped!: 4 +!!! annotated dropped!: 5 +!!! annotated dropped!: 6 +!!! annotated dropped!: 7 +!!! annotated dropped!: 8 +!!! annotated dropped!: 9 +!!! annotated dropped!: 10 +!!! annotated dropped!: 11 e0([a, b, q]) { } } diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt index 5514e7efc645e..5ada89cfac675 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration5.errors.txt @@ -54,19 +54,27 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts( // Error d3({ y: new Class() }); ~ -!!! error TS2741: Property 'foo' is missing in type 'Class' but required in type 'D'. +!!! error TS2741: Property 'foo' is missing in type '{|Class|0|}' but required in type '{|D|1|}'. !!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:14:5: 'foo' is declared here. !!! related TS6500 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33: The expected type comes from property 'y' which is declared here on type '{ y: D; }' +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:4:7 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:13:7 d3({}); ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ y: D; }'. -!!! error TS2345: Property 'y' is missing in type '{}' but required in type '{ y: D; }'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ {|y|0|}: {|D|1|}; }'. +!!! error TS2345: Property 'y' is missing in type '{}' but required in type '{ {|y|2|}: {|D|3|}; }'. !!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:13:7 +!!! annotated symbol 2 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33 +!!! annotated symbol 3 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:13:7 d3({ y: 1 }); ~ -!!! error TS2322: Type 'number' is not assignable to type 'D'. +!!! error TS2322: Type 'number' is not assignable to type '{|D|0|}'. !!! related TS6500 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33: The expected type comes from property 'y' which is declared here on type '{ y: D; }' +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:13:7 d3({ y: "world" }); ~ -!!! error TS2322: Type 'string' is not assignable to type 'D'. -!!! related TS6500 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33: The expected type comes from property 'y' which is declared here on type '{ y: D; }' \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type '{|D|0|}'. +!!! related TS6500 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:29:33: The expected type comes from property 'y' which is declared here on type '{ y: D; }' +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts:13:7 \ No newline at end of file diff --git a/tests/baselines/reference/destructuringParameterProperties5.errors.txt b/tests/baselines/reference/destructuringParameterProperties5.errors.txt index fa57ae150a053..915035c0c05f0 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.errors.txt +++ b/tests/baselines/reference/destructuringParameterProperties5.errors.txt @@ -44,8 +44,12 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]); ~~~~~~ -!!! error TS2322: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'. +!!! error TS2322: Type '{ {|x1|0|}: number; {|x2|1|}: string; {|x3|2|}: boolean; }' is not assignable to type '{|ObjType1|3|}'. !!! error TS2322: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts:11:19 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts:11:27 +!!! annotated symbol 2 tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts:11:35 +!!! annotated symbol 3 tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts:1:6 ~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. ~~~~~ diff --git a/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt b/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt index d28e5dedcb667..0fcaf49d25ffb 100644 --- a/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt +++ b/tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt @@ -16,9 +16,11 @@ tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(2 foo({ x: Bar, ~~~ -!!! error TS2741: Property 'x' is missing in type 'typeof Bar' but required in type 'Bar'. +!!! error TS2741: Property 'x' is missing in type 'typeof {|Bar|0|}' but required in type '{|Bar|1|}'. !!! related TS2728 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:2:5: 'x' is declared here. !!! related TS6213 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:10:8: Did you mean to use 'new' with this expression? +!!! annotated symbol 0 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:1:7 y: Date ~~~~ !!! error TS2740: Type 'DateConstructor' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. diff --git a/tests/baselines/reference/differentTypesWithSameName.errors.txt b/tests/baselines/reference/differentTypesWithSameName.errors.txt index b8b4b6e859853..5850821efa3b7 100644 --- a/tests/baselines/reference/differentTypesWithSameName.errors.txt +++ b/tests/baselines/reference/differentTypesWithSameName.errors.txt @@ -20,6 +20,12 @@ tests/cases/compiler/differentTypesWithSameName.ts(16,15): error TS2345: Argumen var v: variable = new variable(); m.doSomething(v); ~ -!!! error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'. -!!! error TS2345: Property 's' is missing in type 'variable' but required in type 'm.variable'. -!!! related TS2728 tests/cases/compiler/differentTypesWithSameName.ts:3:5: 's' is declared here. \ No newline at end of file +!!! error TS2345: Argument of type '{|variable|0|}' is not assignable to parameter of type '{|m|1|}.{|variable|2|}'. +!!! error TS2345: Property 's' is missing in type '{|variable|3|}' but required in type '{|m|4|}.{|variable|5|}'. +!!! related TS2728 tests/cases/compiler/differentTypesWithSameName.ts:3:5: 's' is declared here. +!!! annotated symbol 0 tests/cases/compiler/differentTypesWithSameName.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/differentTypesWithSameName.ts:1:8 +!!! annotated symbol 2 tests/cases/compiler/differentTypesWithSameName.ts:2:16 +!!! annotated symbol 3 tests/cases/compiler/differentTypesWithSameName.ts:10:7 +!!! annotated symbol 4 tests/cases/compiler/differentTypesWithSameName.ts:1:8 +!!! annotated symbol 5 tests/cases/compiler/differentTypesWithSameName.ts:2:16 \ No newline at end of file diff --git a/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt b/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt index e54727befd0e1..18f73a4425419 100644 --- a/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt +++ b/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt @@ -14,8 +14,12 @@ tests/cases/compiler/discriminatedUnionErrorMessage.ts(10,5): error TS2322: Type kind: "sq", x: 12, ~~~~~ -!!! error TS2322: Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Shape'. +!!! error TS2322: Type '{ {|kind|0|}: "sq"; {|x|1|}: number; {|y|2|}: number; }' is not assignable to type '{|Shape|3|}'. !!! error TS2322: Object literal may only specify known properties, and 'x' does not exist in type 'Square'. +!!! annotated symbol 0 tests/cases/compiler/discriminatedUnionErrorMessage.ts:9:5 +!!! annotated symbol 1 tests/cases/compiler/discriminatedUnionErrorMessage.ts:10:5 +!!! annotated symbol 2 tests/cases/compiler/discriminatedUnionErrorMessage.ts:11:5 +!!! annotated symbol 3 tests/cases/compiler/discriminatedUnionErrorMessage.ts:4:6 y: 13, } \ No newline at end of file diff --git a/tests/baselines/reference/discriminatedUnionTypes2.errors.txt b/tests/baselines/reference/discriminatedUnionTypes2.errors.txt index 15ed6968aeac2..7950814e6c248 100644 --- a/tests/baselines/reference/discriminatedUnionTypes2.errors.txt +++ b/tests/baselines/reference/discriminatedUnionTypes2.errors.txt @@ -33,8 +33,15 @@ tests/cases/conformance/types/union/discriminatedUnionTypes2.ts(32,11): error TS function f13(x: { a: null; b: string } | { a: string, c: number }) { x = { a: null, b: "foo", c: 4}; // Error ~~~~ -!!! error TS2322: Type '{ a: null; b: string; c: number; }' is not assignable to type '{ a: null; b: string; } | { a: string; c: number; }'. +!!! error TS2322: Type '{ {|a|0|}: null; {|b|1|}: string; {|c|2|}: number; }' is not assignable to type '{ {|a|3|}: null; {|b|4|}: string; } | { {|a|5|}: string; {|c|6|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type '{ a: null; b: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:27:11 +!!! annotated symbol 1 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:27:20 +!!! annotated symbol 2 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:27:30 +!!! annotated symbol 3 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:26:19 +!!! annotated symbol 4 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:26:28 +!!! annotated symbol 5 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:26:44 +!!! annotated symbol 6 tests/cases/conformance/types/union/discriminatedUnionTypes2.ts:26:55 } function f14(x: { a: 0; b: string } | { a: T, c: number }) { diff --git a/tests/baselines/reference/duplicatePackage.errors.txt b/tests/baselines/reference/duplicatePackage.errors.txt index 99d5a3f29ccf7..36663487282a6 100644 --- a/tests/baselines/reference/duplicatePackage.errors.txt +++ b/tests/baselines/reference/duplicatePackage.errors.txt @@ -9,8 +9,10 @@ a(b); // Works a(c); // Error, these are from different versions of the library. ~ -!!! error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. +!!! error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").{|default|0|}' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").{|default|1|}'. !!! error TS2345: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 /node_modules/c/node_modules/x/index.d.ts:1:22 +!!! annotated symbol 1 /node_modules/a/node_modules/x/index.d.ts:1:22 ==== /node_modules/a/index.d.ts (0 errors) ==== import X from "x"; diff --git a/tests/baselines/reference/dynamicNamesErrors.errors.txt b/tests/baselines/reference/dynamicNamesErrors.errors.txt index c39140dbd5257..872af6643a241 100644 --- a/tests/baselines/reference/dynamicNamesErrors.errors.txt +++ b/tests/baselines/reference/dynamicNamesErrors.errors.txt @@ -41,14 +41,18 @@ tests/cases/compiler/dynamicNamesErrors.ts(25,1): error TS2322: Type 'T1' is not let t2: T2; t1 = t2; ~~ -!!! error TS2322: Type 'T2' is not assignable to type 'T1'. +!!! error TS2322: Type '{|T2|0|}' is not assignable to type '{|T1|1|}'. !!! error TS2322: Types of property '[c0]' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/dynamicNamesErrors.ts:13:11 +!!! annotated symbol 1 tests/cases/compiler/dynamicNamesErrors.ts:9:11 t2 = t1; ~~ -!!! error TS2322: Type 'T1' is not assignable to type 'T2'. +!!! error TS2322: Type '{|T1|0|}' is not assignable to type '{|T2|1|}'. !!! error TS2322: Types of property '[c0]' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/dynamicNamesErrors.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/dynamicNamesErrors.ts:13:11 const x = Symbol(); const y = Symbol(); diff --git a/tests/baselines/reference/elaboratedErrors.errors.txt b/tests/baselines/reference/elaboratedErrors.errors.txt index 87b61b216edcb..fa143ec2d46c5 100644 --- a/tests/baselines/reference/elaboratedErrors.errors.txt +++ b/tests/baselines/reference/elaboratedErrors.errors.txt @@ -31,18 +31,26 @@ tests/cases/compiler/elaboratedErrors.ts(25,1): error TS2322: Type 'Alpha' is no // Only one of these errors should be large x = y; ~ -!!! error TS2741: Property 'x' is missing in type 'Beta' but required in type 'Alpha'. +!!! error TS2741: Property 'x' is missing in type '{|Beta|0|}' but required in type '{|Alpha|1|}'. !!! related TS2728 tests/cases/compiler/elaboratedErrors.ts:14:19: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/elaboratedErrors.ts:15:11 +!!! annotated symbol 1 tests/cases/compiler/elaboratedErrors.ts:14:11 x = y; ~ -!!! error TS2322: Type 'Beta' is not assignable to type 'Alpha'. +!!! error TS2322: Type '{|Beta|0|}' is not assignable to type '{|Alpha|1|}'. +!!! annotated symbol 0 tests/cases/compiler/elaboratedErrors.ts:15:11 +!!! annotated symbol 1 tests/cases/compiler/elaboratedErrors.ts:14:11 // Only one of these errors should be large y = x; ~ -!!! error TS2741: Property 'y' is missing in type 'Alpha' but required in type 'Beta'. +!!! error TS2741: Property 'y' is missing in type '{|Alpha|0|}' but required in type '{|Beta|1|}'. !!! related TS2728 tests/cases/compiler/elaboratedErrors.ts:15:18: 'y' is declared here. +!!! annotated symbol 0 tests/cases/compiler/elaboratedErrors.ts:14:11 +!!! annotated symbol 1 tests/cases/compiler/elaboratedErrors.ts:15:11 y = x; ~ -!!! error TS2322: Type 'Alpha' is not assignable to type 'Beta'. +!!! error TS2322: Type '{|Alpha|0|}' is not assignable to type '{|Beta|1|}'. +!!! annotated symbol 0 tests/cases/compiler/elaboratedErrors.ts:14:11 +!!! annotated symbol 1 tests/cases/compiler/elaboratedErrors.ts:15:11 \ No newline at end of file diff --git a/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.errors.txt b/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.errors.txt index dc7e3f10bd120..4959203603a51 100644 --- a/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.errors.txt +++ b/tests/baselines/reference/elaboratedErrorsOnNullableTargets01.errors.txt @@ -14,15 +14,27 @@ tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts(6,1): error TS2322: x = y; ~ -!!! error TS2322: Type '{ foo: { bar: number | undefined; }; }' is not assignable to type '{ foo: { bar: string | null; } | undefined; }'. +!!! error TS2322: Type '{ {|foo|0|}: { {|bar|1|}: number | undefined; }; }' is not assignable to type '{ {|foo|2|}: { {|bar|3|}: string | null; } | undefined; }'. !!! error TS2322: Types of property 'foo' are incompatible. -!!! error TS2322: Type '{ bar: number | undefined; }' is not assignable to type '{ bar: string | null; }'. +!!! error TS2322: Type '{ {|bar|4|}: number | undefined; }' is not assignable to type '{ {|bar|5|}: string | null; }'. !!! error TS2322: Types of property 'bar' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'string | null'. !!! error TS2322: Type 'undefined' is not assignable to type 'string | null'. +!!! annotated symbol 0 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:25 +!!! annotated symbol 1 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:32 +!!! annotated symbol 2 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:1:32 +!!! annotated symbol 3 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:1:39 +!!! annotated symbol 4 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:32 +!!! annotated symbol 5 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:1:39 y = x; ~ -!!! error TS2322: Type '{ foo: { bar: string | null; } | undefined; } | null | undefined' is not assignable to type '{ foo: { bar: number | undefined; }; }'. -!!! error TS2322: Type 'undefined' is not assignable to type '{ foo: { bar: number | undefined; }; }'. +!!! error TS2322: Type '{ {|foo|0|}: { {|bar|1|}: string | null; } | undefined; } | null | undefined' is not assignable to type '{ {|foo|2|}: { {|bar|3|}: number | undefined; }; }'. +!!! error TS2322: Type 'undefined' is not assignable to type '{ {|foo|4|}: { {|bar|5|}: number | undefined; }; }'. +!!! annotated symbol 0 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:1:32 +!!! annotated symbol 1 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:1:39 +!!! annotated symbol 2 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:25 +!!! annotated symbol 3 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:32 +!!! annotated symbol 4 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:25 +!!! annotated symbol 5 tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts:2:32 \ No newline at end of file diff --git a/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.errors.txt b/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.errors.txt index 56135cf8b0d14..0f0c176b346c6 100644 --- a/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.errors.txt +++ b/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.errors.txt @@ -46,8 +46,12 @@ tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.ts(4 // This line _should_ fail, because `result` is not the right type. return result; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Dictionary' is not assignable to type 'Record'. +!!! error TS2322: Type '{|Dictionary|0|}' is not assignable to type '{|Record|1|}'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'Bar'. +!!! error TS2322: Type 'string' is not assignable to type '{|Bar|3|}'. +!!! annotated symbol 0 tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.ts:3:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 2 tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.ts:32:11 +!!! annotated symbol 3 tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.ts:32:11 } \ No newline at end of file diff --git a/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.errors.txt b/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.errors.txt index 58de463148308..9622bbc321a0f 100644 --- a/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.errors.txt +++ b/tests/baselines/reference/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.errors.txt @@ -47,8 +47,12 @@ tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.ts(4 // This line _should_ fail, because `result` is not the right type. return result; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Dictionary' is not assignable to type 'Record'. +!!! error TS2322: Type '{|Dictionary|0|}' is not assignable to type '{|Record|1|}'. !!! error TS2322: Index signatures are incompatible. -!!! error TS2322: Type 'string' is not assignable to type 'Bar'. +!!! error TS2322: Type 'string' is not assignable to type '{|Bar|3|}'. +!!! annotated symbol 0 tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.ts:3:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 2 tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.ts:32:11 +!!! annotated symbol 3 tests/cases/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.ts:32:11 } \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignability.errors.txt b/tests/baselines/reference/enumAssignability.errors.txt index b582f9f8048ce..1f22dbd2b7f2c 100644 --- a/tests/baselines/reference/enumAssignability.errors.txt +++ b/tests/baselines/reference/enumAssignability.errors.txt @@ -35,10 +35,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi e = f; ~ -!!! error TS2322: Type 'F' is not assignable to type 'E'. +!!! error TS2322: Type '{|F|0|}' is not assignable to type '{|E|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:4:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 f = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'F'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|F|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:4:6 e = 1; // ok f = 1; // ok var x: number = e; // ok @@ -59,67 +63,113 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi var b: number = e; // ok var c: string = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'string'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 var d: boolean = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'boolean'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 var ee: Date = e; ~~ -!!! error TS2322: Type 'E' is not assignable to type 'Date'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|Date|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 var f: any = e; // ok var g: void = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'void'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 var h: Object = e; var i: {} = e; var j: () => {} = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '() => {}'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '() => {}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 var k: Function = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'Function'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|Function|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:272:11 var l: (x: number) => string = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '(x: number) => string'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '(x: number) => string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 ac = e; ~~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|C|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:19:11 ai = e; ~~ -!!! error TS2322: Type 'E' is not assignable to type 'I'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|I|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:23:15 var m: number[] = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'number[]'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type 'number[]'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 var n: { foo: string } = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{ {|foo|1|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:42:14 var o: (x: T) => T = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '<{|T|1|}>(x: {|T|2|}) => {|T|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:43:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:43:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:43:13 var p: Number = e; var q: String = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'String'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|String|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:394:11 function foo(x: T, y: U, z: V) { x = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'T'. -!!! error TS2322: 'E' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|E|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:18 y = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'U'. -!!! error TS2322: 'E' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|E|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:21 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:21 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:21 z = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'V'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|V|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:34 var a: A = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'A'. -!!! error TS2322: 'E' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|A|1|}'. +!!! error TS2322: '{|E|2|}' is assignable to the constraint of type '{|A|3|}', but '{|A|4|}' could be instantiated with a different subtype of constraint '{|Number|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:50 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:50 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:50 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:542:11 var b: B = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'B'. -!!! error TS2322: 'E' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|B|1|}'. +!!! error TS2322: '{|E|2|}' is assignable to the constraint of type '{|B|3|}', but '{|B|4|}' could be instantiated with a different subtype of constraint '{|E|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:68 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:68 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:47:68 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts:3:6 } } \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignmentCompat.errors.txt b/tests/baselines/reference/enumAssignmentCompat.errors.txt index d0b8cb376c247..c70b6f8df950f 100644 --- a/tests/baselines/reference/enumAssignmentCompat.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat.errors.txt @@ -33,22 +33,29 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type '5' is no var y: typeof W = W; var z: number = W; // error ~ -!!! error TS2322: Type 'typeof W' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof {|W|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat.ts:1:8 var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! error TS2322: Type 'W.a' is not assignable to type 'typeof W'. +!!! error TS2322: Type '{|W|0|}.a' is not assignable to type 'typeof {|W|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat.ts:1:8 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat.ts:1:8 var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! error TS2322: Type '3' is not assignable to type 'typeof W'. +!!! error TS2322: Type '3' is not assignable to type 'typeof {|W|0|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat.ts:1:8 var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! error TS2322: Type 'W.a' is not assignable to type 'WStatic'. +!!! error TS2322: Type '{|W|0|}.a' is not assignable to type '{|WStatic|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat.ts:1:8 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat.ts:12:11 var g: WStatic = 5; // error ~ -!!! error TS2322: Type '5' is not assignable to type 'WStatic'. +!!! error TS2322: Type '5' is not assignable to type '{|WStatic|0|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat.ts:12:11 var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumAssignmentCompat2.errors.txt b/tests/baselines/reference/enumAssignmentCompat2.errors.txt index 065cd35133d17..4e321f6cb74a7 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat2.errors.txt @@ -32,22 +32,29 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type '5' is n var y: typeof W = W; var z: number = W; // error ~ -!!! error TS2322: Type 'typeof W' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof {|W|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat2.ts:1:6 var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! error TS2322: Type 'W.a' is not assignable to type 'typeof W'. +!!! error TS2322: Type '{|W|0|}.a' is not assignable to type 'typeof {|W|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat2.ts:1:6 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat2.ts:1:6 var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! error TS2322: Type '3' is not assignable to type 'typeof W'. +!!! error TS2322: Type '3' is not assignable to type 'typeof {|W|0|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat2.ts:1:6 var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! error TS2322: Type 'W.a' is not assignable to type 'WStatic'. +!!! error TS2322: Type '{|W|0|}.a' is not assignable to type '{|WStatic|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat2.ts:1:6 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat2.ts:11:11 var g: WStatic = 5; // error ~ -!!! error TS2322: Type '5' is not assignable to type 'WStatic'. +!!! error TS2322: Type '5' is not assignable to type '{|WStatic|0|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat2.ts:11:11 var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumAssignmentCompat3.errors.txt b/tests/baselines/reference/enumAssignmentCompat3.errors.txt index a458733bcc296..f553a0b35dc49 100644 --- a/tests/baselines/reference/enumAssignmentCompat3.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat3.errors.txt @@ -86,50 +86,90 @@ tests/cases/compiler/enumAssignmentCompat3.ts(86,1): error TS2322: Type 'Merged. abc = secondAbc; // ok abc = secondAbcd; // missing 'd' ~~~ -!!! error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. +!!! error TS2322: Type '{|Abcd|0|}.{|E|1|}' is not assignable to type '{|First|2|}.{|E|3|}'. !!! error TS2322: Property 'd' is missing in type 'First.E'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:14:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:15:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 abc = secondAb; // ok abc = secondCd; // missing 'd' ~~~ -!!! error TS2322: Type 'Cd.E' is not assignable to type 'First.E'. +!!! error TS2322: Type '{|Cd|0|}.{|E|1|}' is not assignable to type '{|First|2|}.{|E|3|}'. !!! error TS2322: Property 'd' is missing in type 'First.E'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:24:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:25:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 abc = nope; // nope! ~~~ -!!! error TS2322: Type 'Nope' is not assignable to type 'E'. +!!! error TS2322: Type '{|Nope|0|}' is not assignable to type '{|E|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:10:17 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 abc = decl; // ok ~~~ -!!! error TS2322: Type 'Decl.E' is not assignable to type 'First.E'. +!!! error TS2322: Type '{|Decl|0|}.{|E|1|}' is not assignable to type '{|First|2|}.{|E|3|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:34:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:35:25 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 secondAbc = abc; // ok secondAbcd = abc; // ok secondAb = abc; // missing 'c' ~~~~~~~~ -!!! error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. +!!! error TS2322: Type '{|First|0|}.{|E|1|}' is not assignable to type '{|Ab|2|}.{|E|3|}'. !!! error TS2322: Property 'c' is missing in type 'Ab.E'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:19:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:20:17 secondCd = abc; // missing 'a' and 'b' ~~~~~~~~ -!!! error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. +!!! error TS2322: Type '{|First|0|}.{|E|1|}' is not assignable to type '{|Cd|2|}.{|E|3|}'. !!! error TS2322: Property 'a' is missing in type 'Cd.E'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:24:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:25:17 nope = abc; // nope! ~~~~ -!!! error TS2322: Type 'E' is not assignable to type 'Nope'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|Nope|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:10:17 decl = abc; // ok ~~~~ -!!! error TS2322: Type 'First.E' is not assignable to type 'Decl.E'. +!!! error TS2322: Type '{|First|0|}.{|E|1|}' is not assignable to type '{|Decl|2|}.{|E|3|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:34:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:35:25 // const is only assignable to itself k = k; abc = k; // error ~~~ -!!! error TS2322: Type 'Const.E' is not assignable to type 'First.E'. +!!! error TS2322: Type '{|Const|0|}.{|E|1|}' is not assignable to type '{|First|2|}.{|E|3|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:29:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:30:23 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 k = abc; ~ -!!! error TS2322: Type 'First.E' is not assignable to type 'Const.E'. +!!! error TS2322: Type '{|First|0|}.{|E|1|}' is not assignable to type '{|Const|2|}.{|E|3|}'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:29:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:30:23 // merged enums compare all their members abc = merged; // missing 'd' ~~~ -!!! error TS2322: Type 'Merged.E' is not assignable to type 'First.E'. +!!! error TS2322: Type '{|Merged|0|}.{|E|1|}' is not assignable to type '{|First|2|}.{|E|3|}'. !!! error TS2322: Property 'd' is missing in type 'First.E'. +!!! annotated symbol 0 tests/cases/compiler/enumAssignmentCompat3.ts:39:11 +!!! annotated symbol 1 tests/cases/compiler/enumAssignmentCompat3.ts:40:17 +!!! annotated symbol 2 tests/cases/compiler/enumAssignmentCompat3.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/enumAssignmentCompat3.ts:2:17 merged = abc; // ok abc = merged2; // ok merged2 = abc; // ok \ No newline at end of file diff --git a/tests/baselines/reference/enumErrors.errors.txt b/tests/baselines/reference/enumErrors.errors.txt index a0681ae344145..75afc2c12fee4 100644 --- a/tests/baselines/reference/enumErrors.errors.txt +++ b/tests/baselines/reference/enumErrors.errors.txt @@ -32,7 +32,9 @@ tests/cases/conformance/enums/enumErrors.ts(38,9): error TS2553: Computed values enum E5 { C = new Number(30) ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Number' is not assignable to type 'E5'. +!!! error TS2322: Type '{|Number|0|}' is not assignable to type '{|E5|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 1 tests/cases/conformance/enums/enumErrors.ts:8:6 } enum E9 { @@ -51,16 +53,22 @@ tests/cases/conformance/enums/enumErrors.ts(38,9): error TS2553: Computed values enum E11 { A = true, ~~~~ -!!! error TS2322: Type 'true' is not assignable to type 'E11'. +!!! error TS2322: Type 'true' is not assignable to type '{|E11|0|}'. +!!! annotated symbol 0 tests/cases/conformance/enums/enumErrors.ts:25:6 B = new Date(), ~~~~~~~~~~ -!!! error TS2322: Type 'Date' is not assignable to type 'E11'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|E11|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/enums/enumErrors.ts:25:6 C = window, ~~~~~~ -!!! error TS2322: Type 'Window' is not assignable to type 'E11'. +!!! error TS2322: Type '{|Window|0|}' is not assignable to type '{|E11|1|}'. +!!! annotated symbol 0 /.ts/lib.dom.d.ts:17123:11 +!!! annotated symbol 1 tests/cases/conformance/enums/enumErrors.ts:25:6 D = {} ~~ -!!! error TS2322: Type '{}' is not assignable to type 'E11'. +!!! error TS2322: Type '{}' is not assignable to type '{|E11|0|}'. +!!! annotated symbol 0 tests/cases/conformance/enums/enumErrors.ts:25:6 } // Enum with string valued member and computed member initializers diff --git a/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.errors.txt b/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.errors.txt index 660e1094ae9fb..f204f2b7cf72a 100644 --- a/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.errors.txt +++ b/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.errors.txt @@ -30,15 +30,23 @@ tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS23 const e0: X.Foo | boolean = Y.Foo.A; // ok const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed ~~ -!!! error TS2322: Type 'Foo' is not assignable to type 'boolean | Foo'. +!!! error TS2322: Type '{|Foo|0|}' is not assignable to type 'boolean | {|Foo|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:12:17 +!!! annotated symbol 1 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:2:17 const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal ~~ -!!! error TS2322: Type 'Foo' is not assignable to type 'boolean | Foo'. +!!! error TS2322: Type '{|Foo|0|}' is not assignable to type 'boolean | {|Foo|1|}'. +!!! annotated symbol 0 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:12:17 +!!! annotated symbol 1 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:2:17 const e3: X.Foo.B | boolean = Z.Foo.A; // not legal ~~ -!!! error TS2322: Type 'Foo' is not assignable to type 'boolean | Foo.B'. +!!! error TS2322: Type '{|Foo|0|}' is not assignable to type 'boolean | {|Foo|1|}.B'. +!!! annotated symbol 0 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:12:17 +!!! annotated symbol 1 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:2:17 const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A ~~ -!!! error TS2322: Type 'Foo' is not assignable to type 'boolean | Foo.A'. +!!! error TS2322: Type '{|Foo|0|}' is not assignable to type 'boolean | {|Foo|1|}.A'. +!!! annotated symbol 0 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:12:17 +!!! annotated symbol 1 tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts:2:17 const e5: Ka.Foo | boolean = Z.Foo.A; // ok \ No newline at end of file diff --git a/tests/baselines/reference/enumLiteralTypes3.errors.txt b/tests/baselines/reference/enumLiteralTypes3.errors.txt index 8d4007530a8dc..b7c95136bbf27 100644 --- a/tests/baselines/reference/enumLiteralTypes3.errors.txt +++ b/tests/baselines/reference/enumLiteralTypes3.errors.txt @@ -27,14 +27,22 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: a = a; a = b; ~ -!!! error TS2322: Type 'YesNo' is not assignable to type 'Choice.Yes'. -!!! error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|YesNo|0|}' is not assignable to type '{|Choice|1|}.Yes'. +!!! error TS2322: Type '{|Choice|2|}.No' is not assignable to type '{|Choice|3|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:4:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 2 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 3 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 a = c; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 a = d; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 } function f2(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { @@ -42,10 +50,14 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: b = b; b = c; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'YesNo'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:4:6 b = d; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'YesNo'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:4:6 } function f3(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { @@ -65,14 +77,20 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { a = Choice.Unknown; ~ -!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}.Unknown' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 a = Choice.Yes; a = Choice.No; ~ -!!! error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}.No' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 b = Choice.Unknown; ~ -!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'YesNo'. +!!! error TS2322: Type '{|Choice|0|}.Unknown' is not assignable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:4:6 b = Choice.Yes; b = Choice.No; c = Choice.Unknown; @@ -127,11 +145,15 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: switch (x) { case Choice.Unknown: return x; ~~~~~~~~~~~~~~ -!!! error TS2678: Type 'Choice.Unknown' is not comparable to type 'Choice.Yes'. +!!! error TS2678: Type '{|Choice|0|}.Unknown' is not comparable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 case Choice.Yes: return x; case Choice.No: return x; ~~~~~~~~~ -!!! error TS2678: Type 'Choice.No' is not comparable to type 'Choice.Yes'. +!!! error TS2678: Type '{|Choice|0|}.No' is not comparable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 } return x; } @@ -140,7 +162,9 @@ tests/cases/conformance/types/literal/enumLiteralTypes3.ts(96,14): error TS2678: switch (x) { case Choice.Unknown: return x; ~~~~~~~~~~~~~~ -!!! error TS2678: Type 'Choice.Unknown' is not comparable to type 'YesNo'. +!!! error TS2678: Type '{|Choice|0|}.Unknown' is not comparable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/enumLiteralTypes3.ts:4:6 case Choice.Yes: return x; case Choice.No: return x; } diff --git a/tests/baselines/reference/errorElaboration.errors.txt b/tests/baselines/reference/errorElaboration.errors.txt index 57971cad26912..5f9b1ed495f51 100644 --- a/tests/baselines/reference/errorElaboration.errors.txt +++ b/tests/baselines/reference/errorElaboration.errors.txt @@ -19,10 +19,20 @@ tests/cases/compiler/errorElaboration.ts(17,11): error TS2322: Type '"bar"' is n let a: () => Container>; foo(a); ~ -!!! error TS2345: Argument of type '() => Container>' is not assignable to parameter of type '() => Container>'. -!!! error TS2345: Type 'Container>' is not assignable to type 'Container>'. -!!! error TS2345: Type 'Ref' is not assignable to type 'Ref'. +!!! error TS2345: Argument of type '() => {|Container|0|}<{|Ref|1|}>' is not assignable to parameter of type '() => {|Container|2|}<{|Ref|3|}>'. +!!! error TS2345: Type '{|Container|4|}<{|Ref|5|}>' is not assignable to type '{|Container|6|}<{|Ref|7|}>'. +!!! error TS2345: Type '{|Ref|8|}' is not assignable to type '{|Ref|9|}'. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/errorElaboration.ts:6:11 +!!! annotated symbol 1 tests/cases/compiler/errorElaboration.ts:3:11 +!!! annotated symbol 2 tests/cases/compiler/errorElaboration.ts:6:11 +!!! annotated symbol 3 tests/cases/compiler/errorElaboration.ts:3:11 +!!! annotated symbol 4 tests/cases/compiler/errorElaboration.ts:6:11 +!!! annotated symbol 5 tests/cases/compiler/errorElaboration.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/errorElaboration.ts:6:11 +!!! annotated symbol 7 tests/cases/compiler/errorElaboration.ts:3:11 +!!! annotated symbol 8 tests/cases/compiler/errorElaboration.ts:3:11 +!!! annotated symbol 9 tests/cases/compiler/errorElaboration.ts:3:11 // Repro for #25498 diff --git a/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.errors.txt b/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.errors.txt index 6cfeeb8aeb816..5982899f69833 100644 --- a/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.errors.txt +++ b/tests/baselines/reference/errorElaborationDivesIntoApparentlyPresentPropsOnly.errors.txt @@ -8,19 +8,31 @@ tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts(10,5 function foo(x: T) { x = { a: "abc", b: 20, c: 30 }; ~ -!!! error TS2322: Type '{ a: string; b: number; c: number; }' is not assignable to type 'T'. +!!! error TS2322: Type '{ {|a|0|}: string; {|b|1|}: number; {|c|2|}: number; }' is not assignable to type '{|T|3|}'. +!!! annotated symbol 0 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:2:11 +!!! annotated symbol 1 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:2:21 +!!! annotated symbol 2 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:2:28 +!!! annotated symbol 3 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:1:14 } function bar(x: T) { x = { a: 20 }; ~ -!!! error TS2322: Type '{ a: number; }' is not assignable to type 'T'. +!!! error TS2322: Type '{ {|a|0|}: number; }' is not assignable to type '{|T|1|}'. +!!! annotated symbol 0 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:6:11 +!!! annotated symbol 1 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:5:14 } function baz(x: T) { x = { a: "not ok" }; ~ -!!! error TS2322: Type '{ a: string; }' is not assignable to type 'T'. -!!! error TS2322: '{ a: string; }' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ a: string; }'. +!!! error TS2322: Type '{ {|a|0|}: string; }' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{ {|a|2|}: string; }' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{ {|a|5|}: string; }'. +!!! annotated symbol 0 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:10:11 +!!! annotated symbol 1 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:9:14 +!!! annotated symbol 2 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:10:11 +!!! annotated symbol 3 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:9:14 +!!! annotated symbol 4 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:9:14 +!!! annotated symbol 5 tests/cases/compiler/errorElaborationDivesIntoApparentlyPresentPropsOnly.ts:9:26 } \ No newline at end of file diff --git a/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt b/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt index 1acdc1587f41d..3172fd050f6e9 100644 --- a/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt +++ b/tests/baselines/reference/errorMessageOnIntersectionsWithDiscriminants01.errors.txt @@ -14,9 +14,21 @@ tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts(8,1): err b = a; ~ -!!! error TS2322: Type 'A' is not assignable to type 'B'. -!!! error TS2322: Type '{ test: true; } & { foo: 1; }' is not assignable to type 'B'. -!!! error TS2322: Type '{ test: true; } & { foo: 1; }' is not assignable to type '{ test: true; } & { bar: 1; }'. -!!! error TS2322: Property 'bar' is missing in type '{ test: true; } & { foo: 1; }' but required in type '{ bar: 1; }'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|B|1|}'. +!!! error TS2322: Type '{ {|test|2|}: true; } & { {|foo|3|}: 1; }' is not assignable to type '{|B|4|}'. +!!! error TS2322: Type '{ {|test|5|}: true; } & { {|foo|6|}: 1; }' is not assignable to type '{ {|test|7|}: true; } & { {|bar|8|}: 1; }'. +!!! error TS2322: Property 'bar' is missing in type '{ {|test|9|}: true; } & { {|foo|10|}: 1; }' but required in type '{ {|bar|11|}: 1; }'. !!! related TS2728 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:3:28: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:2:13 +!!! annotated symbol 1 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:3:13 +!!! annotated symbol 2 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:1:24 +!!! annotated symbol 3 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:2:28 +!!! annotated symbol 4 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:3:13 +!!! annotated symbol 5 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:1:24 +!!! annotated symbol 6 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:2:28 +!!! annotated symbol 7 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:1:24 +!!! annotated symbol 8 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:3:28 +!!! annotated symbol 9 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:1:24 +!!! annotated symbol 10 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:2:28 +!!! annotated symbol 11 tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts:3:28 \ No newline at end of file diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt index 6b36f29a63ec7..47d5e463b04ae 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt @@ -19,8 +19,11 @@ tests/cases/compiler/errorMessagesIntersectionTypes01.ts(14,5): error TS2322: Ty let fooBar: FooBar = mixBar({ ~~~~~~ -!!! error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'. +!!! error TS2322: Type '{ {|fooProp|0|}: string; } & {|Bar|1|}' is not assignable to type '{|FooBar|2|}'. !!! error TS2322: Types of property 'fooProp' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes01.ts:15:5 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes01.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes01.ts:9:11 fooProp: "frizzlebizzle" }); \ No newline at end of file diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt index 1225d3662cb59..cc62ce1d14885 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt @@ -19,8 +19,11 @@ tests/cases/compiler/errorMessagesIntersectionTypes02.ts(14,5): error TS2322: Ty let fooBar: FooBar = mixBar({ ~~~~~~ -!!! error TS2322: Type '{ fooProp: "frizzlebizzle"; } & Bar' is not assignable to type 'FooBar'. +!!! error TS2322: Type '{ {|fooProp|0|}: "frizzlebizzle"; } & {|Bar|1|}' is not assignable to type '{|FooBar|2|}'. !!! error TS2322: Types of property 'fooProp' are incompatible. !!! error TS2322: Type '"frizzlebizzle"' is not assignable to type '"hello" | "world"'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes02.ts:15:5 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes02.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes02.ts:9:11 fooProp: "frizzlebizzle" }); \ No newline at end of file diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes03.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes03.errors.txt index 2ca7218764a00..517e0aa7c7623 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes03.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes03.errors.txt @@ -27,22 +27,51 @@ tests/cases/compiler/errorMessagesIntersectionTypes03.ts(23,5): error TS2322: Ty t = a_and_b; ~ -!!! error TS2322: Type 'A & B' is not assignable to type 'T'. -!!! error TS2322: 'A & B' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{|A|3|} & {|B|4|}' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:12 +!!! annotated symbol 3 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 5 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:12 +!!! annotated symbol 6 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:12 u = a_and_b; ~ -!!! error TS2322: Type 'A & B' is not assignable to type 'U'. -!!! error TS2322: 'A & B' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type '{|U|2|}'. +!!! error TS2322: '{|A|3|} & {|B|4|}' is assignable to the constraint of type '{|U|5|}', but '{|U|6|}' could be instantiated with a different subtype of constraint '{|A|7|}'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:15 +!!! annotated symbol 3 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 5 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:15 +!!! annotated symbol 6 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:15 +!!! annotated symbol 7 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 v = a_and_b; ~ -!!! error TS2322: Type 'A & B' is not assignable to type 'V'. -!!! error TS2322: 'A & B' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type '{|V|2|}'. +!!! error TS2322: '{|A|3|} & {|B|4|}' is assignable to the constraint of type '{|V|5|}', but '{|V|6|}' could be instantiated with a different subtype of constraint '{|A|7|}'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:28 +!!! annotated symbol 3 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 5 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:28 +!!! annotated symbol 6 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:28 +!!! annotated symbol 7 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:1:11 t = t_and_b; u = t_and_b; ~ -!!! error TS2322: Type 'T & B' is not assignable to type 'U'. +!!! error TS2322: Type '{|T|0|} & {|B|1|}' is not assignable to type '{|U|2|}'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:12 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:15 v = t_and_b; ~ -!!! error TS2322: Type 'T & B' is not assignable to type 'V'. +!!! error TS2322: Type '{|T|0|} & {|B|1|}' is not assignable to type '{|V|2|}'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:12 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorMessagesIntersectionTypes03.ts:9:28 } \ No newline at end of file diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt index 25fdc65f5e8eb..246d47ea17b38 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes04.errors.txt @@ -22,13 +22,19 @@ tests/cases/compiler/errorMessagesIntersectionTypes04.ts(19,5): error TS2322: Ty num = a_and_b; ~~~ -!!! error TS2322: Type 'A & B' is not assignable to type 'number'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes04.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes04.ts:5:11 bool = a_and_b; ~~~~ -!!! error TS2322: Type 'A & B' is not assignable to type 'boolean'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes04.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes04.ts:5:11 str = a_and_b; ~~~ -!!! error TS2322: Type 'A & B' is not assignable to type 'string'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/errorMessagesIntersectionTypes04.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorMessagesIntersectionTypes04.ts:5:11 str = num_and_bool; } \ No newline at end of file diff --git a/tests/baselines/reference/errorWithSameNameType.errors.txt b/tests/baselines/reference/errorWithSameNameType.errors.txt index 2c5eeed900d9a..a30d0facf94b9 100644 --- a/tests/baselines/reference/errorWithSameNameType.errors.txt +++ b/tests/baselines/reference/errorWithSameNameType.errors.txt @@ -27,6 +27,8 @@ tests/cases/compiler/c.ts(11,1): error TS2741: Property 'foo1' is missing in typ a = b ~ -!!! error TS2741: Property 'foo1' is missing in type 'import("tests/cases/compiler/b").F' but required in type 'import("tests/cases/compiler/a").F'. +!!! error TS2741: Property 'foo1' is missing in type 'import("tests/cases/compiler/b").{|F|0|}' but required in type 'import("tests/cases/compiler/a").{|F|1|}'. !!! related TS2728 tests/cases/compiler/a.ts:2:5: 'foo1' is declared here. +!!! annotated symbol 0 tests/cases/compiler/b.ts:1:18 +!!! annotated symbol 1 tests/cases/compiler/a.ts:1:18 \ No newline at end of file diff --git a/tests/baselines/reference/errorWithTruncatedType.errors.txt b/tests/baselines/reference/errorWithTruncatedType.errors.txt index 2f6e095a042ae..0bc7eb139aadb 100644 --- a/tests/baselines/reference/errorWithTruncatedType.errors.txt +++ b/tests/baselines/reference/errorWithTruncatedType.errors.txt @@ -13,5 +13,10 @@ tests/cases/compiler/errorWithTruncatedType.ts(10,5): error TS2322: Type '{ prop // String representation of type of 'x' should be truncated in error message var s: string = x; ~ -!!! error TS2322: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propertyWithAnExceedinglyLongName3: string; propertyWithAnExceedinglyLongName4: string; propertyWithAnExceedinglyLongName5: string; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|propertyWithAnExceedinglyLongName1|0|}: string; {|propertyWithAnExceedinglyLongName2|1|}: string; {|propertyWithAnExceedinglyLongName3|2|}: string; {|propertyWithAnExceedinglyLongName4|3|}: string; {|propertyWithAnExceedinglyLongName5|4|}: string; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/errorWithTruncatedType.ts:2:5 +!!! annotated symbol 1 tests/cases/compiler/errorWithTruncatedType.ts:3:5 +!!! annotated symbol 2 tests/cases/compiler/errorWithTruncatedType.ts:4:5 +!!! annotated symbol 3 tests/cases/compiler/errorWithTruncatedType.ts:5:5 +!!! annotated symbol 4 tests/cases/compiler/errorWithTruncatedType.ts:6:5 \ No newline at end of file diff --git a/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt b/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt index 1b8dab19b5b41..6482d30cff96e 100644 --- a/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt +++ b/tests/baselines/reference/errorsOnUnionsOfOverlappingObjects01.errors.txt @@ -38,24 +38,42 @@ tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(47,10): error TS234 f(x); ~ -!!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'. -!!! error TS2345: Type '{ a: string; b: string; }' is not assignable to type 'Foo'. +!!! error TS2345: Argument of type '{ {|a|0|}: string; {|b|1|}: string; }' is not assignable to parameter of type '{|Foo|2|} | {|Other|3|}'. +!!! error TS2345: Type '{ {|a|4|}: string; {|b|5|}: string; }' is not assignable to type '{|Foo|6|}'. !!! error TS2345: Types of property 'b' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:14:18 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:14:25 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:10:11 +!!! annotated symbol 4 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:14:18 +!!! annotated symbol 5 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:14:25 +!!! annotated symbol 6 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:1:11 f({ a: '', b: '' }) ~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'. -!!! error TS2345: Type '{ a: string; b: string; }' is not assignable to type 'Foo'. +!!! error TS2345: Argument of type '{ {|a|0|}: string; {|b|1|}: string; }' is not assignable to parameter of type '{|Foo|2|} | {|Other|3|}'. +!!! error TS2345: Type '{ {|a|4|}: string; {|b|5|}: string; }' is not assignable to type '{|Foo|6|}'. !!! error TS2345: Types of property 'b' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:19:5 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:19:12 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:10:11 +!!! annotated symbol 4 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:19:5 +!!! annotated symbol 5 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:19:12 +!!! annotated symbol 6 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:1:11 declare function g(x: Bar | Other): any; g(x); g({ a: '', b: '' }) ~~~~~ -!!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Bar | Other'. +!!! error TS2345: Argument of type '{ {|a|0|}: string; {|b|1|}: string; }' is not assignable to parameter of type '{|Bar|2|} | {|Other|3|}'. !!! error TS2345: Object literal may only specify known properties, and 'a' does not exist in type 'Bar | Other'. +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:24:5 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:24:12 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:6:11 +!!! annotated symbol 3 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:10:11 declare function h(x: Foo | Bar | Other): any; @@ -75,21 +93,37 @@ tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(47,10): error TS234 addToZoo({ dog: "Barky McBarkface" }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ dog: string; }' is not assignable to parameter of type 'ExoticAnimal'. -!!! error TS2345: Property 'cat' is missing in type '{ dog: string; }' but required in type 'CatDog'. +!!! error TS2345: Argument of type '{ {|dog|0|}: string; }' is not assignable to parameter of type '{|ExoticAnimal|1|}'. +!!! error TS2345: Property 'cat' is missing in type '{ {|dog|2|}: string; }' but required in type '{|CatDog|3|}'. !!! related TS2728 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:31:20: 'cat' is declared here. +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:42:12 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:35:6 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:42:12 +!!! annotated symbol 3 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:31:11 addToZoo({ man: "Manny", bear: "Coffee" }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ man: string; bear: string; }' is not assignable to parameter of type 'ExoticAnimal'. -!!! error TS2345: Property 'pig' is missing in type '{ man: string; bear: string; }' but required in type 'ManBearPig'. +!!! error TS2345: Argument of type '{ {|man|0|}: string; {|bear|1|}: string; }' is not assignable to parameter of type '{|ExoticAnimal|2|}'. +!!! error TS2345: Property 'pig' is missing in type '{ {|man|3|}: string; {|bear|4|}: string; }' but required in type '{|ManBearPig|5|}'. !!! related TS2728 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:32:45: 'pig' is declared here. +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:43:12 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:43:26 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:35:6 +!!! annotated symbol 3 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:43:12 +!!! annotated symbol 4 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:43:26 +!!! annotated symbol 5 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:32:11 const manBeer = { man: "Manny", beer: "Coffee" }; addToZoo({ man: "Manny", beer: "Coffee" }); ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ man: string; beer: string; }' is not assignable to parameter of type 'ExoticAnimal'. +!!! error TS2345: Argument of type '{ {|man|0|}: string; {|beer|1|}: string; }' is not assignable to parameter of type '{|ExoticAnimal|2|}'. !!! error TS2345: Object literal may only specify known properties, and 'beer' does not exist in type 'ExoticAnimal'. +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:46:12 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:46:26 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:35:6 addToZoo(manBeer); ~~~~~~~ -!!! error TS2345: Argument of type '{ man: string; beer: string; }' is not assignable to parameter of type 'ExoticAnimal'. -!!! error TS2345: Type '{ man: string; beer: string; }' is missing the following properties from type 'ManBearPig': bear, pig \ No newline at end of file +!!! error TS2345: Argument of type '{ {|man|0|}: string; {|beer|1|}: string; }' is not assignable to parameter of type '{|ExoticAnimal|2|}'. +!!! error TS2345: Type '{ man: string; beer: string; }' is missing the following properties from type 'ManBearPig': bear, pig +!!! annotated symbol 0 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:45:19 +!!! annotated symbol 1 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:45:33 +!!! annotated symbol 2 tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts:35:6 \ No newline at end of file diff --git a/tests/baselines/reference/errorsWithInvokablesInUnions01.errors.txt b/tests/baselines/reference/errorsWithInvokablesInUnions01.errors.txt index 433170f7c579f..c894141bac763 100644 --- a/tests/baselines/reference/errorsWithInvokablesInUnions01.errors.txt +++ b/tests/baselines/reference/errorsWithInvokablesInUnions01.errors.txt @@ -23,17 +23,29 @@ tests/cases/compiler/errorsWithInvokablesInUnions01.ts(16,12): error TS2322: Typ export let blah: IDirectiveLinkFn | ConstructableA | IDirectivePrePost = (x: string) => {} ~~~~ -!!! error TS2322: Type '(x: string) => void' is not assignable to type 'ConstructableA | IDirectiveLinkFn | IDirectivePrePost'. -!!! error TS2322: Type '(x: string) => void' is not assignable to type 'IDirectiveLinkFn'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type '{|ConstructableA|0|} | {|IDirectiveLinkFn|1|} | {|IDirectivePrePost|2|}'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type '{|IDirectiveLinkFn|3|}'. !!! error TS2322: Types of parameters 'x' and 'scope' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:5:11 export let ctor: IDirectiveLinkFn | ConstructableA | IDirectivePrePost = class { ~~~~ -!!! error TS2322: Type 'typeof ctor' is not assignable to type 'ConstructableA | IDirectiveLinkFn | IDirectivePrePost'. -!!! error TS2322: Type 'typeof ctor' is not assignable to type 'ConstructableA'. -!!! error TS2322: Property 'somePropA' is missing in type 'ctor' but required in type '{ somePropA: any; }'. +!!! error TS2322: Type 'typeof {|ctor|0|}' is not assignable to type '{|ConstructableA|1|} | {|IDirectiveLinkFn|2|} | {|IDirectivePrePost|3|}'. +!!! error TS2322: Type 'typeof {|ctor|4|}' is not assignable to type '{|ConstructableA|5|}'. +!!! error TS2322: Property 'somePropA' is missing in type '{|ctor|6|}' but required in type '{ {|somePropA|7|}: any; }'. !!! related TS2728 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:2:12: 'somePropA' is declared here. +!!! annotated symbol 0 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:16:90 +!!! annotated symbol 1 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:5:11 +!!! annotated symbol 3 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:16:90 +!!! annotated symbol 5 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:1:11 +!!! annotated symbol 6 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:16:90 +!!! annotated symbol 7 tests/cases/compiler/errorsWithInvokablesInUnions01.ts:2:12 someUnaccountedProp: any; } \ No newline at end of file diff --git a/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.errors.txt b/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.errors.txt index 8222133a9de00..f2598edfef5ab 100644 --- a/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.errors.txt +++ b/tests/baselines/reference/esModuleInteropPrettyErrorRelatedInformation.errors.txt @@ -19,9 +19,10 @@ function invoke(f: () => void) { f(); } invoke(foo); ~~~ -!!! error TS2345: Argument of type '{ default: () => void; }' is not assignable to parameter of type '() => void'. +!!! error TS2345: Argument of type '{ {|default|0|}: () => void; }' is not assignable to parameter of type '() => void'. !!! error TS2345: Type '{ default: () => void; }' provides no match for the signature '(): void'. !!! related TS7038 tests/cases/compiler/index.ts:1:1: Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead. +!!! annotated dropped!: 0 Found 1 error. diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 31848458a87e8..30f92edd975b9 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -67,7 +67,8 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd !!! error TS2322: Type '9.9' is not assignable to type 'string'. var aDate: Date = 9.9; ~~~~~ -!!! error TS2322: Type '9.9' is not assignable to type 'Date'. +!!! error TS2322: Type '9.9' is not assignable to type '{|Date|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 var aVoid: void = 9.9; ~~~~~ @@ -75,12 +76,16 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd var anInterface: I = new D(); ~~~~~~~~~~~ -!!! error TS2741: Property 'id' is missing in type 'D' but required in type 'I'. +!!! error TS2741: Property 'id' is missing in type '{|D|0|}' but required in type '{|I|1|}'. !!! related TS2728 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:2:5: 'id' is declared here. +!!! annotated symbol 0 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:1:11 var aClass: C = new D(); ~~~~~~ -!!! error TS2741: Property 'id' is missing in type 'D' but required in type 'C'. +!!! error TS2741: Property 'id' is missing in type '{|D|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:6:5: 'id' is declared here. +!!! annotated symbol 0 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:5:7 var aGenericClass: D = new C(); ~~~~~~~~~~~~~ !!! error TS2739: Type 'C' is missing the following properties from type 'D': source, recurse, wrapped @@ -90,9 +95,11 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd !!! related TS6500 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:2:5: The expected type comes from property 'id' which is declared here on type 'I' var anOtherObjectLiteral: { id: string } = new C(); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type '{ id: string; }'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{ {|id|1|}: string; }'. !!! error TS2322: Types of property 'id' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:44:29 var aFunction: typeof F = F2; ~~~~~~~~~ @@ -111,14 +118,28 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd var aModule: typeof M = N; ~~~~~~~ -!!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. +!!! error TS2322: Type 'typeof {|N|0|}' is not assignable to type 'typeof {|M|1|}'. !!! error TS2322: Types of property 'A' are incompatible. -!!! error TS2322: Type 'typeof N.A' is not assignable to type 'typeof M.A'. -!!! error TS2322: Property 'name' is missing in type 'N.A' but required in type 'M.A'. +!!! error TS2322: Type 'typeof {|N|2|}.{|A|3|}' is not assignable to type 'typeof {|M|4|}.{|A|5|}'. +!!! error TS2322: Property 'name' is missing in type '{|N|6|}.{|A|7|}' but required in type '{|M|8|}.{|A|9|}'. !!! related TS2728 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:20:9: 'name' is declared here. +!!! annotated symbol 0 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:26:8 +!!! annotated symbol 1 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:18:8 +!!! annotated symbol 2 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:26:8 +!!! annotated symbol 3 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:27:18 +!!! annotated symbol 4 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:18:8 +!!! annotated symbol 5 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:19:18 +!!! annotated symbol 6 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:26:8 +!!! annotated symbol 7 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:27:18 +!!! annotated symbol 8 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:18:8 +!!! annotated symbol 9 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:19:18 var aClassInModule: M.A = new N.A(); ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'N.A' is not assignable to type 'M.A'. +!!! error TS2322: Type '{|N|0|}.{|A|1|}' is not assignable to type '{|M|2|}.{|A|3|}'. +!!! annotated symbol 0 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:26:8 +!!! annotated symbol 1 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:27:18 +!!! annotated symbol 2 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:18:8 +!!! annotated symbol 3 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:19:18 var aFunctionInModule: typeof M.F2 = F2; ~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. diff --git a/tests/baselines/reference/excessPropertyCheckWithEmptyObject.errors.txt b/tests/baselines/reference/excessPropertyCheckWithEmptyObject.errors.txt index 9399cfa7d1aab..884167448ae91 100644 --- a/tests/baselines/reference/excessPropertyCheckWithEmptyObject.errors.txt +++ b/tests/baselines/reference/excessPropertyCheckWithEmptyObject.errors.txt @@ -12,22 +12,32 @@ tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts(14,34): error TS2322: // Excess property error expected here Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false }); ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ value: string; readonly: boolean; }' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. +!!! error TS2345: Argument of type '{ {|value|0|}: string; {|readonly|1|}: boolean; }' is not assignable to parameter of type '{|PropertyDescriptor|2|} & {|ThisType|3|}'. !!! error TS2345: Object literal may only specify known properties, and 'readonly' does not exist in type 'PropertyDescriptor & ThisType'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:4:41 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:4:58 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:107:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1499:11 interface A { x?: string } // Excess property error expected here let a: A & ThisType = { y: 10 }; ~~~~~ -!!! error TS2322: Type '{ y: number; }' is not assignable to type 'A & ThisType'. +!!! error TS2322: Type '{ {|y|0|}: number; }' is not assignable to type '{|A|1|} & {|ThisType|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'y' does not exist in type 'A & ThisType'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:9:30 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:6:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1499:11 interface Empty {} // Excess property error expected here let x: Empty & { x: number } = { y: "hello" }; ~~~~~~~~~~ -!!! error TS2322: Type '{ y: string; }' is not assignable to type 'Empty & { x: number; }'. +!!! error TS2322: Type '{ {|y|0|}: string; }' is not assignable to type '{|Empty|1|} & { {|x|2|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'y' does not exist in type 'Empty & { x: number; }'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:14:34 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithEmptyObject.ts:14:18 \ No newline at end of file diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt index 469b6d089b696..8be1db1bf0cf1 100644 --- a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt @@ -37,17 +37,28 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2326: Types } let wrong: ADT = { tag: "T", a1: "extra" } ~~~~~~~~~~~ -!!! error TS2322: Type '{ tag: "T"; a1: string; }' is not assignable to type 'ADT'. +!!! error TS2322: Type '{ {|tag|0|}: "T"; {|a1|1|}: string; }' is not assignable to type '{|ADT|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'a1' does not exist in type '{ tag: "T"; }'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:10:20 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:10:30 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:1:6 wrong = { tag: "A", d20: 12 } ~~~~~~~ -!!! error TS2322: Type '{ tag: "A"; d20: number; }' is not assignable to type 'ADT'. +!!! error TS2322: Type '{ {|tag|0|}: "A"; {|d20|1|}: number; }' is not assignable to type '{|ADT|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'd20' does not exist in type '{ tag: "A"; a1: string; }'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:11:21 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:1:6 wrong = { tag: "D" } ~~~~~ -!!! error TS2322: Type '{ tag: "D"; }' is not assignable to type 'ADT'. -!!! error TS2322: Property 'd20' is missing in type '{ tag: "D"; }' but required in type '{ tag: "D"; d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; }'. +!!! error TS2322: Type '{ {|tag|0|}: "D"; }' is not assignable to type '{|ADT|1|}'. +!!! error TS2322: Property 'd20' is missing in type '{ {|tag|2|}: "D"; }' but required in type '{ {|tag|3|}: "D"; {|d20|4|}: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; }'. !!! related TS2728 tests/cases/compiler/excessPropertyCheckWithUnions.ts:6:5: 'd20' is declared here. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:12:11 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:1:6 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:12:11 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:5:5 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyCheckWithUnions.ts:6:5 type Ambiguous = { tag: "A", @@ -70,28 +81,47 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2326: Types // correctly error on excess property 'extra', even when ambiguous amb = { tag: "A", x: "hi", extra: 12 } ~~~~~~~~~ -!!! error TS2322: Type '{ tag: "A"; x: string; extra: number; }' is not assignable to type 'Ambiguous'. +!!! error TS2322: Type '{ {|tag|0|}: "A"; {|x|1|}: string; {|extra|2|}: number; }' is not assignable to type '{|Ambiguous|3|}'. !!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:33:9 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:33:19 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:33:28 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:14:6 amb = { tag: "A", y: 12, extra: 12 } ~~~~~~~~~ -!!! error TS2322: Type '{ tag: "A"; y: number; extra: number; }' is not assignable to type 'Ambiguous'. +!!! error TS2322: Type '{ {|tag|0|}: "A"; {|y|1|}: number; {|extra|2|}: number; }' is not assignable to type '{|Ambiguous|3|}'. !!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:34:9 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:34:19 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:34:26 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:14:6 // assignability errors still work. // But note that the error for `z: true` is the fallback one of reporting on // the last constituent since assignability error reporting can't find a single best discriminant either. amb = { tag: "A" } ~~~ -!!! error TS2322: Type '{ tag: "A"; }' is not assignable to type 'Ambiguous'. -!!! error TS2322: Type '{ tag: "A"; }' is not assignable to type '{ tag: "C"; }'. +!!! error TS2322: Type '{ {|tag|0|}: "A"; }' is not assignable to type '{|Ambiguous|1|}'. +!!! error TS2322: Type '{ {|tag|2|}: "A"; }' is not assignable to type '{ {|tag|3|}: "C"; }'. !!! error TS2322: Types of property 'tag' are incompatible. !!! error TS2322: Type '"A"' is not assignable to type '"C"'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:39:9 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:14:6 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:39:9 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:24:5 amb = { tag: "A", z: true } ~~~ -!!! error TS2322: Type '{ tag: "A"; z: true; }' is not assignable to type 'Ambiguous'. -!!! error TS2322: Type '{ tag: "A"; z: true; }' is not assignable to type '{ tag: "B"; z: boolean; }'. +!!! error TS2322: Type '{ {|tag|0|}: "A"; {|z|1|}: true; }' is not assignable to type '{|Ambiguous|2|}'. +!!! error TS2322: Type '{ {|tag|3|}: "A"; {|z|4|}: true; }' is not assignable to type '{ {|tag|5|}: "B"; {|z|6|}: boolean; }'. !!! error TS2322: Types of property 'tag' are incompatible. !!! error TS2322: Type '"A"' is not assignable to type '"B"'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:40:9 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:40:19 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:14:6 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:40:9 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyCheckWithUnions.ts:40:19 +!!! annotated symbol 5 tests/cases/compiler/excessPropertyCheckWithUnions.ts:21:5 +!!! annotated symbol 6 tests/cases/compiler/excessPropertyCheckWithUnions.ts:22:5 type Overlapping = | { a: 1, b: 1, first: string } @@ -102,12 +132,22 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2326: Types // these two are still errors despite their doubled up discriminants over = { a: 1, b: 1, first: "ok", second: "error" } ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: 1; b: 1; first: string; second: string; }' is not assignable to type 'Overlapping'. +!!! error TS2322: Type '{ {|a|0|}: 1; {|b|1|}: 1; {|first|2|}: string; {|second|3|}: string; }' is not assignable to type '{|Overlapping|4|}'. !!! error TS2322: Object literal may only specify known properties, and 'second' does not exist in type '{ a: 1; b: 1; first: string; }'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:49:10 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:49:16 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:49:22 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:49:35 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyCheckWithUnions.ts:42:6 over = { a: 1, b: 1, first: "ok", third: "error" } ~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: 1; b: 1; first: string; third: string; }' is not assignable to type 'Overlapping'. +!!! error TS2322: Type '{ {|a|0|}: 1; {|b|1|}: 1; {|first|2|}: string; {|third|3|}: string; }' is not assignable to type '{|Overlapping|4|}'. !!! error TS2322: Object literal may only specify known properties, and 'third' does not exist in type '{ a: 1; b: 1; first: string; }'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:50:10 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:50:16 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:50:22 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyCheckWithUnions.ts:50:35 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyCheckWithUnions.ts:42:6 // Freshness disappears after spreading a union declare let t0: { a: any, b: any } | { d: any, e: any } @@ -126,8 +166,11 @@ tests/cases/compiler/excessPropertyCheckWithUnions.ts(66,9): error TS2326: Types b: "b", // excess -- kind: "A" ~~~~~~ !!! error TS2326: Types of property 'n' are incompatible. -!!! error TS2326: Type '{ a: string; b: string; }' is not assignable to type 'AN'. +!!! error TS2326: Type '{ {|a|0|}: string; {|b|1|}: string; }' is not assignable to type '{|AN|2|}'. !!! error TS2326: Object literal may only specify known properties, and 'b' does not exist in type 'AN'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyCheckWithUnions.ts:65:9 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyCheckWithUnions.ts:66:9 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyCheckWithUnions.ts:59:6 } } const abac: AB = { diff --git a/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.errors.txt b/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.errors.txt index 368a71de003fc..e16adff991ac3 100644 --- a/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.errors.txt +++ b/tests/baselines/reference/excessPropertyChecksWithNestedIntersections.errors.txt @@ -38,9 +38,12 @@ tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(70,50): erro !!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:4:5: The expected type comes from property 'x' which is declared here on type 'A' let c: B = { a: { x: 'hello', y: 2 } }; // error - y does not exist in type A ~~~~ -!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ {|x|0|}: string; {|y|1|}: number; }' is not assignable to type '{|A|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'y' does not exist in type 'A'. !!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:8:5: The expected type comes from property 'a' which is declared here on type 'B' +!!! annotated symbol 0 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:19:19 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:19:31 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:3:11 let d: D = { a: { x: 'hello' }, c: 5 }; // ok let e: D = { a: { x: 2 }, c: 5 }; // error - types of property x are incompatible @@ -49,9 +52,12 @@ tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(70,50): erro !!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:4:5: The expected type comes from property 'x' which is declared here on type 'A' let f: D = { a: { x: 'hello', y: 2 }, c: 5 }; // should be an error ~~~~ -!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'A'. +!!! error TS2322: Type '{ {|x|0|}: string; {|y|1|}: number; }' is not assignable to type '{|A|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'y' does not exist in type 'A'. !!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:8:5: The expected type comes from property 'a' which is declared here on type 'D' +!!! annotated symbol 0 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:23:19 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:23:31 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:3:11 // https://github.com/Microsoft/TypeScript/issues/18075 @@ -64,8 +70,13 @@ tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(70,50): erro url: '', xyz: 1 // Great! This causes an error! ~~~~~~ -!!! error TS2322: Type '{ id: number; url: string; xyz: number; }' is not assignable to type '{ id: number; } & { url: string; }'. +!!! error TS2322: Type '{ {|id|0|}: number; {|url|1|}: string; {|xyz|2|}: number; }' is not assignable to type '{ {|id|3|}: number; } & { {|url|4|}: string; }'. !!! error TS2322: Object literal may only specify known properties, and 'xyz' does not exist in type '{ id: number; } & { url: string; }'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:32:5 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:33:5 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:34:5 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:27:71 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:27:89 }; export const myInstance: MyType = { @@ -76,9 +87,14 @@ tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(70,50): erro url: '', xyz: 2 // This should also be an error ~~~~~~ -!!! error TS2322: Type '{ id: number; url: string; xyz: number; }' is not assignable to type '{ id: number; } & { url: string; }'. +!!! error TS2322: Type '{ {|id|0|}: number; {|url|1|}: string; {|xyz|2|}: number; }' is not assignable to type '{ {|id|3|}: number; } & { {|url|4|}: string; }'. !!! error TS2322: Object literal may only specify known properties, and 'xyz' does not exist in type '{ id: number; } & { url: string; }'. !!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:27:62: The expected type comes from property 'photo' which is declared here on type 'MyType' +!!! annotated symbol 0 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:41:9 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:42:9 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:43:9 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:27:71 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:27:89 } }; @@ -105,12 +121,22 @@ tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(70,50): erro test = { foo: true, bar: true, boo: true } ~~~~~~~~~ -!!! error TS2322: Type '{ foo: true; bar: true; boo: boolean; }' is not assignable to type 'View'. +!!! error TS2322: Type '{ {|foo|0|}: true; {|bar|1|}: true; {|boo|2|}: boolean; }' is not assignable to type '{|View|3|}<{|TypeA|4|}>'. !!! error TS2322: Object literal may only specify known properties, and 'boo' does not exist in type 'View'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:68:10 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:68:21 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:68:32 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:49:13 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:61:11 test = { foo: true, bar: { foo: true, bar: true, boo: true } } ~~~~~~~~~ -!!! error TS2322: Type '{ foo: true; bar: true; boo: boolean; }' is not assignable to type 'boolean | View'. +!!! error TS2322: Type '{ {|foo|0|}: true; {|bar|1|}: true; {|boo|2|}: boolean; }' is not assignable to type 'boolean | {|View|3|}<{|TypeB|4|}>'. !!! error TS2322: Object literal may only specify known properties, and 'boo' does not exist in type 'View'. !!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:63:5: The expected type comes from property 'bar' which is declared here on type 'View' +!!! annotated symbol 0 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:70:28 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:70:39 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:70:50 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:49:13 +!!! annotated symbol 4 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:56:11 \ No newline at end of file diff --git a/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt b/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt index 961308059bac7..598348fedb812 100644 --- a/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt +++ b/tests/baselines/reference/excessPropertyErrorForFunctionTypes.errors.txt @@ -8,5 +8,9 @@ tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts(4,44): error TS2322: let doesntWork: DoesntWork = { a: 1, c: 2, d: 3 } ~~~~ -!!! error TS2322: Type '{ a: number; c: number; d: number; }' is not assignable to type 'DoesntWork'. -!!! error TS2322: Object literal may only specify known properties, and 'd' does not exist in type 'DoesntWork'. \ No newline at end of file +!!! error TS2322: Type '{ {|a|0|}: number; {|c|1|}: number; {|d|2|}: number; }' is not assignable to type '{|DoesntWork|3|}'. +!!! error TS2322: Object literal may only specify known properties, and 'd' does not exist in type 'DoesntWork'. +!!! annotated symbol 0 tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts:4:32 +!!! annotated symbol 1 tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts:4:38 +!!! annotated symbol 2 tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts:4:44 +!!! annotated symbol 3 tests/cases/compiler/excessPropertyErrorForFunctionTypes.ts:2:6 \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt index 5ba27334f5ea8..b66f11d3cefa4 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt @@ -5,7 +5,9 @@ tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument o import foo = require("./foo_0"); var x = new foo(true); // Should error ~~~~ -!!! error TS2345: Argument of type 'true' is not assignable to parameter of type '{ a: string; b: number; }'. +!!! error TS2345: Argument of type 'true' is not assignable to parameter of type '{ {|a|0|}: string; {|b|1|}: number; }'. +!!! annotated symbol 0 /.src/tests/cases/conformance/externalModules/foo_0.ts:1:22 +!!! annotated symbol 1 /.src/tests/cases/conformance/externalModules/foo_0.ts:1:33 var y = new foo({a: "test", b: 42}); // Should be OK var z: number = y.test.b; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/exportDefaultStripsFreshness.errors.txt b/tests/baselines/reference/exportDefaultStripsFreshness.errors.txt index a57764e4004ed..b42113eea0e13 100644 --- a/tests/baselines/reference/exportDefaultStripsFreshness.errors.txt +++ b/tests/baselines/reference/exportDefaultStripsFreshness.errors.txt @@ -24,13 +24,21 @@ tests/cases/compiler/index.ts(12,6): error TS2345: Argument of type '{ foob: str nFoo(q); // for comparison ~ -!!! error TS2345: Argument of type '{ foob: string; }' is not assignable to parameter of type 'IFoo'. -!!! error TS2345: Property 'foo' is missing in type '{ foob: string; }' but required in type 'IFoo'. +!!! error TS2345: Argument of type '{ {|foob|0|}: string; }' is not assignable to parameter of type '{|IFoo|1|}'. +!!! error TS2345: Property 'foo' is missing in type '{ {|foob|2|}: string; }' but required in type '{|IFoo|3|}'. !!! related TS2728 tests/cases/compiler/index.ts:4:5: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/compiler/items.ts:6:5 +!!! annotated symbol 1 tests/cases/compiler/index.ts:3:11 +!!! annotated symbol 2 tests/cases/compiler/items.ts:6:5 +!!! annotated symbol 3 tests/cases/compiler/index.ts:3:11 nFoo(B); ~ -!!! error TS2345: Argument of type '{ foob: string; }' is not assignable to parameter of type 'IFoo'. -!!! error TS2345: Property 'foo' is missing in type '{ foob: string; }' but required in type 'IFoo'. +!!! error TS2345: Argument of type '{ {|foob|0|}: string; }' is not assignable to parameter of type '{|IFoo|1|}'. +!!! error TS2345: Property 'foo' is missing in type '{ {|foob|2|}: string; }' but required in type '{|IFoo|3|}'. !!! related TS2728 tests/cases/compiler/index.ts:4:5: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/compiler/items.ts:2:5 +!!! annotated symbol 1 tests/cases/compiler/index.ts:3:11 +!!! annotated symbol 2 tests/cases/compiler/items.ts:2:5 +!!! annotated symbol 3 tests/cases/compiler/index.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt index 799fc7bb8b0d5..10e100b7100f1 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt @@ -15,10 +15,13 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2322: } class D extends C implements C { ~ -!!! error TS2720: Class 'D' incorrectly implements class 'C'. Did you mean to extend 'C' and inherit its members as a subclass? +!!! error TS2720: Class '{|D|0|}' incorrectly implements class '{|C|1|}'. Did you mean to extend '{|C|2|}' and inherit its members as a subclass? !!! error TS2720: Types of property 'bar' are incompatible. !!! error TS2720: Type '() => string' is not assignable to type '() => number'. !!! error TS2720: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/extendAndImplementTheSameBaseType2.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/extendAndImplementTheSameBaseType2.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/extendAndImplementTheSameBaseType2.ts:1:7 baz() { } } diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt b/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt index 24aa0d124ca19..6a261e1da3620 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly2.errors.txt @@ -14,9 +14,11 @@ tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(11,32): error TS2741: Pr declare function foo(x: T, func: (p: T) => T): T; var result = foo(derived, d => d.toBase()); ~~~~~~~~~~ -!!! error TS2741: Property 'toBase' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2741: Property 'toBase' is missing in type '{|Base|0|}' but required in type '{|Derived|1|}'. !!! related TS2728 tests/cases/compiler/fixingTypeParametersRepeatedly2.ts:5:5: 'toBase' is declared here. !!! related TS6502 tests/cases/compiler/fixingTypeParametersRepeatedly2.ts:10:37: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/fixingTypeParametersRepeatedly2.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/fixingTypeParametersRepeatedly2.ts:4:11 // bar should type check just like foo. // The same error should be observed in both cases. diff --git a/tests/baselines/reference/for-of29.errors.txt b/tests/baselines/reference/for-of29.errors.txt index 748fcf490505a..9c068a0c45113 100644 --- a/tests/baselines/reference/for-of29.errors.txt +++ b/tests/baselines/reference/for-of29.errors.txt @@ -9,6 +9,9 @@ tests/cases/conformance/es6/for-ofStatements/for-of29.ts(5,15): error TS2322: Ty for (var v of iterableWithOptionalIterator) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ [Symbol.iterator]?(): Iterator; }' is not assignable to type 'Iterable'. +!!! error TS2322: Type '{ {|[Symbol.iterator]|0|}?(): {|Iterator|1|}; }' is not assignable to type '{|Iterable|2|}'. !!! error TS2322: Property '[Symbol.iterator]' is optional in type '{ [Symbol.iterator]?(): Iterator; }' but required in type 'Iterable'. +!!! annotated symbol 0 tests/cases/conformance/es6/for-ofStatements/for-of29.ts:2:5 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 2 /.ts/lib.es2015.iterable.d.ts:42:11 \ No newline at end of file diff --git a/tests/baselines/reference/for-of30.errors.txt b/tests/baselines/reference/for-of30.errors.txt index b0091c90b57c3..95ff4b999df78 100644 --- a/tests/baselines/reference/for-of30.errors.txt +++ b/tests/baselines/reference/for-of30.errors.txt @@ -24,9 +24,16 @@ tests/cases/conformance/es6/for-ofStatements/for-of30.ts(16,15): error TS2322: T for (var v of new StringIterator) { } ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterable'. +!!! error TS2322: Type '{|StringIterator|0|}' is not assignable to type '{|Iterable|1|}'. !!! error TS2322: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2322: Type '() => StringIterator' is not assignable to type '() => Iterator'. -!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator'. +!!! error TS2322: Type '() => {|StringIterator|2|}' is not assignable to type '() => {|Iterator|3|}'. +!!! error TS2322: Type '{|StringIterator|4|}' is not assignable to type '{|Iterator|5|}'. !!! error TS2322: Types of property 'return' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type '(value?: any) => IteratorResult'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type '(value?: any) => {|IteratorResult|6|}'. +!!! annotated symbol 0 tests/cases/conformance/es6/for-ofStatements/for-of30.ts:1:7 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:42:11 +!!! annotated symbol 2 tests/cases/conformance/es6/for-ofStatements/for-of30.ts:1:7 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 4 tests/cases/conformance/es6/for-ofStatements/for-of30.ts:1:7 +!!! annotated symbol 5 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 6 /.ts/lib.es2015.iterable.d.ts:31:11 \ No newline at end of file diff --git a/tests/baselines/reference/for-of31.errors.txt b/tests/baselines/reference/for-of31.errors.txt index 2b1a70529183b..e713ff4d8bde5 100644 --- a/tests/baselines/reference/for-of31.errors.txt +++ b/tests/baselines/reference/for-of31.errors.txt @@ -23,11 +23,21 @@ tests/cases/conformance/es6/for-ofStatements/for-of31.ts(14,15): error TS2322: T for (var v of new StringIterator) { } ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterable'. +!!! error TS2322: Type '{|StringIterator|0|}' is not assignable to type '{|Iterable|1|}'. !!! error TS2322: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2322: Type '() => StringIterator' is not assignable to type '() => Iterator'. -!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator'. +!!! error TS2322: Type '() => {|StringIterator|2|}' is not assignable to type '() => {|Iterator|3|}'. +!!! error TS2322: Type '{|StringIterator|4|}' is not assignable to type '{|Iterator|5|}'. !!! error TS2322: Types of property 'next' are incompatible. -!!! error TS2322: Type '() => { value: string; }' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2322: Property 'done' is missing in type '{ value: string; }' but required in type 'IteratorResult'. -!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:32:5: 'done' is declared here. \ No newline at end of file +!!! error TS2322: Type '() => { {|value|6|}: string; }' is not assignable to type '(value?: any) => {|IteratorResult|7|}'. +!!! error TS2322: Property 'done' is missing in type '{ {|value|8|}: string; }' but required in type '{|IteratorResult|9|}'. +!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:32:5: 'done' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/for-ofStatements/for-of31.ts:1:7 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:42:11 +!!! annotated symbol 2 tests/cases/conformance/es6/for-ofStatements/for-of31.ts:1:7 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 4 tests/cases/conformance/es6/for-ofStatements/for-of31.ts:1:7 +!!! annotated symbol 5 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 6 tests/cases/conformance/es6/for-ofStatements/for-of31.ts:5:13 +!!! annotated symbol 7 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 8 tests/cases/conformance/es6/for-ofStatements/for-of31.ts:5:13 +!!! annotated symbol 9 /.ts/lib.es2015.iterable.d.ts:31:11 \ No newline at end of file diff --git a/tests/baselines/reference/functionCall7.errors.txt b/tests/baselines/reference/functionCall7.errors.txt index 53a3c575ec314..72513269697b5 100644 --- a/tests/baselines/reference/functionCall7.errors.txt +++ b/tests/baselines/reference/functionCall7.errors.txt @@ -13,7 +13,8 @@ tests/cases/compiler/functionCall7.ts(7,1): error TS2554: Expected 1 arguments, !!! error TS2554: Expected 1 arguments, but got 2. foo(4); ~ -!!! error TS2345: Argument of type '4' is not assignable to parameter of type 'c1'. +!!! error TS2345: Argument of type '4' is not assignable to parameter of type '{|c1|0|}'. +!!! annotated symbol 0 tests/cases/compiler/functionCall7.ts:1:26 foo(); ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt index ded464661859f..dd45bdc45450c 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt +++ b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt @@ -31,7 +31,8 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain foo(1); ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'Function'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|Function|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 foo(() => { }, 1); ~ !!! error TS2554: Expected 1 arguments, but got 2. @@ -55,8 +56,9 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain var r = foo2(new Function()); ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '{|Function|0|}' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type 'Function' provides no match for the signature '(x: string): string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 var r2 = foo2((x: string[]) => x); ~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. @@ -64,8 +66,9 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain !!! error TS2345: Type 'string' is not assignable to type 'string[]'. var r6 = foo2(C); ~ -!!! error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'typeof {|C|0|}' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type 'typeof C' provides no match for the signature '(x: string): string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:11:7 var r7 = foo2(b); ~ !!! error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. @@ -73,32 +76,45 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain var r8 = foo2((x: U) => x); // no error expected var r11 = foo2((x: U, y: V) => x); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '<{|U|0|}, {|V|1|}>(x: {|U|2|}, y: {|V|3|}) => {|U|4|}' is not assignable to parameter of type '(x: string) => string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:28:17 +!!! annotated symbol 1 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:28:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:28:17 +!!! annotated symbol 3 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:28:20 +!!! annotated symbol 4 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:28:17 var r13 = foo2(C2); ~~ -!!! error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'typeof {|C2|0|}' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type 'typeof C2' provides no match for the signature '(x: string): string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:17:7 var r14 = foo2(b2); ~~ -!!! error TS2345: Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'new <{|T|0|}>(x: {|T|1|}) => {|T|2|}' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type 'new (x: T) => T' provides no match for the signature '(x: string): string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:21:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:21:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:21:16 interface F2 extends Function { foo: string; } var f2: F2; var r16 = foo2(f2); ~~ -!!! error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '{|F2|0|}' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type 'F2' provides no match for the signature '(x: string): string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:32:11 function fff(x: T, y: U) { foo2(x); ~ -!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '{|T|0|}' is not assignable to parameter of type '(x: string) => string'. !!! error TS2345: Type '() => void' is not assignable to type '(x: string) => string'. !!! error TS2345: Type 'void' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:36:14 foo2(y); ~ -!!! error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'T' is not assignable to type '(x: string) => string'. +!!! error TS2345: Argument of type '{|U|0|}' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Type '{|T|1|}' is not assignable to type '(x: string) => string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:36:38 +!!! annotated symbol 1 tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts:36:14 } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index a09e6e14769c4..4955282da3b29 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -7,6 +7,7 @@ tests/cases/compiler/functionOverloads41.ts(4,14): error TS2741: Property 'a' is function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{}]); ~~ -!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{ a: boolean; }'. +!!! error TS2741: Property 'a' is missing in type '{}' but required in type '{ {|a|0|}: boolean; }'. !!! related TS2728 tests/cases/compiler/functionOverloads41.ts:2:19: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/functionOverloads41.ts:2:19 \ No newline at end of file diff --git a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt index bc2dc17dfbc9c..6b5e44d9b2950 100644 --- a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt @@ -15,8 +15,10 @@ tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,21): error TS2322: var c: ParserFunc = parsers.raw; // ok! var d: ParserFunc = parsers.readline; // not ok ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'. +!!! error TS2322: Type '(delimiter?: string) => {|ParserFunc|0|}' is not assignable to type '{|ParserFunc|1|}'. !!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6212 tests/cases/compiler/functionSignatureAssignmentCompat1.ts:10:21: Did you mean to call this expression? +!!! annotated symbol 0 tests/cases/compiler/functionSignatureAssignmentCompat1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/functionSignatureAssignmentCompat1.ts:1:11 var e: ParserFunc = parsers.readline(); // ok \ No newline at end of file diff --git a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt index 732235157224d..a417d045043e5 100644 --- a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt +++ b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt @@ -14,9 +14,17 @@ tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts(9,1): error TS2322: f = g; ~ -!!! error TS2322: Type '() => S[]' is not assignable to type '(x: T) => T'. -!!! error TS2322: Type 'unknown[]' is not assignable to type 'T'. -!!! error TS2322: 'unknown[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '<{|S|0|}>() => {|S|1|}[]' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type 'unknown[]' is not assignable to type '{|T|5|}'. +!!! error TS2322: 'unknown[]' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:6:3 +!!! annotated symbol 1 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:6:3 +!!! annotated symbol 2 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:2:3 +!!! annotated symbol 3 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:2:3 +!!! annotated symbol 4 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:2:3 +!!! annotated symbol 5 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:2:3 +!!! annotated symbol 6 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:2:3 +!!! annotated symbol 7 tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts:2:3 var s = f("str").toUpperCase(); console.log(s); diff --git a/tests/baselines/reference/fuzzy.errors.txt b/tests/baselines/reference/fuzzy.errors.txt index b935293973e18..ff481b83a2e43 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -21,9 +21,13 @@ tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: export class C implements I { ~ -!!! error TS2420: Class 'C' incorrectly implements interface 'I'. -!!! error TS2420: Property 'alsoWorks' is missing in type 'C' but required in type 'I'. +!!! error TS2420: Class '{|C|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'alsoWorks' is missing in type '{|C|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/compiler/fuzzy.ts:4:9: 'alsoWorks' is declared here. +!!! annotated symbol 0 tests/cases/compiler/fuzzy.ts:13:18 +!!! annotated symbol 1 tests/cases/compiler/fuzzy.ts:2:22 +!!! annotated symbol 2 tests/cases/compiler/fuzzy.ts:13:18 +!!! annotated symbol 3 tests/cases/compiler/fuzzy.ts:2:22 constructor(public x:number) { } works():R { @@ -33,17 +37,24 @@ tests/cases/compiler/fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: doesntWork():R { return { anything:1, oneI:this }; ~~~~ -!!! error TS2322: Type 'this' is not assignable to type 'I'. -!!! error TS2322: Type 'C' is not assignable to type 'I'. +!!! error TS2322: Type 'this' is not assignable to type '{|I|0|}'. +!!! error TS2322: Type '{|C|1|}' is not assignable to type '{|I|2|}'. !!! related TS6500 tests/cases/compiler/fuzzy.ts:10:9: The expected type comes from property 'oneI' which is declared here on type 'R' +!!! annotated symbol 0 tests/cases/compiler/fuzzy.ts:2:22 +!!! annotated symbol 1 tests/cases/compiler/fuzzy.ts:13:18 +!!! annotated symbol 2 tests/cases/compiler/fuzzy.ts:2:22 } worksToo():R { return ({ oneI: this }); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '{ oneI: this; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'. +!!! error TS2352: Conversion of type '{ {|oneI|0|}: this; }' to type '{|R|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'anything' is missing in type '{ {|oneI|2|}: this; }' but required in type '{|R|3|}'. !!! related TS2728 tests/cases/compiler/fuzzy.ts:9:9: 'anything' is declared here. +!!! annotated symbol 0 tests/cases/compiler/fuzzy.ts:25:26 +!!! annotated symbol 1 tests/cases/compiler/fuzzy.ts:8:22 +!!! annotated symbol 2 tests/cases/compiler/fuzzy.ts:25:26 +!!! annotated symbol 3 tests/cases/compiler/fuzzy.ts:8:22 } } } diff --git a/tests/baselines/reference/generatorTypeCheck18.errors.txt b/tests/baselines/reference/generatorTypeCheck18.errors.txt index 9b856fca30e56..28e9d65e96cf3 100644 --- a/tests/baselines/reference/generatorTypeCheck18.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck18.errors.txt @@ -8,6 +8,8 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts(5,11): erro yield; yield new Baz; ~~~~~~~ -!!! error TS2741: Property 'x' is missing in type 'Baz' but required in type 'Foo'. +!!! error TS2741: Property 'x' is missing in type '{|Baz|0|}' but required in type '{|Foo|1|}'. !!! related TS2728 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts:1:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts:1:7 } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck20.errors.txt b/tests/baselines/reference/generatorTypeCheck20.errors.txt index d620e8ad48ee9..2eed834bf7719 100644 --- a/tests/baselines/reference/generatorTypeCheck20.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck20.errors.txt @@ -8,6 +8,8 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts(5,13): erro yield; yield * [new Baz]; ~~~~~~~~~ -!!! error TS2741: Property 'x' is missing in type 'Baz' but required in type 'Foo'. +!!! error TS2741: Property 'x' is missing in type '{|Baz|0|}' but required in type '{|Foo|1|}'. !!! related TS2728 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts:1:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts:1:7 } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck25.errors.txt b/tests/baselines/reference/generatorTypeCheck25.errors.txt index c3c456e805d7d..9457bd26ddb1e 100644 --- a/tests/baselines/reference/generatorTypeCheck25.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck25.errors.txt @@ -16,17 +16,52 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error class Baz { z: number } var g3: () => Iterable = function* () { ~~ -!!! error TS2322: Type '() => IterableIterator' is not assignable to type '() => Iterable'. -!!! error TS2322: Type 'IterableIterator' is not assignable to type 'Iterable'. +!!! error TS2322: Type '() => {|IterableIterator|0|}<{|Bar|1|} | {|Baz|2|}>' is not assignable to type '() => {|Iterable|3|}<{|Foo|4|}>'. +!!! error TS2322: Type '{|IterableIterator|5|}<{|Bar|6|} | {|Baz|7|}>' is not assignable to type '{|Iterable|8|}<{|Foo|9|}>'. !!! error TS2322: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2322: Type '() => IterableIterator' is not assignable to type '() => Iterator'. -!!! error TS2322: Type 'IterableIterator' is not assignable to type 'Iterator'. +!!! error TS2322: Type '() => {|IterableIterator|10|}<{|Bar|11|} | {|Baz|12|}>' is not assignable to type '() => {|Iterator|13|}<{|Foo|14|}>'. +!!! error TS2322: Type '{|IterableIterator|15|}<{|Bar|16|} | {|Baz|17|}>' is not assignable to type '{|Iterator|18|}<{|Foo|19|}>'. !!! error TS2322: Types of property 'next' are incompatible. -!!! error TS2322: Type '(value?: any) => IteratorResult' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2322: Type 'Bar | Baz' is not assignable to type 'Foo'. -!!! error TS2322: Property 'x' is missing in type 'Baz' but required in type 'Foo'. +!!! error TS2322: Type '(value?: any) => {|IteratorResult|20|}<{|Bar|21|} | {|Baz|22|}>' is not assignable to type '(value?: any) => {|IteratorResult|23|}<{|Foo|24|}>'. +!!! error TS2322: Type '{|IteratorResult|25|}<{|Bar|26|} | {|Baz|27|}>' is not assignable to type '{|IteratorResult|28|}<{|Foo|29|}>'. +!!! error TS2322: Type '{|Bar|30|} | {|Baz|31|}' is not assignable to type '{|Foo|32|}'. +!!! error TS2322: Property 'x' is missing in type '{|Baz|33|}' but required in type '{|Foo|34|}'. !!! related TS2728 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:13: 'x' is declared here. +!!! annotated symbol 0 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 1 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 2 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:42:11 +!!! annotated symbol 4 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 5 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 6 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 7 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 8 /.ts/lib.es2015.iterable.d.ts:42:11 +!!! annotated symbol 9 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 10 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 11 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 12 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 13 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 14 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 15 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 16 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 17 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 18 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 19 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 20 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 21 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 22 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 23 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 24 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 25 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 26 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 27 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 28 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 29 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 30 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:2:7 +!!! annotated symbol 31 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 32 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 +!!! annotated symbol 33 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:3:7 +!!! annotated symbol 34 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:7 yield; yield new Bar; yield new Baz; diff --git a/tests/baselines/reference/generatorTypeCheck31.errors.txt b/tests/baselines/reference/generatorTypeCheck31.errors.txt index 437b7470069b1..51ca6b96998fb 100644 --- a/tests/baselines/reference/generatorTypeCheck31.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck31.errors.txt @@ -10,6 +10,8 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts(2,11): erro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } () ~~~~~~~~ -!!! error TS2322: Type 'IterableIterator<(x: any) => any>' is not assignable to type '() => Iterable<(x: string) => number>'. +!!! error TS2322: Type '{|IterableIterator|0|}<(x: any) => any>' is not assignable to type '() => {|Iterable|1|}<(x: string) => number>'. !!! error TS2322: Type 'IterableIterator<(x: any) => any>' provides no match for the signature '(): Iterable<(x: string) => number>'. +!!! annotated symbol 0 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:42:11 } \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck6.errors.txt b/tests/baselines/reference/generatorTypeCheck6.errors.txt index 35f2cc2016dbc..2f099af21f8b3 100644 --- a/tests/baselines/reference/generatorTypeCheck6.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck6.errors.txt @@ -4,4 +4,5 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck6.ts(1,17): error ==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck6.ts (1 errors) ==== function* g1(): number { } ~~~~~~ -!!! error TS2322: Type 'IterableIterator' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '{|IterableIterator|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es2015.iterable.d.ts:46:11 \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck63.errors.txt b/tests/baselines/reference/generatorTypeCheck63.errors.txt index 2a1935fd90633..8addd0913831b 100644 --- a/tests/baselines/reference/generatorTypeCheck63.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck63.errors.txt @@ -36,10 +36,22 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): err export const Nothing: Strategy = strategy("Nothing", function* (state: State) { ~~~~~~~~ -!!! error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: StrategicState) => IterableIterator'. -!!! error TS2345: Type 'IterableIterator' is not assignable to type 'IterableIterator'. -!!! error TS2345: Type 'State | 1' is not assignable to type 'StrategicState'. +!!! error TS2345: Argument of type '(state: {|State|0|}) => {|IterableIterator|1|}<{|State|2|} | 1>' is not assignable to parameter of type '(a: {|StrategicState|3|}) => {|IterableIterator|4|}<{|StrategicState|5|}>'. +!!! error TS2345: Type '{|IterableIterator|6|}<{|State|7|} | 1>' is not assignable to type '{|IterableIterator|8|}<{|StrategicState|9|}>'. +!!! error TS2345: Type '{|State|10|} | 1' is not assignable to type '{|StrategicState|11|}'. !!! error TS2345: Type '1' has no properties in common with type 'StrategicState'. +!!! annotated symbol 0 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 2 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 3 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 +!!! annotated symbol 4 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 5 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 +!!! annotated symbol 6 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 7 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 8 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 9 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 +!!! annotated symbol 10 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 11 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 yield 1; return state; }); @@ -51,16 +63,35 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): err export const Nothing2: Strategy = strategy("Nothing", function* (state: State) { ~~~~~~~~ -!!! error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: State) => IterableIterator'. -!!! error TS2345: Type 'IterableIterator' is not assignable to type 'IterableIterator'. -!!! error TS2345: Type 'number' is not assignable to type 'State'. +!!! error TS2345: Argument of type '(state: {|State|0|}) => {|IterableIterator|1|}' is not assignable to parameter of type '(a: {|State|2|}) => {|IterableIterator|3|}<{|State|4|}>'. +!!! error TS2345: Type '{|IterableIterator|5|}' is not assignable to type '{|IterableIterator|6|}<{|State|7|}>'. +!!! error TS2345: Type 'number' is not assignable to type '{|State|8|}'. +!!! annotated symbol 0 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 2 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 4 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 5 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 6 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 7 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 8 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 return 1; }); export const Nothing3: Strategy = strategy("Nothing", function* (state: State) { ~~~~~~~~ -!!! error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: StrategicState) => IterableIterator'. -!!! error TS2345: Type 'IterableIterator' is not assignable to type 'IterableIterator'. +!!! error TS2345: Argument of type '(state: {|State|0|}) => {|IterableIterator|1|}<{|State|2|} | 1>' is not assignable to parameter of type '(a: {|StrategicState|3|}) => {|IterableIterator|4|}<{|StrategicState|5|}>'. +!!! error TS2345: Type '{|IterableIterator|6|}<{|State|7|} | 1>' is not assignable to type '{|IterableIterator|8|}<{|StrategicState|9|}>'. +!!! annotated symbol 0 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 2 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 3 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 +!!! annotated symbol 4 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 5 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 +!!! annotated symbol 6 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 7 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:20:18 +!!! annotated symbol 8 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 9 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts:1:18 yield state; return 1; }); \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck7.errors.txt b/tests/baselines/reference/generatorTypeCheck7.errors.txt index 96e226fe827be..2b61ef975232f 100644 --- a/tests/baselines/reference/generatorTypeCheck7.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck7.errors.txt @@ -7,5 +7,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts(4,17): error } function* g1(): WeirdIter { } ~~~~~~~~~ -!!! error TS2741: Property 'hello' is missing in type 'IterableIterator' but required in type 'WeirdIter'. -!!! related TS2728 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts:2:5: 'hello' is declared here. \ No newline at end of file +!!! error TS2741: Property 'hello' is missing in type '{|IterableIterator|0|}' but required in type '{|WeirdIter|1|}'. +!!! related TS2728 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts:2:5: 'hello' is declared here. +!!! annotated symbol 0 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 1 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck8.errors.txt b/tests/baselines/reference/generatorTypeCheck8.errors.txt index cedfecda60b94..b0e3430697ea5 100644 --- a/tests/baselines/reference/generatorTypeCheck8.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck8.errors.txt @@ -9,8 +9,14 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts(2,17): error interface BadGenerator extends Iterator, Iterable { } function* g3(): BadGenerator { } ~~~~~~~~~~~~ -!!! error TS2322: Type 'IterableIterator' is not assignable to type 'BadGenerator'. +!!! error TS2322: Type '{|IterableIterator|0|}' is not assignable to type '{|BadGenerator|1|}'. !!! error TS2322: Types of property 'next' are incompatible. -!!! error TS2322: Type '(value?: any) => IteratorResult' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '(value?: any) => {|IteratorResult|2|}' is not assignable to type '(value?: any) => {|IteratorResult|3|}'. +!!! error TS2322: Type '{|IteratorResult|4|}' is not assignable to type '{|IteratorResult|5|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es2015.iterable.d.ts:46:11 +!!! annotated symbol 1 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts:1:11 +!!! annotated symbol 2 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 4 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 5 /.ts/lib.es2015.iterable.d.ts:31:11 \ No newline at end of file diff --git a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.errors.txt b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.errors.txt index 9e9a7e9505d05..63a1e4d2c8fc0 100644 --- a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.errors.txt +++ b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.errors.txt @@ -21,9 +21,13 @@ tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts(16,31): error TS2 // Ideally, we would not have a generic signature here, because it should be instantiated with {} during inferential typing _.all([true, 1, null, 'yes'], _.identity); ~~~~~~~~~~ -!!! error TS2345: Argument of type '(value: T) => T' is not assignable to parameter of type 'Iterator'. +!!! error TS2345: Argument of type '<{|T|0|}>(value: {|T|1|}) => {|T|2|}' is not assignable to parameter of type '{|Iterator|3|}'. !!! error TS2345: Type 'string | number | boolean' is not assignable to type 'boolean'. !!! error TS2345: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts:8:18 +!!! annotated symbol 1 tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts:8:18 +!!! annotated symbol 2 tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts:8:18 +!!! annotated symbol 3 tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts:2:22 // Ok, because fixing makes us infer boolean for T _.all([true], _.identity); diff --git a/tests/baselines/reference/genericArrayExtenstions.errors.txt b/tests/baselines/reference/genericArrayExtenstions.errors.txt index f93456cf4dfdf..e3640e49f4e1b 100644 --- a/tests/baselines/reference/genericArrayExtenstions.errors.txt +++ b/tests/baselines/reference/genericArrayExtenstions.errors.txt @@ -5,8 +5,11 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'Obse ==== tests/cases/compiler/genericArrayExtenstions.ts (1 errors) ==== export declare class ObservableArray implements Array { // MS.Entertainment.ObservableArray ~~~~~~~~~~~~~~~ -!!! error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. +!!! error TS2420: Class '{|ObservableArray|0|}<{|T|1|}>' incorrectly implements interface '{|T|2|}[]'. !!! error TS2420: Type 'ObservableArray' is missing the following properties from type 'T[]': length, pop, push, join, and 15 more. +!!! annotated symbol 0 tests/cases/compiler/genericArrayExtenstions.ts:1:22 +!!! annotated symbol 1 tests/cases/compiler/genericArrayExtenstions.ts:1:38 +!!! annotated symbol 2 tests/cases/compiler/genericArrayExtenstions.ts:1:38 concat(...items: U[]): T[]; concat(...items: T[]): T[]; } diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt index b2c6aa42013d9..d832e936a55d8 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt @@ -18,17 +18,65 @@ tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts(5,1): error x1 = x2; ~~ -!!! error TS2322: Type '(x: T, z: U) => void' is not assignable to type '(x: T, z: U) => void'. +!!! error TS2322: Type '<{|T|0|}, {|U|1|} extends { {|a|2|}: {|T|3|}; {|b|4|}: number; }>(x: {|T|5|}, z: {|U|6|}) => void' is not assignable to type '<{|T|7|}, {|U|8|} extends { {|a|9|}: {|T|10|}; {|b|11|}: string; }>(x: {|T|12|}, z: {|U|13|}) => void'. !!! error TS2322: Types of parameters 'z' and 'z' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type '{ a: T; b: number; }'. -!!! error TS2322: Type '{ a: T; b: string; }' is not assignable to type '{ a: T; b: number; }'. +!!! error TS2322: Type '{|U|14|}' is not assignable to type '{ {|a|15|}: {|T|16|}; {|b|17|}: number; }'. +!!! error TS2322: Type '{ {|a|18|}: {|T|19|}; {|b|20|}: string; }' is not assignable to type '{ {|a|21|}: {|T|22|}; {|b|23|}: number; }'. !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 1 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:27 +!!! annotated symbol 2 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:39 +!!! annotated symbol 3 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 4 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:45 +!!! annotated symbol 5 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 6 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:27 +!!! annotated symbol 7 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 8 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:27 +!!! annotated symbol 9 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:39 +!!! annotated symbol 10 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 11 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:45 +!!! annotated symbol 12 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 13 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:27 +!!! annotated symbol 14 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:27 +!!! annotated symbol 15 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:39 +!!! annotated symbol 16 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 17 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:45 +!!! annotated symbol 18 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:39 +!!! annotated symbol 19 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 20 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:45 +!!! annotated symbol 21 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:39 +!!! annotated symbol 22 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 23 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:45 x2 = x1; ~~ -!!! error TS2322: Type '(x: T, z: U) => void' is not assignable to type '(x: T, z: U) => void'. +!!! error TS2322: Type '<{|T|0|}, {|U|1|} extends { {|a|2|}: {|T|3|}; {|b|4|}: string; }>(x: {|T|5|}, z: {|U|6|}) => void' is not assignable to type '<{|T|7|}, {|U|8|} extends { {|a|9|}: {|T|10|}; {|b|11|}: number; }>(x: {|T|12|}, z: {|U|13|}) => void'. !!! error TS2322: Types of parameters 'z' and 'z' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type '{ a: T; b: string; }'. -!!! error TS2322: Type '{ a: T; b: number; }' is not assignable to type '{ a: T; b: string; }'. +!!! error TS2322: Type '{|U|14|}' is not assignable to type '{ {|a|15|}: {|T|16|}; {|b|17|}: string; }'. +!!! error TS2322: Type '{ {|a|18|}: {|T|19|}; {|b|20|}: number; }' is not assignable to type '{ {|a|21|}: {|T|22|}; {|b|23|}: string; }'. !!! error TS2322: Types of property 'b' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 1 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:27 +!!! annotated symbol 2 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:39 +!!! annotated symbol 3 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 4 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:45 +!!! annotated symbol 5 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:24 +!!! annotated symbol 6 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:27 +!!! annotated symbol 7 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 8 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:27 +!!! annotated symbol 9 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:39 +!!! annotated symbol 10 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 11 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:45 +!!! annotated symbol 12 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 13 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:27 +!!! annotated symbol 14 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:27 +!!! annotated symbol 15 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:39 +!!! annotated symbol 16 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 17 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:45 +!!! annotated symbol 18 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:39 +!!! annotated symbol 19 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 20 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:45 +!!! annotated symbol 21 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:39 +!!! annotated symbol 22 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:2:24 +!!! annotated symbol 23 tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts:1:45 \ No newline at end of file diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt index cd035498740d1..5afde2995883d 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt @@ -28,28 +28,44 @@ tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS23 var z = { x: new A() }; var a1: I = { x: new A() }; ~ -!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|Comparable|1|}'. !!! error TS2322: Types of property 'compareTo' are incompatible. !!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number'. !!! error TS2322: Types of parameters 'other' and 'other' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. !!! related TS6500 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:5:5: The expected type comes from property 'x' which is declared here on type 'I' +!!! annotated symbol 0 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:1:11 var a2: I = function (): { x: A } { ~~ -!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ {|x|0|}: {|A|1|}; }' is not assignable to type '{|I|2|}'. !!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type '{|A|3|}' is not assignable to type '{|Comparable|4|}'. +!!! annotated symbol 0 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:13:36 +!!! annotated symbol 1 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:10:7 +!!! annotated symbol 2 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:4:11 +!!! annotated symbol 3 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:10:7 +!!! annotated symbol 4 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:1:11 var z = { x: new A() }; return z; } (); var a3: I = z; ~~ -!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I'. +!!! error TS2322: Type '{ {|x|0|}: {|A|1|}; }' is not assignable to type '{|I|2|}'. !!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type '{|A|3|}' is not assignable to type '{|Comparable|4|}'. +!!! annotated symbol 0 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:10:7 +!!! annotated symbol 2 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:4:11 +!!! annotated symbol 3 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:10:7 +!!! annotated symbol 4 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:1:11 var a4: I = >z; ~~ -!!! error TS2322: Type 'K' is not assignable to type 'I'. +!!! error TS2322: Type '{|K|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'A' is not assignable to type 'Comparable'. +!!! error TS2322: Type '{|A|2|}' is not assignable to type '{|Comparable|3|}'. +!!! annotated symbol 0 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:7:11 +!!! annotated symbol 1 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:4:11 +!!! annotated symbol 2 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:10:7 +!!! annotated symbol 3 tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt index 9f728e554a364..ee655741da56b 100644 --- a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt +++ b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt @@ -37,9 +37,14 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (n: number): {|Promise|0|}; (s: string): {|Promise|1|}; }' is not assignable to parameter of type '(x: number) => {|Promise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|Promise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:15:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:15:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:15:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:15:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:15:15 } ////////////////////////////////////// @@ -70,9 +75,14 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (n: number): {|Promise|0|}; (s: string): {|Promise|1|}; }' is not assignable to parameter of type '(x: number) => {|Promise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|Promise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:43:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:43:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:43:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:43:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:43:15 } ////////////////////////////////////// @@ -90,9 +100,14 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (n: number): {|Promise|0|}; (s: string): {|Promise|1|}; }' is not assignable to parameter of type '(x: number) => {|Promise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|Promise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:58:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:58:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:58:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:58:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:58:15 } ////////////////////////////////////// @@ -110,8 +125,14 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (n: number): {|Promise|0|}; (s: string): {|Promise|1|}; (b: boolean): {|Promise|2|}; }' is not assignable to parameter of type '(x: number) => {|Promise|3|}'. +!!! error TS2345: Type '{|Promise|4|}' is not assignable to type '{|Promise|5|}'. !!! error TS2345: Type 'number' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:74:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:74:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:74:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:74:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:74:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:74:15 } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt index 6982031c9bab2..b3ae3c7e2be4c 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt @@ -14,5 +14,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon var r3 = foo(new Object()); // {} var r4 = foo(1); // error ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'Date'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|Date|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 var r5 = foo(new Date()); // no error \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt index fe2d76b23de89..0539bf90f7068 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt @@ -19,15 +19,25 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon var arg2: { cb: new (x: T, y: T) => string }; var r2 = foo(arg2); // error ~~~~ -!!! error TS2345: Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: unknown) => string; }'. +!!! error TS2345: Argument of type '{ {|cb|0|}: new <{|T|1|}>(x: {|T|2|}, y: {|T|3|}) => string; }' is not assignable to parameter of type '{ {|cb|4|}: new (t: unknown) => string; }'. !!! error TS2345: Types of property 'cb' are incompatible. -!!! error TS2345: Type 'new (x: T, y: T) => string' is not assignable to type 'new (t: unknown) => string'. +!!! error TS2345: Type 'new <{|T|5|}>(x: {|T|6|}, y: {|T|7|}) => string' is not assignable to type 'new (t: unknown) => string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:13 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:22 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:22 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:22 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:3:27 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:22 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:22 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:10:22 var arg3: { cb: new (x: string, y: number) => string }; var r3 = foo(arg3); // error ~~~~ -!!! error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. +!!! error TS2345: Argument of type '{ {|cb|0|}: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ {|cb|1|}: new (t: string) => string; }'. !!! error TS2345: Types of property 'cb' are incompatible. !!! error TS2345: Type 'new (x: string, y: number) => string' is not assignable to type 'new (t: string) => string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:12:13 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts:3:27 function foo2(arg: { cb: new(t: T, t2: T) => U }) { return new arg.cb(null, null); diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt index 16f2e47a1b951..6d3566bd768eb 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt @@ -51,24 +51,36 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun function other(t: T, u: U) { var r10 = foo2(1, (x: T) => ''); // error ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. +!!! error TS2345: Argument of type '(x: {|T|0|}) => string' is not assignable to parameter of type '(a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. -!!! error TS2345: Type '1' is not assignable to type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Type '1' is not assignable to type '{|T|1|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 var r10 = foo2(1, (x) => ''); // string var r11 = foo3(1, (x: T) => '', ''); // error ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. +!!! error TS2345: Argument of type '(x: {|T|0|}) => string' is not assignable to parameter of type '(a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. -!!! error TS2345: Type '1' is not assignable to type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Type '1' is not assignable to type '{|T|1|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 var r11b = foo3(1, (x: T) => '', 1); // error ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. +!!! error TS2345: Argument of type '(x: {|T|0|}) => string' is not assignable to parameter of type '(a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. -!!! error TS2345: Type '1' is not assignable to type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Type '1' is not assignable to type '{|T|1|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts:29:16 var r12 = foo3(1, function (a) { return '' }, 1); // error ~~~~~~~~ !!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'. diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt index a46ee6c0f8e48..b330918f883bc 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt @@ -37,9 +37,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r4 = foo2(1, i2); // error ~~ -!!! error TS2345: Argument of type 'I2' is not assignable to parameter of type 'new (a: 1) => string'. +!!! error TS2345: Argument of type '{|I2|0|}' is not assignable to parameter of type 'new (a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. !!! error TS2345: Type '1' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts:11:11 var r4b = foo2(1, a); // any var r5 = foo2(1, i); // any var r6 = foo2('', i2); // string @@ -52,7 +53,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r7b = foo3(null, a, ''); // any var r8 = foo3(1, i2, 1); // error ~~ -!!! error TS2345: Argument of type 'I2' is not assignable to parameter of type 'new (a: 1) => string'. +!!! error TS2345: Argument of type '{|I2|0|}' is not assignable to parameter of type 'new (a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. !!! error TS2345: Type '1' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts:11:11 var r9 = foo3('', i2, ''); // string \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt index 9af10d79a7d3d..ee8f5a2b8b5ae 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt @@ -14,8 +14,11 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun // more args not allowed var r2 = foo({ cb: (x: T, y: T) => '' }); // error ~~ -!!! error TS2322: Type '(x: T, y: T) => string' is not assignable to type '(t: unknown) => string'. +!!! error TS2322: Type '<{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => string' is not assignable to type '(t: unknown) => string'. !!! related TS6500 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts:3:27: The expected type comes from property 'cb' which is declared here on type '{ cb: (t: unknown) => string; }' +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts:10:21 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts:10:21 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts:10:21 var r3 = foo({ cb: (x: string, y: number) => '' }); // error ~~ !!! error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt index c308e16c224c0..55c767c30f719 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt @@ -39,11 +39,18 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen // BUG 835518 var r9 = r7(new Date()); // should be ok ~~~~~~~~~~ -!!! error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. -!!! error TS2345: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2345: Argument of type '{|Date|0|}' is not assignable to parameter of type '{|T|1|}'. +!!! error TS2345: '{|Date|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:12:21 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:12:21 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:12:21 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 var r10 = r7(1); // error ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|T|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:12:21 } function foo2(a: (x: T) => T, b: (x: T) => T) { @@ -54,9 +61,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen function other3(x: T) { var r7 = foo2((a: T) => a, (b: T) => b); // error ~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. +!!! error TS2345: Argument of type '(a: {|T|0|}) => {|T|1|}' is not assignable to parameter of type '(x: {|Date|2|}) => {|Date|3|}'. !!! error TS2345: Types of parameters 'a' and 'x' are incompatible. -!!! error TS2345: Type 'Date' is not assignable to type 'T'. +!!! error TS2345: Type '{|Date|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:24:21 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:24:21 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:24:21 var r7b = foo2((a) => a, (b) => b); // valid, T is inferred to be Date } @@ -70,8 +83,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ~~~ -!!! error TS2322: Type 'F' is not assignable to type 'E'. +!!! error TS2322: Type '{|F|0|}' is not assignable to type '{|E|1|}'. !!! related TS6502 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:32:47: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:30:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:29:10 } module TU { @@ -86,11 +101,18 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var r7 = foo((a: T) => a, (b: T) => b); var r9 = r7(new Date()); ~~~~~~~~~~ -!!! error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. -!!! error TS2345: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2345: Argument of type '{|Date|0|}' is not assignable to parameter of type '{|T|1|}'. +!!! error TS2345: '{|Date|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:48:21 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:48:21 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:48:21 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 var r10 = r7(1); ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|T|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:48:21 } function foo2(a: (x: T) => T, b: (x: U) => U) { @@ -101,9 +123,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen function other3(x: T) { var r7 = foo2((a: T) => a, (b: T) => b); ~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. +!!! error TS2345: Argument of type '(a: {|T|0|}) => {|T|1|}' is not assignable to parameter of type '(x: {|Date|2|}) => {|Date|3|}'. !!! error TS2345: Types of parameters 'a' and 'x' are incompatible. -!!! error TS2345: Type 'Date' is not assignable to type 'T'. +!!! error TS2345: Type '{|Date|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:59:21 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:59:21 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts:59:21 var r7b = foo2((a) => a, (b) => b); } diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt index 4c29b010295b6..cf49557488f16 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt @@ -39,10 +39,14 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var x: (a: string) => boolean; var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a1: (y: string) => string) => (n: Object) => number' is not assignable to parameter of type '(x: (a: string) => boolean) => (n: Object) => number'. +!!! error TS2345: Argument of type '(a1: (y: string) => string) => (n: {|Object|0|}) => number' is not assignable to parameter of type '(x: (a: string) => boolean) => (n: {|Object|1|}) => number'. !!! error TS2345: Types of parameters 'a1' and 'x' are incompatible. !!! error TS2345: Type 'boolean' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a2: (z: string) => boolean) => number' is not assignable to parameter of type '(x: (z: string) => boolean) => (n: Object) => number'. -!!! error TS2345: Type 'number' is not assignable to type '(n: Object) => number'. \ No newline at end of file +!!! error TS2345: Argument of type '(a2: (z: string) => boolean) => number' is not assignable to parameter of type '(x: (z: string) => boolean) => (n: {|Object|0|}) => number'. +!!! error TS2345: Type 'number' is not assignable to type '(n: {|Object|1|}) => number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt index a845fd543e916..9ea73743de6c0 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt @@ -25,7 +25,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var d1 = new X(); var r = foo(c1, d1); // error ~~ -!!! error TS2345: Argument of type 'X' is not assignable to parameter of type 'X'. -!!! error TS2345: Type 'D' is not assignable to type 'C'. +!!! error TS2345: Argument of type '{|X|0|}<{|D|1|}>' is not assignable to parameter of type '{|X|2|}<{|C|3|}>'. +!!! error TS2345: Type '{|D|4|}' is not assignable to type '{|C|5|}'. !!! error TS2345: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts:5:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts:9:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts:1:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts:5:7 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts:1:7 var r2 = foo(c1, c1); // ok \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt index 40fc743bbe039..ade6c35bba98b 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt @@ -21,9 +21,11 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r1 = f({ x: new Derived(), y: new Derived2() }); // error because neither is supertype of the other ~ -!!! error TS2741: Property 'y' is missing in type 'Derived2' but required in type 'Derived'. +!!! error TS2741: Property 'y' is missing in type '{|Derived2|0|}' but required in type '{|Derived|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts:7:5: 'y' is declared here. !!! related TS6500 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts:13:39: The expected type comes from property 'y' which is declared here on type '{ x: Derived; y: Derived; }' +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts:6:7 function f2(a: U) { var r: T; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt index 1f4db6be557b7..dd64f2235f785 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt @@ -25,9 +25,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r = foo(c, d); var r2 = foo(d, c); // error because C does not extend D ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'D'. -!!! error TS2345: Property 'y' is missing in type 'C' but required in type 'D'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type '{|D|1|}'. +!!! error TS2345: Property 'y' is missing in type '{|C|2|}' but required in type '{|D|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:9:5: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:7:7 var r3 = foo(c, { x: '', foo: c }); var r4 = foo(null, null); var r5 = foo({}, null); @@ -40,8 +44,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r4 = foo(c, d); var r5 = foo(c, d); // error ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. -!!! error TS2345: 'C' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type '{|T|1|}'. +!!! error TS2345: '{|C|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:28:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:28:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints4.ts:28:16 } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt index df3b228bf059d..e944622e4a8f4 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt @@ -26,9 +26,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var d: D; var r2 = foo(d, c); // the constraints are self-referencing, no downstream error ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'D'. -!!! error TS2345: Property 'y' is missing in type 'C' but required in type 'D'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type '{|D|1|}'. +!!! error TS2345: Property 'y' is missing in type '{|C|2|}' but required in type '{|D|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:9:5: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:7:7 var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no downstream error ~~~~~~~~~ !!! error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. @@ -37,7 +41,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj function other() { var r5 = foo(c, d); // error ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. -!!! error TS2345: 'C' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type '{|T|1|}'. +!!! error TS2345: '{|C|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:21:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:21:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts:21:16 } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt index 1e3e2466ed3f0..1f3aa260329d4 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt @@ -15,17 +15,36 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericC function foo2(x: T = undefined) { return x; } // ok function foo3(x: T = 1) { } // error ~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type 'T'. -!!! error TS2322: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'. +!!! error TS2322: Type '1' is not assignable to type '{|T|0|}'. +!!! error TS2322: '1' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{|Number|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:5:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:5:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:5:15 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:542:11 function foo4(x: T, y: U = x) { } // error ~~~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:6:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:6:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:6:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:6:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:6:18 function foo5(x: U, y: T = x) { } // ok function foo6(x: T, y: U, z: V = y) { } // error ~~~~~~~~ -!!! error TS2322: Type 'U' is not assignable to type 'V'. -!!! error TS2322: 'U' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T' is not assignable to type 'V'. -!!! error TS2322: 'T' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|5|}' is not assignable to type '{|V|6|}'. +!!! error TS2322: '{|T|7|}' is assignable to the constraint of type '{|V|8|}', but '{|V|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:18 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:31 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:31 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:15 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:31 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:31 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts:8:31 function foo7(x: V, y: U = x) { } // should be ok \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt index 2e52a9d482c69..29f6b7909a5a9 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt @@ -34,7 +34,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve var b: { new (x: T, y: T): string }; var r10 = foo6(b); // error ~ -!!! error TS2345: Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: unknown): string; new (x: unknown, y?: unknown): string; }'. +!!! error TS2345: Argument of type 'new <{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => string' is not assignable to parameter of type '{ new (x: unknown): string; new (x: unknown, y?: unknown): string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts:30:19 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts:30:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts:30:19 function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt index 2e5b19bcf1b50..e2a07a61e565b 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt @@ -31,7 +31,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve var r10 = foo6((x: T, y: T) => ''); // error ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: unknown): string; (x: unknown, y?: unknown): string; }'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, y: {|T|2|}) => string' is not assignable to parameter of type '{ (x: unknown): string; (x: unknown, y?: unknown): string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts:28:21 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts:28:21 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts:28:21 function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithTupleType.errors.txt b/tests/baselines/reference/genericCallWithTupleType.errors.txt index 0cc4a4986db31..7c7c77f0343f8 100644 --- a/tests/baselines/reference/genericCallWithTupleType.errors.txt +++ b/tests/baselines/reference/genericCallWithTupleType.errors.txt @@ -34,7 +34,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup !!! error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. i1.tuple1[3] = { a: "string" }; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: string; }' is not assignable to type 'undefined'. +!!! error TS2322: Type '{ {|a|0|}: string; }' is not assignable to type 'undefined'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts:14:18 ~ !!! error TS2493: Tuple type '[string, number]' of length '2' has no element at index '3'. var e4 = i1.tuple1[3]; // {} diff --git a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt index 26f97751caaf8..6f4a678193220 100644 --- a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt +++ b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt @@ -17,8 +17,11 @@ tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(14,17 !!! error TS2558: Expected 0 type arguments, but got 1. var r2 = f(1); ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|T|0|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:14 var r3 = f(null); ~~~ !!! error TS2558: Expected 0 type arguments, but got 1. @@ -35,8 +38,13 @@ tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(14,17 var r12 = f(y); ~ -!!! error TS2345: Argument of type 'U' is not assignable to parameter of type 'T'. -!!! error TS2345: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Argument of type '{|U|0|}' is not assignable to parameter of type '{|T|1|}'. +!!! error TS2345: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:17 +!!! annotated symbol 1 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:17 +!!! annotated symbol 3 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:14 +!!! annotated symbol 4 tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts:1:14 var r22 = f(y); ~~~~~~ !!! error TS2558: Expected 0 type arguments, but got 1. diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt index 5366fbc9aeb32..ebc2eeeb881f5 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt @@ -73,24 +73,36 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu function other(t: T, u: U) { var r10 = c.foo2(1, (x: T) => ''); // error ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. +!!! error TS2345: Argument of type '(x: {|T|0|}) => string' is not assignable to parameter of type '(a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. -!!! error TS2345: Type '1' is not assignable to type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Type '1' is not assignable to type '{|T|1|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 var r10 = c.foo2(1, (x) => ''); // string var r11 = c3.foo3(1, (x: T) => '', ''); // error ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. +!!! error TS2345: Argument of type '(x: {|T|0|}) => string' is not assignable to parameter of type '(a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. -!!! error TS2345: Type '1' is not assignable to type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Type '1' is not assignable to type '{|T|1|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 var r11b = c3.foo3(1, (x: T) => '', 1); // error ~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'. +!!! error TS2345: Argument of type '(x: {|T|0|}) => string' is not assignable to parameter of type '(a: 1) => string'. !!! error TS2345: Types of parameters 'x' and 'a' are incompatible. -!!! error TS2345: Type '1' is not assignable to type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Type '1' is not assignable to type '{|T|1|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts:56:20 var r12 = c3.foo3(1, function (a) { return '' }, 1); // error ~~~~~~~~ !!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'. diff --git a/tests/baselines/reference/genericCloneReturnTypes.errors.txt b/tests/baselines/reference/genericCloneReturnTypes.errors.txt index 0e54ebc02cff2..7b0fe87e17233 100644 --- a/tests/baselines/reference/genericCloneReturnTypes.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes.errors.txt @@ -29,5 +29,7 @@ tests/cases/compiler/genericCloneReturnTypes.ts(25,1): error TS2322: Type 'Bar' is not assignable to type 'Bar'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '{|Bar|0|}' is not assignable to type '{|Bar|1|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericCloneReturnTypes.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericCloneReturnTypes.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt index 1ac5a86207577..5569d0df79143 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt @@ -19,5 +19,7 @@ tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2322: Type 'MyLi var c: MyList = a.clone(); // bug was there was an error on this line var d: MyList = a.clone(); // error ~ -!!! error TS2322: Type 'MyList' is not assignable to type 'MyList'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '{|MyList|0|}' is not assignable to type '{|MyList|1|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericCloneReturnTypes2.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericCloneReturnTypes2.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericCombinators2.errors.txt b/tests/baselines/reference/genericCombinators2.errors.txt index 5be717109c851..563df274aaf12 100644 --- a/tests/baselines/reference/genericCombinators2.errors.txt +++ b/tests/baselines/reference/genericCombinators2.errors.txt @@ -21,9 +21,13 @@ tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of ty var rf1 = (x: number, y: string) => { return x.toFixed() }; var r5a = _.map(c2, (x, y) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. -!!! error TS2345: Type 'string' is not assignable to type 'Date'. +!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => {|Date|0|}'. +!!! error TS2345: Type 'string' is not assignable to type '{|Date|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 var r5b = _.map(c2, rf1); ~~~ -!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. -!!! error TS2345: Type 'string' is not assignable to type 'Date'. \ No newline at end of file +!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => {|Date|0|}'. +!!! error TS2345: Type 'string' is not assignable to type '{|Date|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint2.errors.txt b/tests/baselines/reference/genericConstraint2.errors.txt index 8db18fc3e54b5..17abca3db4366 100644 --- a/tests/baselines/reference/genericConstraint2.errors.txt +++ b/tests/baselines/reference/genericConstraint2.errors.txt @@ -17,9 +17,13 @@ tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'Comparabl class ComparableString implements Comparable{ ~~~~~~~~~~~~~~~~ -!!! error TS2420: Class 'ComparableString' incorrectly implements interface 'Comparable'. -!!! error TS2420: Property 'comparer' is missing in type 'ComparableString' but required in type 'Comparable'. +!!! error TS2420: Class '{|ComparableString|0|}' incorrectly implements interface '{|Comparable|1|}'. +!!! error TS2420: Property 'comparer' is missing in type '{|ComparableString|2|}' but required in type '{|Comparable|3|}'. !!! related TS2728 tests/cases/compiler/genericConstraint2.ts:2:5: 'comparer' is declared here. +!!! annotated symbol 0 tests/cases/compiler/genericConstraint2.ts:11:7 +!!! annotated symbol 1 tests/cases/compiler/genericConstraint2.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/genericConstraint2.ts:11:7 +!!! annotated symbol 3 tests/cases/compiler/genericConstraint2.ts:1:11 constructor(public currentValue: string) { } localeCompare(other) { @@ -31,6 +35,12 @@ tests/cases/compiler/genericConstraint2.ts(21,17): error TS2344: Type 'Comparabl var b = new ComparableString("b"); var c = compare(a, b); ~~~~~~~~~~~~~~~~ -!!! error TS2344: Type 'ComparableString' does not satisfy the constraint 'Comparable'. -!!! error TS2344: Property 'comparer' is missing in type 'ComparableString' but required in type 'Comparable'. -!!! related TS2728 tests/cases/compiler/genericConstraint2.ts:2:5: 'comparer' is declared here. \ No newline at end of file +!!! error TS2344: Type '{|ComparableString|0|}' does not satisfy the constraint '{|Comparable|1|}<{|ComparableString|2|}>'. +!!! error TS2344: Property 'comparer' is missing in type '{|ComparableString|3|}' but required in type '{|Comparable|4|}<{|ComparableString|5|}>'. +!!! related TS2728 tests/cases/compiler/genericConstraint2.ts:2:5: 'comparer' is declared here. +!!! annotated symbol 0 tests/cases/compiler/genericConstraint2.ts:11:7 +!!! annotated symbol 1 tests/cases/compiler/genericConstraint2.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/genericConstraint2.ts:11:7 +!!! annotated symbol 3 tests/cases/compiler/genericConstraint2.ts:11:7 +!!! annotated symbol 4 tests/cases/compiler/genericConstraint2.ts:1:11 +!!! annotated symbol 5 tests/cases/compiler/genericConstraint2.ts:11:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericDefaultsErrors.errors.txt b/tests/baselines/reference/genericDefaultsErrors.errors.txt index 91d4d608f1aef..97d8f9691f6ec 100644 --- a/tests/baselines/reference/genericDefaultsErrors.errors.txt +++ b/tests/baselines/reference/genericDefaultsErrors.errors.txt @@ -34,15 +34,20 @@ tests/cases/compiler/genericDefaultsErrors.ts(42,29): error TS2716: Type paramet !!! error TS2344: Type 'number' does not satisfy the constraint 'string'. declare function f04(): void; // error ~ -!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type '{|T|0|}' does not satisfy the constraint 'number'. !!! error TS2344: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericDefaultsErrors.ts:4:22 declare function f05(): void; // error ~ -!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type '{|T|0|}' does not satisfy the constraint 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericDefaultsErrors.ts:5:22 declare function f06(): void; // error ~~~~~~ -!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. -!!! error TS2344: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2344: Type 'number' does not satisfy the constraint '{|T|0|}'. +!!! error TS2344: 'number' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericDefaultsErrors.ts:6:22 +!!! annotated symbol 1 tests/cases/compiler/genericDefaultsErrors.ts:6:22 +!!! annotated symbol 2 tests/cases/compiler/genericDefaultsErrors.ts:6:22 declare function f11(): void; f11(); // ok @@ -83,15 +88,20 @@ tests/cases/compiler/genericDefaultsErrors.ts(42,29): error TS2716: Type paramet !!! error TS2344: Type 'number' does not satisfy the constraint 'string'. interface i06 { } // error ~ -!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type '{|T|0|}' does not satisfy the constraint 'number'. !!! error TS2344: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericDefaultsErrors.ts:27:15 interface i07 { } // error ~ -!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type '{|T|0|}' does not satisfy the constraint 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericDefaultsErrors.ts:28:15 interface i08 { } // error ~~~~~~ -!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. -!!! error TS2344: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2344: Type 'number' does not satisfy the constraint '{|T|0|}'. +!!! error TS2344: 'number' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericDefaultsErrors.ts:29:15 +!!! annotated symbol 1 tests/cases/compiler/genericDefaultsErrors.ts:29:15 +!!! annotated symbol 2 tests/cases/compiler/genericDefaultsErrors.ts:29:15 interface i09 { } type i09t00 = i09; // error diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt index 4ae63b6fc8e60..7d5d5a0b2a770 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt @@ -16,7 +16,9 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts(11,1): error TS232 var y: B; x = y; // error ~ -!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|A|1|}'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/genericDerivedTypeWithSpecializedBase.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt index 1e5e3b6ee9676..ea49aa14fb615 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt @@ -16,7 +16,13 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS23 var y: B; x = y; // error ~ -!!! error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|A|1|}<{ {|length|2|}: number; {|foo|3|}: number; }>'. !!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type 'string' is not assignable to type '{ length: number; foo: number; }'. +!!! error TS2322: Type 'string' is not assignable to type '{ {|length|4|}: number; {|foo|5|}: number; }'. +!!! annotated symbol 0 tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts:9:12 +!!! annotated symbol 3 tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts:9:28 +!!! annotated symbol 4 tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts:9:12 +!!! annotated symbol 5 tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts:9:28 \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt b/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt index 4c15da868c5ac..ddafaf230d484 100644 --- a/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt +++ b/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt @@ -11,9 +11,17 @@ tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts(6,1): err var g : { () : S[]; }; f = g; ~ -!!! error TS2322: Type '() => S[]' is not assignable to type '(x: T) => T'. -!!! error TS2322: Type 'unknown[]' is not assignable to type 'T'. -!!! error TS2322: 'unknown[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '<{|S|0|}>() => {|S|1|}[]' is not assignable to type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}'. +!!! error TS2322: Type 'unknown[]' is not assignable to type '{|T|5|}'. +!!! error TS2322: 'unknown[]' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:5:12 +!!! annotated symbol 1 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:5:12 +!!! annotated symbol 2 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:3:12 +!!! annotated symbol 3 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:3:12 +!!! annotated symbol 4 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:3:12 +!!! annotated symbol 5 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:3:12 +!!! annotated symbol 6 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:3:12 +!!! annotated symbol 7 tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts:3:12 var s = f("str").toUpperCase(); diff --git a/tests/baselines/reference/genericFunctionInference1.errors.txt b/tests/baselines/reference/genericFunctionInference1.errors.txt index 5c910e7ff5d26..eb62926a97926 100644 --- a/tests/baselines/reference/genericFunctionInference1.errors.txt +++ b/tests/baselines/reference/genericFunctionInference1.errors.txt @@ -139,8 +139,13 @@ tests/cases/compiler/genericFunctionInference1.ts(135,14): error TS2345: Argumen toKeys(data, keyOf); // Error ~~~~~ -!!! error TS2345: Argument of type '(value: { key: a; }) => a' is not assignable to parameter of type '(value: Data) => string'. +!!! error TS2345: Argument of type '<{|a|0|}>(value: { {|key|1|}: {|a|2|}; }) => {|a|3|}' is not assignable to parameter of type '(value: {|Data|4|}) => string'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericFunctionInference1.ts:123:23 +!!! annotated symbol 1 tests/cases/compiler/genericFunctionInference1.ts:123:35 +!!! annotated symbol 2 tests/cases/compiler/genericFunctionInference1.ts:123:23 +!!! annotated symbol 3 tests/cases/compiler/genericFunctionInference1.ts:123:23 +!!! annotated symbol 4 tests/cases/compiler/genericFunctionInference1.ts:126:18 // #9366 diff --git a/tests/baselines/reference/genericGetter3.errors.txt b/tests/baselines/reference/genericGetter3.errors.txt index 24b44af28eea1..82871351f69fa 100644 --- a/tests/baselines/reference/genericGetter3.errors.txt +++ b/tests/baselines/reference/genericGetter3.errors.txt @@ -17,4 +17,5 @@ tests/cases/compiler/genericGetter3.ts(11,5): error TS2322: Type 'A' is var c = new C(); var r: string = c.x; ~ -!!! error TS2322: Type 'A' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|A|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericGetter3.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericImplements.errors.txt b/tests/baselines/reference/genericImplements.errors.txt index fff51884f1091..6a2d01498330e 100644 --- a/tests/baselines/reference/genericImplements.errors.txt +++ b/tests/baselines/reference/genericImplements.errors.txt @@ -15,8 +15,16 @@ tests/cases/compiler/genericImplements.ts(9,5): error TS2416: Property 'f' in ty f(): T { return undefined; } ~ !!! error TS2416: Property 'f' in type 'X' is not assignable to the same property in base type 'I'. -!!! error TS2416: Type '() => T' is not assignable to type '() => T'. -!!! error TS2416: Type 'B' is not assignable to type 'T'. +!!! error TS2416: Type '<{|T|0|} extends {|B|1|}>() => {|T|2|}' is not assignable to type '<{|T|3|} extends {|A|4|}>() => {|T|5|}'. +!!! error TS2416: Type '{|B|6|}' is not assignable to type '{|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/genericImplements.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/genericImplements.ts:2:7 +!!! annotated symbol 2 tests/cases/compiler/genericImplements.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/genericImplements.ts:4:7 +!!! annotated symbol 4 tests/cases/compiler/genericImplements.ts:1:7 +!!! annotated symbol 5 tests/cases/compiler/genericImplements.ts:4:7 +!!! annotated symbol 6 tests/cases/compiler/genericImplements.ts:2:7 +!!! annotated symbol 7 tests/cases/compiler/genericImplements.ts:4:7 } // { f: () => { b; } } // OK diff --git a/tests/baselines/reference/genericRestParameters1.errors.txt b/tests/baselines/reference/genericRestParameters1.errors.txt index cd9e799535bdb..ae22a031ec0bb 100644 --- a/tests/baselines/reference/genericRestParameters1.errors.txt +++ b/tests/baselines/reference/genericRestParameters1.errors.txt @@ -149,8 +149,9 @@ tests/cases/conformance/types/rest/genericRestParameters1.ts(164,1): error TS232 type T08 = ConstructorParameters void>; type T09 = Parameters; ~~~~~~~~ -!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. +!!! error TS2344: Type '{|Function|0|}' does not satisfy the constraint '(...args: any) => any'. !!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 type Record1 = { move: [number, 'left' | 'right']; diff --git a/tests/baselines/reference/genericRestParameters3.errors.txt b/tests/baselines/reference/genericRestParameters3.errors.txt index 612140ea9408f..3d2d8ba30d32e 100644 --- a/tests/baselines/reference/genericRestParameters3.errors.txt +++ b/tests/baselines/reference/genericRestParameters3.errors.txt @@ -92,12 +92,17 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 !!! related TS6210 tests/cases/conformance/types/rest/genericRestParameters3.ts:27:39: An argument for 'cb' was not provided. foo>(100); // Error ~~~ -!!! error TS2345: Argument of type '100' is not assignable to parameter of type '(...args: CoolArray) => void'. +!!! error TS2345: Argument of type '100' is not assignable to parameter of type '(...args: {|CoolArray|0|}) => void'. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 foo>(foo); // Error ~~~ -!!! error TS2345: Argument of type '(cb: (...args: T) => void) => void' is not assignable to parameter of type '(...args: CoolArray) => void'. +!!! error TS2345: Argument of type '<{|T|0|} extends any[]>(cb: (...args: {|T|1|}) => void) => void' is not assignable to parameter of type '(...args: {|CoolArray|2|}) => void'. !!! error TS2345: Types of parameters 'cb' and 'args' are incompatible. -!!! error TS2345: Property '0' is missing in type 'CoolArray' but required in type '[(...args: any[]) => void]'. +!!! error TS2345: Property '0' is missing in type '{|CoolArray|3|}' but required in type '[(...args: any[]) => void]'. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:27:22 +!!! annotated symbol 1 tests/cases/conformance/types/rest/genericRestParameters3.ts:27:22 +!!! annotated symbol 2 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 +!!! annotated symbol 3 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 function bar(...args: T): T { return args; @@ -106,33 +111,43 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345 let a = bar(10, 20); let b = bar>(10, 20); // Error ~~ -!!! error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type 'CoolArray'. -!!! error TS2345: Property 'hello' is missing in type '[10, 20]' but required in type 'CoolArray'. +!!! error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type '{|CoolArray|0|}'. +!!! error TS2345: Property 'hello' is missing in type '[10, 20]' but required in type '{|CoolArray|1|}'. !!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 +!!! annotated symbol 1 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 declare function baz(...args: CoolArray): void; declare const ca: CoolArray; baz(); // Error ~~~~~ -!!! error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray'. -!!! error TS2345: Property 'hello' is missing in type '[]' but required in type 'CoolArray'. +!!! error TS2345: Argument of type '[]' is not assignable to parameter of type '{|CoolArray|0|}'. +!!! error TS2345: Property 'hello' is missing in type '[]' but required in type '{|CoolArray|1|}'. !!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 +!!! annotated symbol 1 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 baz(1); // Error ~ -!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray'. -!!! error TS2345: Property 'hello' is missing in type '[number]' but required in type 'CoolArray'. +!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '{|CoolArray|0|}'. +!!! error TS2345: Property 'hello' is missing in type '[number]' but required in type '{|CoolArray|1|}'. !!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 +!!! annotated symbol 1 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 baz(1, 2); // Error ~ -!!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray'. -!!! error TS2345: Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray'. +!!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type '{|CoolArray|0|}'. +!!! error TS2345: Property 'hello' is missing in type '[number, number]' but required in type '{|CoolArray|1|}'. !!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 +!!! annotated symbol 1 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 baz(...ca); // Error ~~~~~ -!!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'CoolArray'. -!!! error TS2345: Property 'hello' is missing in type 'number[]' but required in type 'CoolArray'. +!!! error TS2345: Argument of type 'number[]' is not assignable to parameter of type '{|CoolArray|0|}'. +!!! error TS2345: Property 'hello' is missing in type 'number[]' but required in type '{|CoolArray|1|}'. !!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 +!!! annotated symbol 1 tests/cases/conformance/types/rest/genericRestParameters3.ts:23:11 // Repro from #26491 diff --git a/tests/baselines/reference/genericSpecializations1.errors.txt b/tests/baselines/reference/genericSpecializations1.errors.txt index 83015cef25918..2afb30e77d043 100644 --- a/tests/baselines/reference/genericSpecializations1.errors.txt +++ b/tests/baselines/reference/genericSpecializations1.errors.txt @@ -17,18 +17,26 @@ tests/cases/compiler/genericSpecializations1.ts(10,5): error TS2416: Property 'f foo(x: string): string { return null; } ~~~ !!! error TS2416: Property 'foo' in type 'IntFooBad' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => string' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '(x: string) => string' is not assignable to type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericSpecializations1.ts:2:9 +!!! annotated symbol 1 tests/cases/compiler/genericSpecializations1.ts:2:9 +!!! annotated symbol 2 tests/cases/compiler/genericSpecializations1.ts:2:9 +!!! annotated symbol 3 tests/cases/compiler/genericSpecializations1.ts:2:9 } class StringFoo2 implements IFoo { foo(x: string): string { return null; } ~~~ !!! error TS2416: Property 'foo' in type 'StringFoo2' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => string' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '(x: string) => string' is not assignable to type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericSpecializations1.ts:2:9 +!!! annotated symbol 1 tests/cases/compiler/genericSpecializations1.ts:2:9 +!!! annotated symbol 2 tests/cases/compiler/genericSpecializations1.ts:2:9 +!!! annotated symbol 3 tests/cases/compiler/genericSpecializations1.ts:2:9 } class StringFoo3 implements IFoo { diff --git a/tests/baselines/reference/genericSpecializations2.errors.txt b/tests/baselines/reference/genericSpecializations2.errors.txt index 1088d7b895621..2e17ce62e6f15 100644 --- a/tests/baselines/reference/genericSpecializations2.errors.txt +++ b/tests/baselines/reference/genericSpecializations2.errors.txt @@ -21,9 +21,14 @@ tests/cases/compiler/genericSpecializations2.ts(12,9): error TS2368: Type parame foo(x: string): string { return null; } ~~~ !!! error TS2416: Property 'foo' in type 'IntFooBad' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => string' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '<{|string|0|}>(x: string) => string' is not assignable to type '<{|T|1|}>(x: {|T|2|}) => {|T|3|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|4|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericSpecializations2.ts:8:9 +!!! annotated symbol 1 tests/cases/compiler/genericSpecializations2.ts:2:9 +!!! annotated symbol 2 tests/cases/compiler/genericSpecializations2.ts:2:9 +!!! annotated symbol 3 tests/cases/compiler/genericSpecializations2.ts:2:9 +!!! annotated symbol 4 tests/cases/compiler/genericSpecializations2.ts:2:9 ~~~~~~ !!! error TS2368: Type parameter name cannot be 'string'. } @@ -32,9 +37,14 @@ tests/cases/compiler/genericSpecializations2.ts(12,9): error TS2368: Type parame foo(x: string): string { return null; } ~~~ !!! error TS2416: Property 'foo' in type 'StringFoo2' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => string' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '<{|string|0|}>(x: string) => string' is not assignable to type '<{|T|1|}>(x: {|T|2|}) => {|T|3|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|4|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericSpecializations2.ts:12:9 +!!! annotated symbol 1 tests/cases/compiler/genericSpecializations2.ts:2:9 +!!! annotated symbol 2 tests/cases/compiler/genericSpecializations2.ts:2:9 +!!! annotated symbol 3 tests/cases/compiler/genericSpecializations2.ts:2:9 +!!! annotated symbol 4 tests/cases/compiler/genericSpecializations2.ts:2:9 ~~~~~~ !!! error TS2368: Type parameter name cannot be 'string'. } diff --git a/tests/baselines/reference/genericSpecializations3.errors.txt b/tests/baselines/reference/genericSpecializations3.errors.txt index eaa7f094bdb78..482662950bd76 100644 --- a/tests/baselines/reference/genericSpecializations3.errors.txt +++ b/tests/baselines/reference/genericSpecializations3.errors.txt @@ -49,18 +49,22 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFo intFoo = stringFoo2; // error ~~~~~~ -!!! error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo'. +!!! error TS2322: Type '{|StringFoo2|0|}' is not assignable to type '{|IntFoo|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => number'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericSpecializations3.ts:20:7 +!!! annotated symbol 1 tests/cases/compiler/genericSpecializations3.ts:14:7 stringFoo2 = intFoo; // error ~~~~~~~~~~ -!!! error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2'. +!!! error TS2322: Type '{|IntFoo|0|}' is not assignable to type '{|StringFoo2|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x: number) => number' is not assignable to type '(x: string) => string'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericSpecializations3.ts:14:7 +!!! annotated symbol 1 tests/cases/compiler/genericSpecializations3.ts:20:7 class StringFoo3 implements IFoo { // error diff --git a/tests/baselines/reference/genericTypeArgumentInference1.errors.txt b/tests/baselines/reference/genericTypeArgumentInference1.errors.txt index 7054967a47587..88af8818b0af2 100644 --- a/tests/baselines/reference/genericTypeArgumentInference1.errors.txt +++ b/tests/baselines/reference/genericTypeArgumentInference1.errors.txt @@ -17,9 +17,13 @@ tests/cases/compiler/genericTypeArgumentInference1.ts(12,39): error TS2345: Argu var r = _.all([true, 1, null, 'yes'], _.identity); ~~~~~~~~~~ -!!! error TS2345: Argument of type '(value: T) => T' is not assignable to parameter of type 'Iterator'. +!!! error TS2345: Argument of type '<{|T|0|}>(value: {|T|1|}) => {|T|2|}' is not assignable to parameter of type '{|Iterator|3|}'. !!! error TS2345: Type 'string | number | boolean' is not assignable to type 'boolean'. !!! error TS2345: Type 'string' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeArgumentInference1.ts:7:18 +!!! annotated symbol 1 tests/cases/compiler/genericTypeArgumentInference1.ts:7:18 +!!! annotated symbol 2 tests/cases/compiler/genericTypeArgumentInference1.ts:7:18 +!!! annotated symbol 3 tests/cases/compiler/genericTypeArgumentInference1.ts:2:22 var r2 = _.all([true], _.identity); var r3 = _.all([], _.identity); var r4 = _.all([true], _.identity); diff --git a/tests/baselines/reference/genericTypeAssertions1.errors.txt b/tests/baselines/reference/genericTypeAssertions1.errors.txt index b4c7a165a9172..6bc16254db60a 100644 --- a/tests/baselines/reference/genericTypeAssertions1.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions1.errors.txt @@ -11,12 +11,22 @@ tests/cases/compiler/genericTypeAssertions1.ts(4,21): error TS2352: Conversion o var foo = new A(); var r: A = >new A(); // error ~ -!!! error TS2322: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|A|1|}'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions1.ts:1:7 var r2: A = >>foo; // error ~~ -!!! error TS2322: Type 'A>' is not assignable to type 'A'. -!!! error TS2322: Type 'A' is not assignable to type 'number'. +!!! error TS2322: Type '{|A|0|}<{|A|1|}>' is not assignable to type '{|A|2|}'. +!!! error TS2322: Type '{|A|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions1.ts:1:7 ~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'A' to type 'A>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type 'number' is not comparable to type 'A'. \ No newline at end of file +!!! error TS2352: Conversion of type '{|A|0|}' to type '{|A|1|}<{|A|2|}>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type 'number' is not comparable to type '{|A|3|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions1.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions1.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions2.errors.txt b/tests/baselines/reference/genericTypeAssertions2.errors.txt index 6c72ca1a773d5..4ab36f4fd432b 100644 --- a/tests/baselines/reference/genericTypeAssertions2.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions2.errors.txt @@ -20,18 +20,24 @@ tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2352: Conversion var r: A = >new B(); var r2: A = >new B(); // error ~~ -!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|A|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions2.ts:2:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions2.ts:1:7 var r3: B = >new B(); // error ~~ -!!! error TS2741: Property 'bar' is missing in type 'A' but required in type 'B'. +!!! error TS2741: Property 'bar' is missing in type '{|A|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/genericTypeAssertions2.ts:3:5: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions2.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions2.ts:2:7 var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'undefined[]' to type 'A' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'foo' is missing in type 'undefined[]' but required in type 'A'. -!!! related TS2728 tests/cases/compiler/genericTypeAssertions2.ts:1:14: 'foo' is declared here. \ No newline at end of file +!!! error TS2352: Conversion of type 'undefined[]' to type '{|A|0|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'foo' is missing in type 'undefined[]' but required in type '{|A|1|}'. +!!! related TS2728 tests/cases/compiler/genericTypeAssertions2.ts:1:14: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions2.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions2.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions4.errors.txt b/tests/baselines/reference/genericTypeAssertions4.errors.txt index 6a74d8fe26513..557e0ad042453 100644 --- a/tests/baselines/reference/genericTypeAssertions4.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions4.errors.txt @@ -31,23 +31,53 @@ tests/cases/compiler/genericTypeAssertions4.ts(24,9): error TS2352: Conversion o var y = x; y = a; // error: cannot convert A to T ~ -!!! error TS2322: Type 'A' is not assignable to type 'T'. -!!! error TS2322: 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|A|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions4.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions4.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions4.ts:1:7 y = b; // error: cannot convert B to T ~ -!!! error TS2322: Type 'B' is not assignable to type 'T'. -!!! error TS2322: 'B' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|B|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions4.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions4.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions4.ts:1:7 y = c; // error: cannot convert C to T ~ -!!! error TS2322: Type 'C' is not assignable to type 'T'. -!!! error TS2322: 'C' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|C|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions4.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions4.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions4.ts:1:7 y = a; y = b; // error: cannot convert B to T ~~~~ -!!! error TS2352: Conversion of type 'B' to type 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'B' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2352: Conversion of type '{|B|0|}' to type '{|T|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|B|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions4.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions4.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions4.ts:1:7 y = c; // error: cannot convert C to T ~~~~ -!!! error TS2352: Conversion of type 'C' to type 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'C' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2352: Conversion of type '{|C|0|}' to type '{|T|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|C|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions4.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions4.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions4.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions4.ts:1:7 } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions5.errors.txt b/tests/baselines/reference/genericTypeAssertions5.errors.txt index d2eea8157aa60..6fc7f8cb53b33 100644 --- a/tests/baselines/reference/genericTypeAssertions5.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions5.errors.txt @@ -31,23 +31,53 @@ tests/cases/compiler/genericTypeAssertions5.ts(24,9): error TS2352: Conversion o var y = x; y = a; // error: cannot convert A to T ~ -!!! error TS2322: Type 'A' is not assignable to type 'T'. -!!! error TS2322: 'A' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|A|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions5.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions5.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions5.ts:1:11 y = b; // error: cannot convert B to T ~ -!!! error TS2322: Type 'B' is not assignable to type 'T'. -!!! error TS2322: 'B' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|B|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions5.ts:5:11 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions5.ts:5:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions5.ts:1:11 y = c; // error: cannot convert C to T ~ -!!! error TS2322: Type 'C' is not assignable to type 'T'. -!!! error TS2322: 'C' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|C|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions5.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions5.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions5.ts:1:11 y = a; y = b; // error: cannot convert B to T ~~~~ -!!! error TS2352: Conversion of type 'B' to type 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'B' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2352: Conversion of type '{|B|0|}' to type '{|T|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|B|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions5.ts:5:11 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions5.ts:5:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions5.ts:1:11 y = c; // error: cannot convert C to T ~~~~ -!!! error TS2352: Conversion of type 'C' to type 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'C' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'A'. +!!! error TS2352: Conversion of type '{|C|0|}' to type '{|T|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|C|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|A|5|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions5.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions5.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions5.ts:17:15 +!!! annotated symbol 5 tests/cases/compiler/genericTypeAssertions5.ts:1:11 } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions6.errors.txt b/tests/baselines/reference/genericTypeAssertions6.errors.txt index 9aeebcf11b12a..44c0e26a160e8 100644 --- a/tests/baselines/reference/genericTypeAssertions6.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions6.errors.txt @@ -18,12 +18,22 @@ tests/cases/compiler/genericTypeAssertions6.ts(19,17): error TS2352: Conversion f(x: T, y: U) { x = y; ~~~~ -!!! error TS2352: Conversion of type 'U' to type 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2352: Conversion of type '{|U|0|}' to type '{|T|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions6.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions6.ts:1:9 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions6.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions6.ts:1:9 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions6.ts:1:9 y = x; ~~~~ -!!! error TS2352: Conversion of type 'T' to type 'U' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2352: Conversion of type '{|T|0|}' to type '{|U|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions6.ts:1:9 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions6.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions6.ts:1:9 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions6.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions6.ts:1:11 } } @@ -35,10 +45,22 @@ tests/cases/compiler/genericTypeAssertions6.ts(19,17): error TS2352: Conversion var d = new Date(); var e = new Date(); ~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'U' to type 'T' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2352: Type 'Date' is not comparable to type 'T'. -!!! error TS2352: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2352: Conversion of type '{|U|0|}' to type '{|T|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2352: Type '{|Date|6|}' is not comparable to type '{|T|7|}'. +!!! error TS2352: '{|Date|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeAssertions6.ts:13:25 +!!! annotated symbol 1 tests/cases/compiler/genericTypeAssertions6.ts:13:9 +!!! annotated symbol 2 tests/cases/compiler/genericTypeAssertions6.ts:13:25 +!!! annotated symbol 3 tests/cases/compiler/genericTypeAssertions6.ts:13:9 +!!! annotated symbol 4 tests/cases/compiler/genericTypeAssertions6.ts:13:9 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 7 tests/cases/compiler/genericTypeAssertions6.ts:13:9 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 9 tests/cases/compiler/genericTypeAssertions6.ts:13:9 +!!! annotated symbol 10 tests/cases/compiler/genericTypeAssertions6.ts:13:9 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 } } diff --git a/tests/baselines/reference/genericTypeConstraints.errors.txt b/tests/baselines/reference/genericTypeConstraints.errors.txt index d3d424c6383ea..72be0b86aab63 100644 --- a/tests/baselines/reference/genericTypeConstraints.errors.txt +++ b/tests/baselines/reference/genericTypeConstraints.errors.txt @@ -13,9 +13,13 @@ tests/cases/compiler/genericTypeConstraints.ts(9,31): error TS2344: Type 'FooExt class BarExtended extends Bar { ~~~~~~~~~~~ -!!! error TS2344: Type 'FooExtended' does not satisfy the constraint 'Foo'. -!!! error TS2344: Property 'fooMethod' is missing in type 'FooExtended' but required in type 'Foo'. +!!! error TS2344: Type '{|FooExtended|0|}' does not satisfy the constraint '{|Foo|1|}'. +!!! error TS2344: Property 'fooMethod' is missing in type '{|FooExtended|2|}' but required in type '{|Foo|3|}'. !!! related TS2728 tests/cases/compiler/genericTypeConstraints.ts:2:5: 'fooMethod' is declared here. +!!! annotated symbol 0 tests/cases/compiler/genericTypeConstraints.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeConstraints.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/genericTypeConstraints.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/genericTypeConstraints.ts:1:7 constructor() { super(); } diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt index a7a96c2abd88d..98ffacbe37ecd 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt @@ -19,18 +19,29 @@ tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322 f(a: T): void { } ~ !!! error TS2416: Property 'f' in type 'X' is not assignable to the same property in base type 'I'. -!!! error TS2416: Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void'. +!!! error TS2416: Type '(a: {|T|0|}) => void' is not assignable to type '(a: { {|a|1|}: number; }) => void'. !!! error TS2416: Types of parameters 'a' and 'a' are incompatible. -!!! error TS2416: Type '{ a: number; }' is not assignable to type 'T'. +!!! error TS2416: Type '{ {|a|2|}: number; }' is not assignable to type '{|T|3|}'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:4:9 +!!! annotated symbol 1 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:2:11 +!!! annotated symbol 2 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:2:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:4:9 } var x = new X<{ a: string }>(); var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' ~ -!!! error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I'. +!!! error TS2322: Type '{|X|0|}<{ {|a|1|}: string; }>' is not assignable to type '{|I|2|}'. !!! error TS2322: Types of property 'f' are incompatible. -!!! error TS2322: Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'. +!!! error TS2322: Type '(a: { {|a|3|}: string; }) => void' is not assignable to type '(a: { {|a|4|}: number; }) => void'. !!! error TS2322: Types of parameters 'a' and 'a' are incompatible. -!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ a: string; }'. +!!! error TS2322: Type '{ {|a|5|}: number; }' is not assignable to type '{ {|a|6|}: string; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:7:17 +!!! annotated symbol 2 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:7:17 +!!! annotated symbol 4 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:2:11 +!!! annotated symbol 5 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:2:11 +!!! annotated symbol 6 tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts:7:17 \ No newline at end of file diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt index fe1aaf3f8de08..360c7ae145ad0 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt @@ -13,8 +13,11 @@ tests/cases/compiler/genericWithOpenTypeParameters1.ts(9,41): error TS2558: Expe x.foo(1); // no error var f = (x: B) => { return x.foo(1); } // error ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|T|0|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/genericWithOpenTypeParameters1.ts:7:10 +!!! annotated symbol 1 tests/cases/compiler/genericWithOpenTypeParameters1.ts:7:10 +!!! annotated symbol 2 tests/cases/compiler/genericWithOpenTypeParameters1.ts:7:10 var f2 = (x: B) => { return x.foo(1); } // error ~ !!! error TS2558: Expected 0 type arguments, but got 1. diff --git a/tests/baselines/reference/generics1.errors.txt b/tests/baselines/reference/generics1.errors.txt index 2fbc588b516fc..13dd366a3b453 100644 --- a/tests/baselines/reference/generics1.errors.txt +++ b/tests/baselines/reference/generics1.errors.txt @@ -16,9 +16,13 @@ tests/cases/compiler/generics1.ts(14,9): error TS2314: Generic type 'G' re var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~ -!!! error TS2344: Type 'A' does not satisfy the constraint 'B'. -!!! error TS2344: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2344: Type '{|A|0|}' does not satisfy the constraint '{|B|1|}'. +!!! error TS2344: Property 'b' is missing in type '{|A|2|}' but required in type '{|B|3|}'. !!! related TS2728 tests/cases/compiler/generics1.ts:2:25: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/generics1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/generics1.ts:2:11 +!!! annotated symbol 2 tests/cases/compiler/generics1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/generics1.ts:2:11 var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments diff --git a/tests/baselines/reference/generics2.errors.txt b/tests/baselines/reference/generics2.errors.txt index 765eb88f3efe3..154b7534b0b03 100644 --- a/tests/baselines/reference/generics2.errors.txt +++ b/tests/baselines/reference/generics2.errors.txt @@ -23,9 +23,13 @@ tests/cases/compiler/generics2.ts(21,9): error TS2314: Generic type 'G' re var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~ -!!! error TS2344: Type 'A' does not satisfy the constraint 'B'. -!!! error TS2344: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2344: Type '{|A|0|}' does not satisfy the constraint '{|B|1|}'. +!!! error TS2344: Property 'b' is missing in type '{|A|2|}' but required in type '{|B|3|}'. !!! related TS2728 tests/cases/compiler/generics2.ts:2:25: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/generics2.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/generics2.ts:2:11 +!!! annotated symbol 2 tests/cases/compiler/generics2.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/generics2.ts:2:11 var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments diff --git a/tests/baselines/reference/generics4.errors.txt b/tests/baselines/reference/generics4.errors.txt index 06bfa122901d6..4044d7e89af72 100644 --- a/tests/baselines/reference/generics4.errors.txt +++ b/tests/baselines/reference/generics4.errors.txt @@ -14,8 +14,14 @@ tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C' is not assigna a = b; // Not ok - return types of "f" are different ~ -!!! error TS2322: Type 'C' is not assignable to type 'C'. -!!! error TS2322: Type 'Y' is not assignable to type 'X'. +!!! error TS2322: Type '{|C|0|}<{|Y|1|}>' is not assignable to type '{|C|2|}<{|X|3|}>'. +!!! error TS2322: Type '{|Y|4|}' is not assignable to type '{|X|5|}'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '() => boolean' is not assignable to type '() => string'. -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/generics4.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/generics4.ts:3:11 +!!! annotated symbol 2 tests/cases/compiler/generics4.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/generics4.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/generics4.ts:3:11 +!!! annotated symbol 5 tests/cases/compiler/generics4.ts:2:11 \ No newline at end of file diff --git a/tests/baselines/reference/generics5.errors.txt b/tests/baselines/reference/generics5.errors.txt index 153ebb3823e3a..a695570a1fe49 100644 --- a/tests/baselines/reference/generics5.errors.txt +++ b/tests/baselines/reference/generics5.errors.txt @@ -14,8 +14,12 @@ tests/cases/compiler/generics5.ts(10,14): error TS2344: Type 'A' does not satisf var v3: G; // Error, A not valid argument for U ~ -!!! error TS2344: Type 'A' does not satisfy the constraint 'B'. -!!! error TS2344: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2344: Type '{|A|0|}' does not satisfy the constraint '{|B|1|}'. +!!! error TS2344: Property 'b' is missing in type '{|A|2|}' but required in type '{|B|3|}'. !!! related TS2728 tests/cases/compiler/generics5.ts:2:25: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/generics5.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/generics5.ts:2:11 +!!! annotated symbol 2 tests/cases/compiler/generics5.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/generics5.ts:2:11 \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt index 12770e4ca0ee0..a1d62ab3c9ee0 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt @@ -26,9 +26,15 @@ tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A'. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|A|1|}<{|T|2|}>'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|3|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|4|}', but '{|T|5|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/getAndSetNotIdenticalType2.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/getAndSetNotIdenticalType2.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/getAndSetNotIdenticalType2.ts:3:9 +!!! annotated symbol 3 tests/cases/compiler/getAndSetNotIdenticalType2.ts:3:9 +!!! annotated symbol 4 tests/cases/compiler/getAndSetNotIdenticalType2.ts:3:9 +!!! annotated symbol 5 tests/cases/compiler/getAndSetNotIdenticalType2.ts:3:9 } } diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt index 3fb17d65a400b..7607fe38cefa7 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt @@ -25,8 +25,10 @@ tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|A|1|}'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/getAndSetNotIdenticalType3.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/getAndSetNotIdenticalType3.ts:1:7 } } diff --git a/tests/baselines/reference/i3.errors.txt b/tests/baselines/reference/i3.errors.txt index ef7aefa45983b..1f7532820c43d 100644 --- a/tests/baselines/reference/i3.errors.txt +++ b/tests/baselines/reference/i3.errors.txt @@ -10,5 +10,7 @@ tests/cases/compiler/i3.ts(6,1): error TS2322: Type 'I3' is not assignable to ty i = x; x = i; ~ -!!! error TS2322: Type 'I3' is not assignable to type '{ one: number; }'. -!!! error TS2322: Property 'one' is optional in type 'I3' but required in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type '{|I3|0|}' is not assignable to type '{ {|one|1|}: number; }'. +!!! error TS2322: Property 'one' is optional in type 'I3' but required in type '{ one: number; }'. +!!! annotated symbol 0 tests/cases/compiler/i3.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/i3.ts:2:9 \ No newline at end of file diff --git a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt index 3174290c6ab51..ed18a8f221f22 100644 --- a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt +++ b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt @@ -19,9 +19,12 @@ tests/cases/compiler/implementGenericWithMismatchedTypes.ts(17,5): error TS2416: foo(x: string): number { ~~~ !!! error TS2416: Property 'foo' in type 'C' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => number' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '(x: string) => number' is not assignable to type '(x: {|T|0|}) => {|T|1|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|2|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:7:9 +!!! annotated symbol 1 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:7:9 +!!! annotated symbol 2 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:7:9 return null; } } @@ -33,9 +36,16 @@ tests/cases/compiler/implementGenericWithMismatchedTypes.ts(17,5): error TS2416: foo(x: Tstring): number { ~~~ !!! error TS2416: Property 'foo' in type 'C2' is not assignable to the same property in base type 'IFoo2'. -!!! error TS2416: Type '(x: Tstring) => number' is not assignable to type '(x: T) => T'. -!!! error TS2416: Type 'number' is not assignable to type 'T'. -!!! error TS2416: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '<{|Tstring|0|}>(x: {|Tstring|1|}) => number' is not assignable to type '(x: {|T|2|}) => {|T|3|}'. +!!! error TS2416: Type 'number' is not assignable to type '{|T|4|}'. +!!! error TS2416: 'number' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:17:9 +!!! annotated symbol 1 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:17:9 +!!! annotated symbol 2 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:16:10 +!!! annotated symbol 3 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:16:10 +!!! annotated symbol 4 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:16:10 +!!! annotated symbol 5 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:16:10 +!!! annotated symbol 6 tests/cases/compiler/implementGenericWithMismatchedTypes.ts:16:10 return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt index 75d9fdcce3483..055139be15897 100644 --- a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt @@ -8,7 +8,9 @@ tests/cases/compiler/implementPublicPropertyAsPrivate.ts(4,7): error TS2420: Cla } class C implements I { ~ -!!! error TS2420: Class 'C' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|C|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Property 'x' is private in type 'C' but not in type 'I'. +!!! annotated symbol 0 tests/cases/compiler/implementPublicPropertyAsPrivate.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/implementPublicPropertyAsPrivate.ts:1:11 private x = 0; // should raise error at class decl } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt index be2b4edf0e928..c91812f10e959 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt @@ -19,30 +19,40 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar implements I { // error ~~~ -!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Type 'Bar' is missing the following properties from type 'I': y, x +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:5:11 } class Bar2 implements I { // error ~~~~ -!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. -!!! error TS2420: Property 'x' is missing in type 'Bar2' but required in type 'I'. +!!! error TS2420: Class '{|Bar2|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'x' is missing in type '{|Bar2|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:2:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:12:7 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:5:11 y: number; } class Bar3 implements I { // error ~~~~ -!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar3|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Property 'x' is private in type 'I' but not in type 'Bar3'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:16:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:5:11 x: string; y: number; } class Bar4 implements I { // error ~~~~ -!!! error TS2420: Class 'Bar4' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar4|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:21:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates.ts:5:11 private x: string; y: number; } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt index 88208a43ba12e..d4f409d2855f0 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt @@ -43,22 +43,30 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar2 extends Foo implements I { // error ~~~~ -!!! error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. +!!! error TS2415: Class '{|Bar2|0|}' incorrectly extends base class '{|Foo|1|}'. !!! error TS2415: Property 'x' is private in type 'Foo' but not in type 'Bar2'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:1:7 ~~~~ -!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar2|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Property 'x' is private in type 'I' but not in type 'Bar2'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:5:11 x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. +!!! error TS2415: Class '{|Bar3|0|}' incorrectly extends base class '{|Foo|1|}'. !!! error TS2415: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:18:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:1:7 ~~~~ -!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar3|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:18:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:5:11 private x: string; y: number; } @@ -84,24 +92,36 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar2 extends Foo implements I { // error ~~~~ -!!! error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. +!!! error TS2415: Class '{|Bar2|0|}' incorrectly extends base class '{|Foo|1|}'. !!! error TS2415: Property 'x' is private in type 'Foo' but not in type 'Bar2'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:42:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:25:11 ~~~~ -!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. -!!! error TS2420: Property 'z' is missing in type 'Bar2' but required in type 'I'. +!!! error TS2420: Class '{|Bar2|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'z' is missing in type '{|Bar2|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:30:9: 'z' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:42:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:33:15 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:42:11 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:33:15 x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. +!!! error TS2415: Class '{|Bar3|0|}' incorrectly extends base class '{|Foo|1|}'. !!! error TS2415: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:47:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:25:11 ~~~~ -!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. -!!! error TS2420: Property 'z' is missing in type 'Bar3' but required in type 'I'. +!!! error TS2420: Class '{|Bar3|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'z' is missing in type '{|Bar3|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:30:9: 'z' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:47:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:33:15 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:47:11 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:33:15 private x: string; y: number; } @@ -123,9 +143,13 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar extends Foo implements I { // error ~~~ -!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. -!!! error TS2420: Property 'y' is missing in type 'Bar' but required in type 'I'. +!!! error TS2420: Class '{|Bar|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'y' is missing in type '{|Bar|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:60:17: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:67:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:63:15 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:67:11 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:63:15 z: number; } @@ -140,24 +164,36 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar2 extends Foo implements I { // error ~~~~ -!!! error TS2415: Class 'Bar2' incorrectly extends base class 'Foo'. +!!! error TS2415: Class '{|Bar2|0|}' incorrectly extends base class '{|Foo|1|}'. !!! error TS2415: Property 'x' is private in type 'Foo' but not in type 'Bar2'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:76:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:55:11 ~~~~ -!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. -!!! error TS2420: Property 'y' is missing in type 'Bar2' but required in type 'I'. +!!! error TS2420: Class '{|Bar2|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'y' is missing in type '{|Bar2|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:60:17: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:76:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:63:15 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:76:11 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:63:15 x: string; z: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! error TS2415: Class 'Bar3' incorrectly extends base class 'Foo'. +!!! error TS2415: Class '{|Bar3|0|}' incorrectly extends base class '{|Foo|1|}'. !!! error TS2415: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:81:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:55:11 ~~~~ -!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. -!!! error TS2420: Property 'y' is missing in type 'Bar3' but required in type 'I'. +!!! error TS2420: Class '{|Bar3|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'y' is missing in type '{|Bar3|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:60:17: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:81:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:63:15 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:81:11 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts:63:15 private x: string; z: number; } diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt index ecb3e4664a470..935e3de5213b1 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt @@ -23,45 +23,61 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInte class Bar implements I { // error ~~~ -!!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Type 'Bar' is missing the following properties from type 'I': y, x +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 } class Bar2 implements I { // error ~~~~ -!!! error TS2420: Class 'Bar2' incorrectly implements interface 'I'. -!!! error TS2420: Property 'x' is missing in type 'Bar2' but required in type 'I'. +!!! error TS2420: Class '{|Bar2|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'x' is missing in type '{|Bar2|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:2:15: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:12:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:12:7 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 y: number; } class Bar3 implements I { // error ~~~~ -!!! error TS2420: Class 'Bar3' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar3|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Property 'x' is protected but type 'Bar3' is not a class derived from 'Foo'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:16:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 x: string; y: number; } class Bar4 implements I { // error ~~~~ -!!! error TS2420: Class 'Bar4' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar4|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Property 'x' is protected but type 'Bar4' is not a class derived from 'Foo'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:21:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 protected x: string; y: number; } class Bar5 extends Foo implements I { // error ~~~~ -!!! error TS2420: Class 'Bar5' incorrectly implements interface 'I'. -!!! error TS2420: Property 'y' is missing in type 'Bar5' but required in type 'I'. +!!! error TS2420: Class '{|Bar5|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'y' is missing in type '{|Bar5|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:6:5: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:26:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:26:7 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 } class Bar6 extends Foo implements I { // error ~~~~ -!!! error TS2420: Class 'Bar6' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|Bar6|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Property 'y' is protected in type 'Bar6' but public in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:29:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithProtecteds.ts:5:11 protected y: number; } diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt index dd3445deb562f..9947f6402de12 100644 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt @@ -16,13 +16,17 @@ tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Conversion of ty let p1: Promise = import("./defaultPath"); ~~ -!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2322: Type '{|Promise|0|}' is not assignable to type '{|Promise|1|}'. !!! error TS2322: Property 'D' is missing in type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")' but required in type 'typeof import("tests/cases/conformance/dynamicImport/anotherModule")'. !!! related TS2728 tests/cases/conformance/dynamicImport/anotherModule.ts:1:14: 'D' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 let p2 = import("./defaultPath") as Promise; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'Promise' to type 'Promise' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Conversion of type '{|Promise|0|}' to type '{|Promise|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. !!! error TS2352: Property 'D' is missing in type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")' but required in type 'typeof import("tests/cases/conformance/dynamicImport/anotherModule")'. !!! related TS2728 tests/cases/conformance/dynamicImport/anotherModule.ts:1:14: 'D' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 let p3: Promise = import("./defaultPath"); \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.errors.txt b/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.errors.txt index 590731e4a2965..c49c28c09b68d 100644 --- a/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.errors.txt +++ b/tests/baselines/reference/incompatibleAssignmentOfIdenticallyNamedTypes.errors.txt @@ -10,8 +10,13 @@ tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts(6,9): erro fn() { this.x = a; ~~~~~~ -!!! error TS2719: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2719: Type '{|T|0|}' is not assignable to type '{|T|1|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2719: '{|T|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts:3:11 +!!! annotated symbol 2 tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts:3:11 +!!! annotated symbol 4 tests/cases/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.ts:3:11 } } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleGenericTypes.errors.txt b/tests/baselines/reference/incompatibleGenericTypes.errors.txt index 119d3b41f3dc1..eae2d5569a5b0 100644 --- a/tests/baselines/reference/incompatibleGenericTypes.errors.txt +++ b/tests/baselines/reference/incompatibleGenericTypes.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/incompatibleGenericTypes.ts(9,5): error TS2322: Type 'I1 = v1; ~~ -!!! error TS2322: Type 'I1' is not assignable to type 'I1'. -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '{|I1|0|}' is not assignable to type '{|I1|1|}'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/incompatibleGenericTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/incompatibleGenericTypes.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index 3da9adcd2b77b..b499a50404a5f 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -80,10 +80,12 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => var c2: C2; if1(c1); ~~ -!!! error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. +!!! error TS2345: Argument of type '{|C1|0|}' is not assignable to parameter of type '{|IFoo2|1|}'. !!! error TS2345: Types of property 'p1' are incompatible. !!! error TS2345: Type '() => string' is not assignable to type '(s: string) => number'. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/incompatibleTypes.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/incompatibleTypes.ts:11:11 function of1(n: { a: { a: string; }; b: string; }): number; @@ -92,8 +94,13 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => of1({ e: 0, f: 0 }); ~~~~ -!!! error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. +!!! error TS2345: Argument of type '{ {|e|0|}: number; {|f|1|}: number; }' is not assignable to parameter of type '{ {|c|2|}: { {|b|3|}: string; }; {|d|4|}: string; }'. !!! error TS2345: Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. +!!! annotated symbol 0 tests/cases/compiler/incompatibleTypes.ts:49:7 +!!! annotated symbol 1 tests/cases/compiler/incompatibleTypes.ts:49:13 +!!! annotated symbol 2 tests/cases/compiler/incompatibleTypes.ts:46:19 +!!! annotated symbol 3 tests/cases/compiler/incompatibleTypes.ts:46:24 +!!! annotated symbol 4 tests/cases/compiler/incompatibleTypes.ts:46:38 interface IMap { [key:string]:string; @@ -112,8 +119,13 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ~~~~ -!!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. +!!! error TS2322: Type '{ {|e|0|}: number; {|f|1|}: number; }' is not assignable to type '{ {|a|2|}: { {|a|3|}: string; }; {|b|4|}: string; }'. !!! error TS2322: Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. +!!! annotated symbol 0 tests/cases/compiler/incompatibleTypes.ts:66:47 +!!! annotated symbol 1 tests/cases/compiler/incompatibleTypes.ts:66:53 +!!! annotated symbol 2 tests/cases/compiler/incompatibleTypes.ts:66:11 +!!! annotated symbol 3 tests/cases/compiler/incompatibleTypes.ts:66:16 +!!! annotated symbol 4 tests/cases/compiler/incompatibleTypes.ts:66:30 var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; diff --git a/tests/baselines/reference/indexSignatureAndMappedType.errors.txt b/tests/baselines/reference/indexSignatureAndMappedType.errors.txt index 7e94dbed718c4..f1f698215a1a7 100644 --- a/tests/baselines/reference/indexSignatureAndMappedType.errors.txt +++ b/tests/baselines/reference/indexSignatureAndMappedType.errors.txt @@ -13,7 +13,11 @@ tests/cases/compiler/indexSignatureAndMappedType.ts(16,5): error TS2322: Type '{ x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [key: string]: T; }' is not assignable to type 'Record'. +!!! error TS2322: Type '{ [key: string]: {|T|0|}; }' is not assignable to type '{|Record|1|}<{|K|2|}, {|T|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/indexSignatureAndMappedType.ts:4:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 2 tests/cases/compiler/indexSignatureAndMappedType.ts:4:16 +!!! annotated symbol 3 tests/cases/compiler/indexSignatureAndMappedType.ts:4:13 } function f2(x: { [key: string]: T }, y: Record) { @@ -24,12 +28,25 @@ tests/cases/compiler/indexSignatureAndMappedType.ts(16,5): error TS2322: Type '{ function f3(x: { [key: string]: T }, y: Record) { x = y; // Error ~ -!!! error TS2322: Type 'Record' is not assignable to type '{ [key: string]: T; }'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Record|0|}<{|K|1|}, {|U|2|}>' is not assignable to type '{ [key: string]: {|T|3|}; }'. +!!! error TS2322: Type '{|U|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2322: '{|U|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 1 tests/cases/compiler/indexSignatureAndMappedType.ts:14:19 +!!! annotated symbol 2 tests/cases/compiler/indexSignatureAndMappedType.ts:14:16 +!!! annotated symbol 3 tests/cases/compiler/indexSignatureAndMappedType.ts:14:13 +!!! annotated symbol 4 tests/cases/compiler/indexSignatureAndMappedType.ts:14:16 +!!! annotated symbol 5 tests/cases/compiler/indexSignatureAndMappedType.ts:14:13 +!!! annotated symbol 6 tests/cases/compiler/indexSignatureAndMappedType.ts:14:16 +!!! annotated symbol 7 tests/cases/compiler/indexSignatureAndMappedType.ts:14:13 +!!! annotated symbol 8 tests/cases/compiler/indexSignatureAndMappedType.ts:14:13 y = x; // Error ~ -!!! error TS2322: Type '{ [key: string]: T; }' is not assignable to type 'Record'. +!!! error TS2322: Type '{ [key: string]: {|T|0|}; }' is not assignable to type '{|Record|1|}<{|K|2|}, {|U|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/indexSignatureAndMappedType.ts:14:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1452:6 +!!! annotated symbol 2 tests/cases/compiler/indexSignatureAndMappedType.ts:14:19 +!!! annotated symbol 3 tests/cases/compiler/indexSignatureAndMappedType.ts:14:16 } // Repro from #14548 diff --git a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.errors.txt b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.errors.txt index bcc9d9a05b8b8..e4e818a043b1b 100644 --- a/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.errors.txt +++ b/tests/baselines/reference/indexSignatureOfTypeUnknownStillRequiresIndexSignature.errors.txt @@ -13,6 +13,8 @@ tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts(9 f(stooges); // Should throw ~~~~~~~ -!!! error TS2345: Argument of type '{ name: string; age: number; }[]' is not assignable to parameter of type '{ [x: string]: unknown; }'. +!!! error TS2345: Argument of type '{ {|name|0|}: string; {|age|1|}: number; }[]' is not assignable to parameter of type '{ [x: string]: unknown; }'. !!! error TS2345: Index signature is missing in type '{ name: string; age: number; }[]'. +!!! annotated symbol 0 tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts:4:5 +!!! annotated symbol 1 tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts:4:18 \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeInference.errors.txt b/tests/baselines/reference/indexSignatureTypeInference.errors.txt index aa25f11db5937..04fb993dd2a99 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeInference.errors.txt @@ -22,7 +22,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureType var v1 = numberMapToArray(stringMap); // Ok var v1 = stringMapToArray(numberMap); // Error expected here ~~~~~~~~~ -!!! error TS2345: Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap'. +!!! error TS2345: Argument of type '{|NumberMap|0|}<{|Function|1|}>' is not assignable to parameter of type '{|StringMap|2|}'. !!! error TS2345: Index signature is missing in type 'NumberMap'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts:1:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:272:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts:5:11 var v1 = stringMapToArray(stringMap); // Ok \ No newline at end of file diff --git a/tests/baselines/reference/indexedAccessRelation.errors.txt b/tests/baselines/reference/indexedAccessRelation.errors.txt index 84e65df856d28..3b8f8a2fd9938 100644 --- a/tests/baselines/reference/indexedAccessRelation.errors.txt +++ b/tests/baselines/reference/indexedAccessRelation.errors.txt @@ -25,13 +25,31 @@ tests/cases/compiler/indexedAccessRelation.ts(16,23): error TS2345: Argument of foo(a: T) { this.setState({ a: a }); ~~~~~~~~ -!!! error TS2345: Argument of type '{ a: T; }' is not assignable to parameter of type 'Pick, "a">'. +!!! error TS2345: Argument of type '{ {|a|0|}: {|T|1|}; }' is not assignable to parameter of type '{|Pick|2|}<{|S|3|} & {|State|4|}<{|T|5|}>, "a">'. !!! error TS2345: Types of property 'a' are incompatible. -!!! error TS2345: Type 'T' is not assignable to type 'S["a"] & T'. -!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"] & T'. -!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'. -!!! error TS2345: Type 'T' is not assignable to type 'S["a"]'. -!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'. +!!! error TS2345: Type '{|T|6|}' is not assignable to type '{|S|7|}["a"] & {|T|8|}'. +!!! error TS2345: Type '{|Foo|9|}' is not assignable to type '{|S|10|}["a"] & {|T|11|}'. +!!! error TS2345: Type '{|Foo|12|}' is not assignable to type '{|S|13|}["a"]'. +!!! error TS2345: Type '{|T|14|}' is not assignable to type '{|S|15|}["a"]'. +!!! error TS2345: Type '{|Foo|16|}' is not assignable to type '{|S|17|}["a"]'. +!!! annotated symbol 0 tests/cases/compiler/indexedAccessRelation.ts:16:25 +!!! annotated symbol 1 tests/cases/compiler/indexedAccessRelation.ts:13:12 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 3 tests/cases/compiler/indexedAccessRelation.ts:13:27 +!!! annotated symbol 4 tests/cases/compiler/indexedAccessRelation.ts:7:18 +!!! annotated symbol 5 tests/cases/compiler/indexedAccessRelation.ts:13:12 +!!! annotated symbol 6 tests/cases/compiler/indexedAccessRelation.ts:13:12 +!!! annotated symbol 7 tests/cases/compiler/indexedAccessRelation.ts:13:27 +!!! annotated symbol 8 tests/cases/compiler/indexedAccessRelation.ts:13:12 +!!! annotated symbol 9 tests/cases/compiler/indexedAccessRelation.ts:11:7 +!!! annotated symbol 10 tests/cases/compiler/indexedAccessRelation.ts:13:27 +!!! annotated symbol 11 tests/cases/compiler/indexedAccessRelation.ts:13:12 +!!! annotated symbol 12 tests/cases/compiler/indexedAccessRelation.ts:11:7 +!!! annotated symbol 13 tests/cases/compiler/indexedAccessRelation.ts:13:27 +!!! annotated symbol 14 tests/cases/compiler/indexedAccessRelation.ts:13:12 +!!! annotated symbol 15 tests/cases/compiler/indexedAccessRelation.ts:13:27 +!!! annotated symbol 16 tests/cases/compiler/indexedAccessRelation.ts:11:7 +!!! annotated symbol 17 tests/cases/compiler/indexedAccessRelation.ts:13:27 } } \ No newline at end of file diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.errors.txt b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.errors.txt index 7c79c63f78ae4..a9c74ee54cd08 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.errors.txt +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.errors.txt @@ -194,10 +194,26 @@ tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts(180,26): error TS23 declare function bar(f: () => T[]): T[]; let x: Foo[] = bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ state: State.A; }[] | { state: State.B; }[]' is not assignable to type '{ state: State.A; }[]'. -!!! error TS2322: Type '{ state: State.B; }[]' is not assignable to type '{ state: State.A; }[]'. -!!! error TS2322: Type '{ state: State.B; }' is not assignable to type '{ state: State.A; }'. +!!! error TS2322: Type '{ {|state|0|}: {|State|1|}.A; }[] | { {|state|2|}: {|State|3|}.B; }[]' is not assignable to type '{ {|state|4|}: {|State|5|}.A; }[]'. +!!! error TS2322: Type '{ {|state|6|}: {|State|7|}.B; }[]' is not assignable to type '{ {|state|8|}: {|State|9|}.A; }[]'. +!!! error TS2322: Type '{ {|state|10|}: {|State|11|}.B; }' is not assignable to type '{ {|state|12|}: {|State|13|}.A; }'. !!! error TS2322: Types of property 'state' are incompatible. -!!! error TS2322: Type 'State.B' is not assignable to type 'State.A'. +!!! error TS2322: Type '{|State|14|}.B' is not assignable to type '{|State|15|}.A'. !!! related TS6502 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:179:28: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:38 +!!! annotated symbol 1 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 2 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:61 +!!! annotated symbol 3 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 4 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:38 +!!! annotated symbol 5 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 6 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:61 +!!! annotated symbol 7 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 8 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:38 +!!! annotated symbol 9 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 10 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:61 +!!! annotated symbol 11 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 12 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:180:38 +!!! annotated symbol 13 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 14 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 +!!! annotated symbol 15 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:177:6 \ No newline at end of file diff --git a/tests/baselines/reference/inferTypes1.errors.txt b/tests/baselines/reference/inferTypes1.errors.txt index 1de0ca2562f8a..2c6fcb3c48662 100644 --- a/tests/baselines/reference/inferTypes1.errors.txt +++ b/tests/baselines/reference/inferTypes1.errors.txt @@ -57,8 +57,9 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(145,40): error TS2322: !!! error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. type T18 = ReturnType; // Error ~~~~~~~~ -!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. +!!! error TS2344: Type '{|Function|0|}' does not satisfy the constraint '(...args: any) => any'. !!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 type T19 = ReturnType<(x: string, ...args: T) => T[]>; // T[] type U10 = InstanceType; // C @@ -69,8 +70,9 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(145,40): error TS2322: !!! error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any) => any'. type U14 = InstanceType; // Error ~~~~~~~~ -!!! error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any) => any'. +!!! error TS2344: Type '{|Function|0|}' does not satisfy the constraint 'new (...args: any) => any'. !!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 type ArgumentType any> = T extends (a: infer A) => any ? A : any; @@ -83,8 +85,9 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(145,40): error TS2322: !!! error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'. type T25 = ArgumentType; // Error ~~~~~~~~ -!!! error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'. +!!! error TS2344: Type '{|Function|0|}' does not satisfy the constraint '(x: any) => any'. !!! error TS2344: Type 'Function' provides no match for the signature '(x: any): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 type T26 = ArgumentType; // any type T27 = ArgumentType; // never @@ -137,8 +140,9 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(145,40): error TS2322: type T72 = { y: T }; type T73 = T extends T72 ? T70 : never; // Error ~ -!!! error TS2344: Type 'U' does not satisfy the constraint 'string'. +!!! error TS2344: Type '{|U|0|}' does not satisfy the constraint 'string'. !!! error TS2344: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/inferTypes1.ts:83:35 type T74 = { x: T, y: U }; type T75 = T extends T74 ? T70 | T72 | T74 : never; @@ -202,8 +206,10 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(145,40): error TS2322: type A = T extends string ? { [P in T]: void; } : T; type B = string extends T ? { [P in T]: void; } : T; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'. -!!! error TS2322: Type 'T' is not assignable to type 'symbol'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'string | number | symbol'. +!!! error TS2322: Type '{|T|1|}' is not assignable to type 'symbol'. +!!! annotated symbol 0 tests/cases/conformance/types/conditional/inferTypes1.ts:145:8 +!!! annotated symbol 1 tests/cases/conformance/types/conditional/inferTypes1.ts:145:8 // Repro from #22302 diff --git a/tests/baselines/reference/infiniteConstraints.errors.txt b/tests/baselines/reference/infiniteConstraints.errors.txt index 685b18932c119..1d7db3eca252d 100644 --- a/tests/baselines/reference/infiniteConstraints.errors.txt +++ b/tests/baselines/reference/infiniteConstraints.errors.txt @@ -39,11 +39,13 @@ tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' c const shouldBeError = ensureNoDuplicates({main: value("dup"), alternate: value("dup")}); ~~~~ -!!! error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'. +!!! error TS2322: Type '{|Record|0|}<"val", "dup">' is not assignable to type 'never'. !!! related TS6500 tests/cases/compiler/infiniteConstraints.ts:31:43: The expected type comes from property 'main' which is declared here on type '{ main: never; alternate: never; }' +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1452:6 ~~~~~~~~~ -!!! error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'. +!!! error TS2322: Type '{|Record|0|}<"val", "dup">' is not assignable to type 'never'. !!! related TS6500 tests/cases/compiler/infiniteConstraints.ts:31:63: The expected type comes from property 'alternate' which is declared here on type '{ main: never; alternate: never; }' +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1452:6 // Repro from #26448 diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt index 2df05fd6a04e0..13e62d5ad118c 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt @@ -25,19 +25,33 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansion var ownerList: OwnerList; list = ownerList; ~~~~ -!!! error TS2322: Type 'OwnerList' is not assignable to type 'List'. +!!! error TS2322: Type '{|OwnerList|0|}' is not assignable to type '{|List|1|}'. !!! error TS2322: Types of property 'data' are incompatible. -!!! error TS2322: Type 'List' is not assignable to type 'string'. +!!! error TS2322: Type '{|List|2|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:10:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:3:11 function other(x: T) { var list: List; var ownerList: OwnerList; list = ownerList; ~~~~ -!!! error TS2322: Type 'OwnerList' is not assignable to type 'List'. +!!! error TS2322: Type '{|OwnerList|0|}<{|T|1|}>' is not assignable to type '{|List|2|}<{|T|3|}>'. !!! error TS2322: Types of property 'data' are incompatible. -!!! error TS2322: Type 'List' is not assignable to type 'T'. -!!! error TS2322: 'List' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|List|4|}<{|T|5|}>' is not assignable to type '{|T|6|}'. +!!! error TS2322: '{|List|7|}<{|T|8|}>' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:10:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:3:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughInstantiation.ts:18:16 } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance1.errors.txt b/tests/baselines/reference/inheritance1.errors.txt index de5e1c6d0dfbb..b930724bb3e42 100644 --- a/tests/baselines/reference/inheritance1.errors.txt +++ b/tests/baselines/reference/inheritance1.errors.txt @@ -30,17 +30,25 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2741: Property 'select' is m } class ImageBase extends Control implements SelectableControl{ ~~~~~~~~~ -!!! error TS2420: Class 'ImageBase' incorrectly implements interface 'SelectableControl'. -!!! error TS2420: Property 'select' is missing in type 'ImageBase' but required in type 'SelectableControl'. +!!! error TS2420: Class '{|ImageBase|0|}' incorrectly implements interface '{|SelectableControl|1|}'. +!!! error TS2420: Property 'select' is missing in type '{|ImageBase|2|}' but required in type '{|SelectableControl|3|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:5:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:14:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:4:11 +!!! annotated symbol 2 tests/cases/compiler/inheritance1.ts:14:7 +!!! annotated symbol 3 tests/cases/compiler/inheritance1.ts:4:11 } class Image1 extends Control { } class Locations implements SelectableControl { ~~~~~~~~~ -!!! error TS2420: Class 'Locations' incorrectly implements interface 'SelectableControl'. -!!! error TS2420: Property 'state' is missing in type 'Locations' but required in type 'SelectableControl'. +!!! error TS2420: Class '{|Locations|0|}' incorrectly implements interface '{|SelectableControl|1|}'. +!!! error TS2420: Property 'state' is missing in type '{|Locations|2|}' but required in type '{|SelectableControl|3|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:18:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:4:11 +!!! annotated symbol 2 tests/cases/compiler/inheritance1.ts:18:7 +!!! annotated symbol 3 tests/cases/compiler/inheritance1.ts:4:11 select() { } } class Locations1 { @@ -55,8 +63,10 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2741: Property 'select' is m b = sc; b = c; ~ -!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'Button'. +!!! error TS2741: Property 'select' is missing in type '{|Control|0|}' but required in type '{|Button|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:9:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:8:7 var t: TextBox; sc = t; @@ -64,14 +74,18 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2741: Property 'select' is m t = sc; t = c; ~ -!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'TextBox'. +!!! error TS2741: Property 'select' is missing in type '{|Control|0|}' but required in type '{|TextBox|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:12:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:11:7 var i: ImageBase; sc = i; ~~ -!!! error TS2741: Property 'select' is missing in type 'ImageBase' but required in type 'SelectableControl'. +!!! error TS2741: Property 'select' is missing in type '{|ImageBase|0|}' but required in type '{|SelectableControl|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:5:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:14:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:4:11 c = i; i = sc; i = c; @@ -79,8 +93,10 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2741: Property 'select' is m var i1: Image1; sc = i1; ~~ -!!! error TS2741: Property 'select' is missing in type 'Image1' but required in type 'SelectableControl'. +!!! error TS2741: Property 'select' is missing in type '{|Image1|0|}' but required in type '{|SelectableControl|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:5:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:16:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:4:11 c = i1; i1 = sc; i1 = c; @@ -88,29 +104,41 @@ tests/cases/compiler/inheritance1.ts(61,1): error TS2741: Property 'select' is m var l: Locations; sc = l; ~~ -!!! error TS2741: Property 'state' is missing in type 'Locations' but required in type 'SelectableControl'. +!!! error TS2741: Property 'state' is missing in type '{|Locations|0|}' but required in type '{|SelectableControl|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:18:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:4:11 c = l; ~ -!!! error TS2741: Property 'state' is missing in type 'Locations' but required in type 'Control'. +!!! error TS2741: Property 'state' is missing in type '{|Locations|0|}' but required in type '{|Control|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:18:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:1:7 l = sc; l = c; ~ -!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'Locations'. +!!! error TS2741: Property 'select' is missing in type '{|Control|0|}' but required in type '{|Locations|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:19:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:18:7 var l1: Locations1; sc = l1; ~~ -!!! error TS2741: Property 'state' is missing in type 'Locations1' but required in type 'SelectableControl'. +!!! error TS2741: Property 'state' is missing in type '{|Locations1|0|}' but required in type '{|SelectableControl|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:21:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:4:11 c = l1; ~ -!!! error TS2741: Property 'state' is missing in type 'Locations1' but required in type 'Control'. +!!! error TS2741: Property 'state' is missing in type '{|Locations1|0|}' but required in type '{|Control|1|}'. !!! related TS2728 tests/cases/compiler/inheritance1.ts:2:13: 'state' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:21:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:1:7 l1 = sc; l1 = c; ~~ -!!! error TS2741: Property 'select' is missing in type 'Control' but required in type 'Locations1'. -!!! related TS2728 tests/cases/compiler/inheritance1.ts:22:5: 'select' is declared here. \ No newline at end of file +!!! error TS2741: Property 'select' is missing in type '{|Control|0|}' but required in type '{|Locations1|1|}'. +!!! related TS2728 tests/cases/compiler/inheritance1.ts:22:5: 'select' is declared here. +!!! annotated symbol 0 tests/cases/compiler/inheritance1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/inheritance1.ts:21:7 \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt index 84a04107008f7..b6e221f6516cc 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt @@ -11,8 +11,10 @@ tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts(7,7): error class C extends B { ~ -!!! error TS2415: Class 'C' incorrectly extends base class 'B'. +!!! error TS2415: Class '{|C|0|}' incorrectly extends base class '{|B|1|}'. !!! error TS2415: Types have separate declarations of a private property 'myMethod'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceGrandParentPrivateMemberCollision.ts:5:7 private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt index 7486fbc6e8f5c..3347efddf3332 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt @@ -11,8 +11,10 @@ tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMembe class C extends B { ~ -!!! error TS2415: Class 'C' incorrectly extends base class 'B'. +!!! error TS2415: Class '{|C|0|}' incorrectly extends base class '{|B|1|}'. !!! error TS2415: Property 'myMethod' is private in type 'B' but not in type 'C'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.ts:5:7 public myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt index 1ef0d8c0cdbe1..1638baa3e552f 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt @@ -11,8 +11,10 @@ tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMembe class C extends B { ~ -!!! error TS2415: Class 'C' incorrectly extends base class 'B'. +!!! error TS2415: Class '{|C|0|}' incorrectly extends base class '{|B|1|}'. !!! error TS2415: Property 'myMethod' is private in type 'C' but not in type 'B'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.ts:5:7 private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt index 38b1ed61facfa..ee9f2dd1613c5 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt @@ -14,9 +14,11 @@ tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(11,16): error class b extends a { ~ -!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Class static side 'typeof {|b|0|}' incorrectly extends base class static side 'typeof {|a|1|}'. !!! error TS2417: Types of property 'x' are incompatible. !!! error TS2417: Type 'string' is not assignable to type '() => string'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts:1:7 static get x() { ~ !!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt index cfe05da8ea49e..74c37dedfaf70 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt @@ -21,9 +21,11 @@ tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(10,7): error TS2 class b extends a { ~ -!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Class static side 'typeof {|b|0|}' incorrectly extends base class static side 'typeof {|a|1|}'. !!! error TS2417: Types of property 'x' are incompatible. !!! error TS2417: Type '() => string' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts:1:7 static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt index 61edfe7fc64eb..46ba74b3cdb85 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt @@ -10,9 +10,11 @@ tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts(5,7): error TS24 class b extends a { ~ -!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Class static side 'typeof {|b|0|}' incorrectly extends base class static side 'typeof {|a|1|}'. !!! error TS2417: Types of property 'x' are incompatible. !!! error TS2417: Type '() => string' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceStaticFuncOverridingProperty.ts:1:7 static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt index 49dfd2de51371..d8067cc40e677 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt @@ -10,8 +10,10 @@ tests/cases/compiler/inheritanceStaticMembersIncompatible.ts(5,7): error TS2417: class b extends a { ~ -!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Class static side 'typeof {|b|0|}' incorrectly extends base class static side 'typeof {|a|1|}'. !!! error TS2417: Types of property 'x' are incompatible. !!! error TS2417: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceStaticMembersIncompatible.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceStaticMembersIncompatible.ts:1:7 static x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt index 22748fda78392..f7a986bd3cbba 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt @@ -12,8 +12,10 @@ tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts(7,7): error TS class b extends a { ~ -!!! error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. +!!! error TS2417: Class static side 'typeof {|b|0|}' incorrectly extends base class static side 'typeof {|a|1|}'. !!! error TS2417: Types of property 'x' are incompatible. !!! error TS2417: Type 'string' is not assignable to type '() => string'. +!!! annotated symbol 0 tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/inheritanceStaticPropertyOverridingMethod.ts:1:7 static x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt index 0b7e00d95cea3..65256e99eba01 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt @@ -13,10 +13,12 @@ tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2417: Cla class D extends C { ~ -!!! error TS2417: Class static side 'typeof D' incorrectly extends base class static side 'typeof C'. +!!! error TS2417: Class static side 'typeof {|D|0|}' incorrectly extends base class static side 'typeof {|C|1|}'. !!! error TS2417: Types of property 'foo' are incompatible. !!! error TS2417: Type '() => number' is not assignable to type '() => string'. !!! error TS2417: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/inheritedModuleMembersForClodule.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/inheritedModuleMembersForClodule.ts:1:7 } module D { diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt index b99efb5e157ce..edaedf6881f7a 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt @@ -21,9 +21,11 @@ tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): er } interface E extends A, D { } // error ~ -!!! error TS2430: Interface 'E' incorrectly extends interface 'D'. +!!! error TS2430: Interface '{|E|0|}' incorrectly extends interface '{|D|1|}'. !!! error TS2430: Index signatures are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts:13:11 +!!! annotated symbol 1 tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts:10:11 // Same tests for number indexer @@ -40,6 +42,8 @@ tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts(28,11): er } interface E2 extends A2, D2 { } // error ~~ -!!! error TS2430: Interface 'E2' incorrectly extends interface 'D2'. +!!! error TS2430: Interface '{|E2|0|}' incorrectly extends interface '{|D2|1|}'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts:28:11 +!!! annotated symbol 1 tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts:25:11 \ No newline at end of file diff --git a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt index c4a7c6809bcc5..e055b9367aaad 100644 --- a/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt +++ b/tests/baselines/reference/inlineJsxFactoryDeclarationsLocalTypes.errors.txt @@ -75,8 +75,14 @@ tests/cases/conformance/jsx/inline/index.tsx(24,48): error TS2322: Type 'import( let elem = prerendered; elem = ; // Expect assignability error here ~~~~ -!!! error TS2741: Property '__predomBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. +!!! error TS2741: Property '__predomBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer").{|dom|0|}.{|JSX|1|}.{|Element|2|}' but required in type 'import("tests/cases/conformance/jsx/inline/renderer2").{|predom|3|}.{|JSX|4|}.{|Element|5|}'. !!! related TS2728 tests/cases/conformance/jsx/inline/renderer2.d.ts:7:13: '__predomBrand' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/renderer.d.ts:19:17 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/renderer.d.ts:2:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer.d.ts:6:19 +!!! annotated symbol 3 tests/cases/conformance/jsx/inline/renderer2.d.ts:19:17 +!!! annotated symbol 4 tests/cases/conformance/jsx/inline/renderer2.d.ts:2:15 +!!! annotated symbol 5 tests/cases/conformance/jsx/inline/renderer2.d.ts:6:19 const DOMSFC = (props: {x: number, y: number, children?: dom.JSX.Element[]}) =>

{props.x} + {props.y} = {props.x + props.y}{props.children}

; @@ -94,21 +100,49 @@ tests/cases/conformance/jsx/inline/index.tsx(24,48): error TS2322: Type 'import( // Should fail, no dom elements const _brokenTree = ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. +!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").{|dom|0|}.{|JSX|1|}.{|Element|2|}' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").{|predom|3|}.{|JSX|4|}.{|Element|5|}'. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/renderer.d.ts:19:17 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/renderer.d.ts:2:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer.d.ts:6:19 +!!! annotated symbol 3 tests/cases/conformance/jsx/inline/renderer2.d.ts:19:17 +!!! annotated symbol 4 tests/cases/conformance/jsx/inline/renderer2.d.ts:2:15 +!!! annotated symbol 5 tests/cases/conformance/jsx/inline/renderer2.d.ts:6:19 ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2605: JSX element type 'MyClass' is not a constructor function for JSX elements. -!!! error TS2605: Property '__domBrand' is missing in type 'MyClass' but required in type 'ElementClass'. +!!! error TS2605: JSX element type '{|MyClass|0|}' is not a constructor function for JSX elements. +!!! error TS2605: Property '__domBrand' is missing in type '{|MyClass|1|}' but required in type '{|ElementClass|2|}'. !!! related TS2728 tests/cases/conformance/jsx/inline/renderer.d.ts:7:13: '__domBrand' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/component.tsx:6:14 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/component.tsx:6:14 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer.d.ts:12:19 ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. +!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer").{|dom|0|}.{|JSX|1|}.{|Element|2|}' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer2").{|predom|3|}.{|JSX|4|}.{|Element|5|}'. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/renderer.d.ts:19:17 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/renderer.d.ts:2:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer.d.ts:6:19 +!!! annotated symbol 3 tests/cases/conformance/jsx/inline/renderer2.d.ts:19:17 +!!! annotated symbol 4 tests/cases/conformance/jsx/inline/renderer2.d.ts:2:15 +!!! annotated symbol 5 tests/cases/conformance/jsx/inline/renderer2.d.ts:6:19 ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2605: JSX element type 'MyClass' is not a constructor function for JSX elements. +!!! error TS2605: JSX element type '{|MyClass|0|}' is not a constructor function for JSX elements. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/component.tsx:6:14 // Should fail, nondom isn't allowed as children of dom const _brokenTree2 = {tree}{tree} ~~~~~~ -!!! error TS2741: Property '__domBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. +!!! error TS2741: Property '__domBrand' is missing in type 'import("tests/cases/conformance/jsx/inline/renderer2").{|predom|0|}.{|JSX|1|}.{|Element|2|}' but required in type 'import("tests/cases/conformance/jsx/inline/renderer").{|dom|3|}.{|JSX|4|}.{|Element|5|}'. !!! related TS2728 tests/cases/conformance/jsx/inline/renderer.d.ts:7:13: '__domBrand' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/renderer2.d.ts:19:17 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/renderer2.d.ts:2:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer2.d.ts:6:19 +!!! annotated symbol 3 tests/cases/conformance/jsx/inline/renderer.d.ts:19:17 +!!! annotated symbol 4 tests/cases/conformance/jsx/inline/renderer.d.ts:2:15 +!!! annotated symbol 5 tests/cases/conformance/jsx/inline/renderer.d.ts:6:19 ~~~~~~ -!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer").dom.JSX.Element'. +!!! error TS2322: Type 'import("tests/cases/conformance/jsx/inline/renderer2").{|predom|0|}.{|JSX|1|}.{|Element|2|}' is not assignable to type 'import("tests/cases/conformance/jsx/inline/renderer").{|dom|3|}.{|JSX|4|}.{|Element|5|}'. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/renderer2.d.ts:19:17 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/renderer2.d.ts:2:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer2.d.ts:6:19 +!!! annotated symbol 3 tests/cases/conformance/jsx/inline/renderer.d.ts:19:17 +!!! annotated symbol 4 tests/cases/conformance/jsx/inline/renderer.d.ts:2:15 +!!! annotated symbol 5 tests/cases/conformance/jsx/inline/renderer.d.ts:6:19 \ No newline at end of file diff --git a/tests/baselines/reference/inlineJsxFactoryLocalTypeGlobalFallback.errors.txt b/tests/baselines/reference/inlineJsxFactoryLocalTypeGlobalFallback.errors.txt index c8490e7e33f7e..f94b7b9ca57db 100644 --- a/tests/baselines/reference/inlineJsxFactoryLocalTypeGlobalFallback.errors.txt +++ b/tests/baselines/reference/inlineJsxFactoryLocalTypeGlobalFallback.errors.txt @@ -45,6 +45,11 @@ tests/cases/conformance/jsx/inline/index.tsx(5,1): error TS2741: Property '__pre let elem = prerendered; elem = ; // Expect assignability error here ~~~~ -!!! error TS2741: Property '__predomBrand' is missing in type 'JSX.Element' but required in type 'import("tests/cases/conformance/jsx/inline/renderer2").predom.JSX.Element'. +!!! error TS2741: Property '__predomBrand' is missing in type '{|JSX|0|}.{|Element|1|}' but required in type 'import("tests/cases/conformance/jsx/inline/renderer2").{|predom|2|}.{|JSX|3|}.{|Element|4|}'. !!! related TS2728 tests/cases/conformance/jsx/inline/renderer2.d.ts:7:13: '__predomBrand' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/inline/renderer.d.ts:2:15 +!!! annotated symbol 1 tests/cases/conformance/jsx/inline/renderer.d.ts:6:19 +!!! annotated symbol 2 tests/cases/conformance/jsx/inline/renderer2.d.ts:15:17 +!!! annotated symbol 3 tests/cases/conformance/jsx/inline/renderer2.d.ts:2:15 +!!! annotated symbol 4 tests/cases/conformance/jsx/inline/renderer2.d.ts:6:19 \ No newline at end of file diff --git a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt index 84b454d7ea0a6..bf45f8b819196 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt +++ b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt @@ -11,5 +11,7 @@ tests/cases/compiler/instanceSubtypeCheck2.ts(6,5): error TS2416: Property 'x' i x: string ~ !!! error TS2416: Property 'x' in type 'C2' is not assignable to the same property in base type 'C1'. -!!! error TS2416: Type 'string' is not assignable to type 'C2'. +!!! error TS2416: Type 'string' is not assignable to type '{|C2|0|}<{|T|1|}>'. +!!! annotated symbol 0 tests/cases/compiler/instanceSubtypeCheck2.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/instanceSubtypeCheck2.ts:5:10 } \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 326ad2f18cd50..f4218019a90cd 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -207,7 +207,8 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj8: i1 = anyVar; var obj9: i1 = new anyVar; ~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i1'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i1|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:1:11 ~ !!! error TS1109: Expression expected. ~~ @@ -221,27 +222,33 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj11: i2; var obj12: i2 = {}; ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i2'. +!!! error TS2322: Type '{}' is not assignable to type '{|i2|0|}'. !!! error TS2322: Type '{}' provides no match for the signature '(): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:12:11 var obj13: i2 = new Object(); ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i2'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|i2|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature '(): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:12:11 var obj14: i2 = new obj11; ~~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i2'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{|i2|1|}'. !!! error TS2322: Type 'Base' provides no match for the signature '(): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:46:7 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:12:11 var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; var obj19: i2 = anyVar; var obj20: i2 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i2'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i2|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:12:11 ~ !!! error TS1109: Expression expected. ~~ @@ -255,28 +262,35 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj22: i3; var obj23: i3 = {}; ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i3'. +!!! error TS2322: Type '{}' is not assignable to type '{|i3|0|}'. !!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:23:11 var obj24: i3 = new Object(); ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i3'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|i3|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:23:11 var obj25: i3 = new obj22; var obj26: i3 = new Base; ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i3'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{|i3|1|}'. !!! error TS2322: Type 'Base' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:46:7 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:23:11 var obj27: i3 = null; var obj28: i3 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i3'. +!!! error TS2322: Type '() => void' is not assignable to type '{|i3|0|}'. !!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:23:11 //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i3'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i3|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:23:11 ~ !!! error TS1109: Expression expected. ~~ @@ -300,7 +314,8 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj41: i4 = anyVar; var obj42: i4 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i4'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i4|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:33:11 ~ !!! error TS1109: Expression expected. ~~ @@ -333,7 +348,8 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj52: i5 = anyVar; var obj53: i5 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i5'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i5|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:40:11 ~ !!! error TS1109: Expression expected. ~~ @@ -347,30 +363,37 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj55: i6; var obj56: i6 = {}; ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i6'. +!!! error TS2322: Type '{}' is not assignable to type '{|i6|0|}'. !!! error TS2322: Type '{}' provides no match for the signature '(): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:41:11 var obj57: i6 = new Object(); ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i6'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|i6|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature '(): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:41:11 var obj58: i6 = new obj55; ~~~~~~~~~ !!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i6'. +!!! error TS2322: Type '{|Base|0|}' is not assignable to type '{|i6|1|}'. !!! error TS2322: Type 'Base' provides no match for the signature '(): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:46:7 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:41:11 var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i6'. +!!! error TS2322: Type '() => void' is not assignable to type '{|i6|0|}'. !!! error TS2322: Type 'void' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:41:11 //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i6'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i6|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:41:11 ~ !!! error TS1109: Expression expected. ~~ @@ -384,28 +407,35 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj66: i7; var obj67: i7 = {}; ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i7'. +!!! error TS2322: Type '{}' is not assignable to type '{|i7|0|}'. !!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:42:11 var obj68: i7 = new Object(); ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i7'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|i7|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:42:11 var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Conversion of type '{|Base|0|}' to type '{|i7|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. !!! error TS2352: Type 'Base' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:46:7 +!!! annotated symbol 1 tests/cases/compiler/intTypeCheck.ts:42:11 var obj71: i7 = null; var obj72: i7 = function () { }; ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i7'. +!!! error TS2322: Type '() => void' is not assignable to type '{|i7|0|}'. !!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:42:11 //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i7'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i7|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:42:11 ~ !!! error TS1109: Expression expected. ~~ @@ -429,7 +459,8 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj85: i8 = anyVar; var obj86: i8 = new anyVar; ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i8'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|i8|0|}'. +!!! annotated symbol 0 tests/cases/compiler/intTypeCheck.ts:43:11 ~ !!! error TS1109: Expression expected. ~~ diff --git a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt index 2e4e5270437d9..7bf139e2cdce0 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt +++ b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt @@ -41,10 +41,16 @@ tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEy x=x.sort(CompareYeux); // parameter mismatch ~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. +!!! error TS2345: Argument of type '(a: {|IFrenchEye|0|}, b: {|IFrenchEye|1|}) => number' is not assignable to parameter of type '(a: {|IEye|2|}, b: {|IEye|3|}) => number'. !!! error TS2345: Types of parameters 'a' and 'a' are incompatible. -!!! error TS2345: Property 'coleur' is missing in type 'IEye' but required in type 'IFrenchEye'. +!!! error TS2345: Property 'coleur' is missing in type '{|IEye|4|}' but required in type '{|IFrenchEye|5|}'. !!! related TS2728 tests/cases/compiler/interfaceAssignmentCompat.ts:13:9: 'coleur' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceAssignmentCompat.ts:12:22 +!!! annotated symbol 1 tests/cases/compiler/interfaceAssignmentCompat.ts:12:22 +!!! annotated symbol 2 tests/cases/compiler/interfaceAssignmentCompat.ts:8:22 +!!! annotated symbol 3 tests/cases/compiler/interfaceAssignmentCompat.ts:8:22 +!!! annotated symbol 4 tests/cases/compiler/interfaceAssignmentCompat.ts:8:22 +!!! annotated symbol 5 tests/cases/compiler/interfaceAssignmentCompat.ts:12:22 // type of z inferred from specialized array type var z=x.sort(CompareEyes); // ok @@ -58,12 +64,18 @@ tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEy for (var j=z.length=1;j>=0;j--) { eeks[j]=z[j]; // nope: element assignment ~~~~~~~ -!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2322: Type '{|IEye|0|}' is not assignable to type '{|IFrenchEye|1|}'. +!!! annotated symbol 0 tests/cases/compiler/interfaceAssignmentCompat.ts:8:22 +!!! annotated symbol 1 tests/cases/compiler/interfaceAssignmentCompat.ts:12:22 } eeks=z; // nope: array assignment ~~~~ -!!! error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]'. -!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2322: Type '{|IEye|0|}[]' is not assignable to type '{|IFrenchEye|1|}[]'. +!!! error TS2322: Type '{|IEye|2|}' is not assignable to type '{|IFrenchEye|3|}'. +!!! annotated symbol 0 tests/cases/compiler/interfaceAssignmentCompat.ts:8:22 +!!! annotated symbol 1 tests/cases/compiler/interfaceAssignmentCompat.ts:12:22 +!!! annotated symbol 2 tests/cases/compiler/interfaceAssignmentCompat.ts:8:22 +!!! annotated symbol 3 tests/cases/compiler/interfaceAssignmentCompat.ts:12:22 return result; } } diff --git a/tests/baselines/reference/interfaceDeclaration1.errors.txt b/tests/baselines/reference/interfaceDeclaration1.errors.txt index 64410b44c551a..969dfc9729f0f 100644 --- a/tests/baselines/reference/interfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration1.errors.txt @@ -60,9 +60,13 @@ tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i class C1 implements I3 { ~~ -!!! error TS2420: Class 'C1' incorrectly implements interface 'I3'. -!!! error TS2420: Property 'prototype' is missing in type 'C1' but required in type 'I3'. +!!! error TS2420: Class '{|C1|0|}' incorrectly implements interface '{|I3|1|}'. +!!! error TS2420: Property 'prototype' is missing in type '{|C1|2|}' but required in type '{|I3|3|}'. !!! related TS2728 tests/cases/compiler/interfaceDeclaration1.ts:12:5: 'prototype' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceDeclaration1.ts:35:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceDeclaration1.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/interfaceDeclaration1.ts:35:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceDeclaration1.ts:11:11 constructor() { var prototype: number = 3; } diff --git a/tests/baselines/reference/interfaceDeclaration3.errors.txt b/tests/baselines/reference/interfaceDeclaration3.errors.txt index 2ea419aaa52bc..6c3196459e2d0 100644 --- a/tests/baselines/reference/interfaceDeclaration3.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration3.errors.txt @@ -69,7 +69,9 @@ tests/cases/compiler/interfaceDeclaration3.ts(54,11): error TS2430: Interface 'I interface I2 extends I1 { item:string; } ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'I1'. +!!! error TS2430: Interface '{|I2|0|}' incorrectly extends interface '{|I1|1|}'. !!! error TS2430: Types of property 'item' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/interfaceDeclaration3.ts:54:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceDeclaration3.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration4.errors.txt b/tests/baselines/reference/interfaceDeclaration4.errors.txt index f1838011818c0..452bbf4b2ffc7 100644 --- a/tests/baselines/reference/interfaceDeclaration4.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration4.errors.txt @@ -30,9 +30,11 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,18): error TS1005: ';' expected // Negative Case interface I3 extends Foo.I1 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'I1'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|I1|1|}'. !!! error TS2430: Types of property 'item' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/interfaceDeclaration4.ts:18:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceDeclaration4.ts:4:22 item:number; } @@ -43,9 +45,13 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,18): error TS1005: ';' expected // Err - not implemented item class C2 implements I4 { ~~ -!!! error TS2420: Class 'C2' incorrectly implements interface 'I4'. -!!! error TS2420: Property 'item' is missing in type 'C2' but required in type 'I4'. +!!! error TS2420: Class '{|C2|0|}' incorrectly implements interface '{|I4|1|}'. +!!! error TS2420: Property 'item' is missing in type '{|C2|2|}' but required in type '{|I4|3|}'. !!! related TS2728 tests/cases/compiler/interfaceDeclaration4.ts:4:27: 'item' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceDeclaration4.ts:27:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceDeclaration4.ts:22:11 +!!! annotated symbol 2 tests/cases/compiler/interfaceDeclaration4.ts:27:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceDeclaration4.ts:22:11 public token: string; } @@ -56,9 +62,13 @@ tests/cases/compiler/interfaceDeclaration4.ts(39,18): error TS1005: ';' expected class C3 implements Foo.I1 { } ~~ -!!! error TS2420: Class 'C3' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'item' is missing in type 'C3' but required in type 'I1'. +!!! error TS2420: Class '{|C3|0|}' incorrectly implements interface '{|I1|1|}'. +!!! error TS2420: Property 'item' is missing in type '{|C3|2|}' but required in type '{|I1|3|}'. !!! related TS2728 tests/cases/compiler/interfaceDeclaration4.ts:4:27: 'item' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceDeclaration4.ts:36:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceDeclaration4.ts:4:22 +!!! annotated symbol 2 tests/cases/compiler/interfaceDeclaration4.ts:36:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceDeclaration4.ts:4:22 // Negative case interface Foo.I1 { } diff --git a/tests/baselines/reference/interfaceDeclaration6.errors.txt b/tests/baselines/reference/interfaceDeclaration6.errors.txt index ab5ac03a31dc2..d4de65c76a148 100644 --- a/tests/baselines/reference/interfaceDeclaration6.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration6.errors.txt @@ -8,9 +8,11 @@ tests/cases/compiler/interfaceDeclaration6.ts(3,11): error TS2430: Interface 'i3 interface i2 extends i1 { foo: number; }; interface i3 extends i1 { foo: string; }; ~~ -!!! error TS2430: Interface 'i3' incorrectly extends interface 'i1'. +!!! error TS2430: Interface '{|i3|0|}' incorrectly extends interface '{|i1|1|}'. !!! error TS2430: Types of property 'foo' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/interfaceDeclaration6.ts:3:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceDeclaration6.ts:1:11 interface i4 { bar():any; bar():any; diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt index 13e4c3b6e86e9..bf3b5e29dd71f 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt @@ -10,8 +10,10 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I extends Foo { // error ~ -!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'. +!!! error TS2430: Interface '{|I|0|}' incorrectly extends interface '{|Foo|1|}'. !!! error TS2430: Property 'x' is private in type 'Foo' but not in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates.ts:1:7 x: string; } diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt index ea0e50af0586b..a462fec142603 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt @@ -25,11 +25,15 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I4 extends Foo, Bar { // error ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'Bar'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '{|Bar|1|}'. !!! error TS2430: Property 'x' is private in type 'Bar' but not in type 'I4'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts:12:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts:5:7 ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'Foo'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '{|Foo|1|}'. !!! error TS2430: Property 'x' is private in type 'Foo' but not in type 'I4'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts:12:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithPrivates2.ts:1:7 x: string; } diff --git a/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt index eb5eb371c019f..0c579373e0869 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt @@ -10,8 +10,10 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I extends Foo { // error ~ -!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'. +!!! error TS2430: Interface '{|I|0|}' incorrectly extends interface '{|Foo|1|}'. !!! error TS2430: Property 'x' is protected but type 'I' is not a class derived from 'Foo'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts:1:7 x: string; } diff --git a/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt index a957482362c1f..0e55b8fb35f01 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithProtecteds2.errors.txt @@ -25,11 +25,15 @@ tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtending interface I4 extends Foo, Bar { // error ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'Bar'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '{|Bar|1|}'. !!! error TS2430: Property 'x' is protected but type 'I4' is not a class derived from 'Bar'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts:12:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts:5:7 ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'Foo'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '{|Foo|1|}'. !!! error TS2430: Property 'x' is protected but type 'I4' is not a class derived from 'Foo'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts:12:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds2.ts:1:7 x: string; } diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt index 02219574b7d51..c477480bfe44f 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt @@ -26,14 +26,18 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts(27,1): error TS2739: T c = i; i = c; // error ~ -!!! error TS2741: Property 'other' is missing in type 'C' but required in type 'I'. +!!! error TS2741: Property 'other' is missing in type '{|C|0|}' but required in type '{|I|1|}'. !!! related TS2728 tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts:7:5: 'other' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts:6:11 i = d; d = i; // error ~ -!!! error TS2741: Property 'bar' is missing in type 'I' but required in type 'D'. +!!! error TS2741: Property 'bar' is missing in type '{|I|0|}' but required in type '{|D|1|}'. !!! related TS2728 tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts:13:5: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts:6:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceExtendsClassWithPrivate1.ts:10:7 c = d; d = c; // error diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt index d6af9ce44ddd7..56deed1e4f7e2 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt @@ -20,11 +20,15 @@ tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts(20,13): error TS2416: class D extends C implements I { // error ~ -!!! error TS2415: Class 'D' incorrectly extends base class 'C'. +!!! error TS2415: Class '{|D|0|}' incorrectly extends base class '{|C|1|}'. !!! error TS2415: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts:1:7 ~ -!!! error TS2420: Class 'D' incorrectly implements interface 'I'. +!!! error TS2420: Class '{|D|0|}' incorrectly implements interface '{|I|1|}'. !!! error TS2420: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceExtendsClassWithPrivate2.ts:6:11 public foo(x: any) { return x; } private x = 2; private y = 3; diff --git a/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.errors.txt b/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.errors.txt index 17cb5585cf87e..b779ab1c6b694 100644 --- a/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.errors.txt +++ b/tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.errors.txt @@ -64,30 +64,40 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI interface I1 extends T1 { a: string } ~~ -!!! error TS2430: Interface 'I1' incorrectly extends interface 'T1'. +!!! error TS2430: Interface '{|I1|0|}' incorrectly extends interface '{|T1|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:7:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 interface I2 extends T2 { b: string } ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'T2'. -!!! error TS2430: Type 'I2' is not assignable to type '{ b: number; }'. +!!! error TS2430: Interface '{|I2|0|}' incorrectly extends interface '{|T2|1|}'. +!!! error TS2430: Type '{|I2|2|}' is not assignable to type '{ {|b|3|}: number; }'. !!! error TS2430: Types of property 'b' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:8:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:2:6 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:8:11 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:2:18 interface I3 extends T3 { length: string } ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'number[]'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface 'number[]'. !!! error TS2430: Types of property 'length' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:9:11 interface I4 extends T4 { 0: number } ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface '[string, number]'. +!!! error TS2430: Interface '{|I4|0|}' incorrectly extends interface '[string, number]'. !!! error TS2430: Types of property '0' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:10:11 interface I5 extends T5 { c: number } ~~ -!!! error TS2430: Interface 'I5' incorrectly extends interface 'T5'. +!!! error TS2430: Interface '{|I5|0|}' incorrectly extends interface '{|T5|1|}'. !!! error TS2430: Types of property 'c' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:11:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:5:6 type Constructor = new () => T; declare function Constructor(): Constructor; @@ -123,19 +133,26 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI interface I10 extends TCX { a: number } ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'typeof CX'. +!!! error TS2430: Interface '{|I10|0|}' incorrectly extends interface 'typeof {|CX|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:30:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:22:15 interface I11 extends TEX { C: string } ~~~ -!!! error TS2430: Interface 'I11' incorrectly extends interface 'typeof EX'. +!!! error TS2430: Interface '{|I11|0|}' incorrectly extends interface 'typeof {|EX|1|}'. !!! error TS2430: Types of property 'C' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'EX'. +!!! error TS2430: Type 'string' is not assignable to type '{|EX|2|}'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:31:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:23:14 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:23:14 interface I12 extends TNX { a: number } ~~~ -!!! error TS2430: Interface 'I12' incorrectly extends interface 'typeof NX'. +!!! error TS2430: Interface '{|I12|0|}' incorrectly extends interface 'typeof {|NX|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'number' is not assignable to type '"hello"'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:24:19 interface I14 extends TCX { [x: string]: number } ~~~~~~~~~~~~~~~~~~~ !!! error TS2411: Property 'a' of type 'string' is not assignable to string index type 'number'. @@ -152,26 +169,43 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI interface I20 extends Partial { a: string } ~~~ -!!! error TS2430: Interface 'I20' incorrectly extends interface 'Partial'. +!!! error TS2430: Interface '{|I20|0|}' incorrectly extends interface '{|Partial|1|}<{|T1|2|}>'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number | undefined'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:39:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 interface I21 extends Readonly { a: string } ~~~ -!!! error TS2430: Interface 'I21' incorrectly extends interface 'Readonly'. +!!! error TS2430: Interface '{|I21|0|}' incorrectly extends interface '{|Readonly|1|}<{|T1|2|}>'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:40:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 interface I22 extends Identifiable { a: string } ~~~ -!!! error TS2430: Interface 'I22' incorrectly extends interface 'Identifiable'. -!!! error TS2430: Type 'I22' is not assignable to type 'T1'. +!!! error TS2430: Interface '{|I22|0|}' incorrectly extends interface '{|Identifiable|1|}<{|T1|2|}>'. +!!! error TS2430: Type '{|I22|3|}' is not assignable to type '{|T1|4|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:41:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:37:6 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:41:11 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 interface I23 extends Identifiable { a: string } ~~~ -!!! error TS2430: Interface 'I23' incorrectly extends interface 'Identifiable'. -!!! error TS2430: Type 'I23' is not assignable to type 'T1'. +!!! error TS2430: Interface '{|I23|0|}' incorrectly extends interface '{|Identifiable|1|}<{|T1|2|} & { {|b|3|}: number; }>'. +!!! error TS2430: Type '{|I23|4|}' is not assignable to type '{|T1|5|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:42:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:37:6 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:42:43 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:42:11 +!!! annotated symbol 5 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts:1:6 type U = { a: number } | { b: string }; diff --git a/tests/baselines/reference/interfaceImplementation1.errors.txt b/tests/baselines/reference/interfaceImplementation1.errors.txt index 9f061b6c5c08a..c588293933302 100644 --- a/tests/baselines/reference/interfaceImplementation1.errors.txt +++ b/tests/baselines/reference/interfaceImplementation1.errors.txt @@ -20,11 +20,15 @@ tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2322: Type '() = class C1 implements I1,I2 { ~~ -!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'. +!!! error TS2420: Class '{|C1|0|}' incorrectly implements interface '{|I1|1|}'. !!! error TS2420: Property 'iObj' is private in type 'C1' but not in type 'I1'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation1.ts:12:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation1.ts:1:11 ~~ -!!! error TS2420: Class 'C1' incorrectly implements interface 'I2'. +!!! error TS2420: Class '{|C1|0|}' incorrectly implements interface '{|I2|1|}'. !!! error TS2420: Property 'iFn' is private in type 'C1' but not in type 'I2'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation1.ts:12:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation1.ts:8:11 private iFn(); private iFn(n?:number, s?:string) { } private iAny:any; @@ -48,8 +52,10 @@ tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2322: Type '() = var a:I4 = function(){ ~ -!!! error TS2322: Type '() => C2' is not assignable to type 'I4'. +!!! error TS2322: Type '() => {|C2|0|}' is not assignable to type '{|I4|1|}'. !!! error TS2322: Type '() => C2' provides no match for the signature 'new (): I3'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation1.ts:30:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation1.ts:24:11 return new C2(); } new a(); diff --git a/tests/baselines/reference/interfaceImplementation2.errors.txt b/tests/baselines/reference/interfaceImplementation2.errors.txt index 193b08276d62b..a613060af8013 100644 --- a/tests/baselines/reference/interfaceImplementation2.errors.txt +++ b/tests/baselines/reference/interfaceImplementation2.errors.txt @@ -12,9 +12,13 @@ tests/cases/compiler/interfaceImplementation2.ts(8,7): error TS2420: Class 'C3' class C3 implements I1 { ~~ -!!! error TS2420: Class 'C3' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'iFn' is missing in type 'C3' but required in type 'I1'. +!!! error TS2420: Class '{|C3|0|}' incorrectly implements interface '{|I1|1|}'. +!!! error TS2420: Property 'iFn' is missing in type '{|C3|2|}' but required in type '{|I1|3|}'. !!! related TS2728 tests/cases/compiler/interfaceImplementation2.ts:5:5: 'iFn' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation2.ts:8:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation2.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/interfaceImplementation2.ts:8:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceImplementation2.ts:1:11 public iObj:{ }; public iNum:number; public iAny:any; diff --git a/tests/baselines/reference/interfaceImplementation3.errors.txt b/tests/baselines/reference/interfaceImplementation3.errors.txt index 723f684ad28d3..dab7179eddd62 100644 --- a/tests/baselines/reference/interfaceImplementation3.errors.txt +++ b/tests/baselines/reference/interfaceImplementation3.errors.txt @@ -12,9 +12,13 @@ tests/cases/compiler/interfaceImplementation3.ts(8,7): error TS2420: Class 'C4' class C4 implements I1 { ~~ -!!! error TS2420: Class 'C4' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'iAny' is missing in type 'C4' but required in type 'I1'. +!!! error TS2420: Class '{|C4|0|}' incorrectly implements interface '{|I1|1|}'. +!!! error TS2420: Property 'iAny' is missing in type '{|C4|2|}' but required in type '{|I1|3|}'. !!! related TS2728 tests/cases/compiler/interfaceImplementation3.ts:4:5: 'iAny' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation3.ts:8:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation3.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/interfaceImplementation3.ts:8:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceImplementation3.ts:1:11 public iObj:{ }; public iNum:number; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation4.errors.txt b/tests/baselines/reference/interfaceImplementation4.errors.txt index 10d165db0bfd9..534b9223dcbe3 100644 --- a/tests/baselines/reference/interfaceImplementation4.errors.txt +++ b/tests/baselines/reference/interfaceImplementation4.errors.txt @@ -12,9 +12,13 @@ tests/cases/compiler/interfaceImplementation4.ts(8,7): error TS2420: Class 'C5' class C5 implements I1 { ~~ -!!! error TS2420: Class 'C5' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'iObj' is missing in type 'C5' but required in type 'I1'. +!!! error TS2420: Class '{|C5|0|}' incorrectly implements interface '{|I1|1|}'. +!!! error TS2420: Property 'iObj' is missing in type '{|C5|2|}' but required in type '{|I1|3|}'. !!! related TS2728 tests/cases/compiler/interfaceImplementation4.ts:2:5: 'iObj' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation4.ts:8:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation4.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/interfaceImplementation4.ts:8:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceImplementation4.ts:1:11 public iNum:number; public iAny:any; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation6.errors.txt b/tests/baselines/reference/interfaceImplementation6.errors.txt index 357e3701d959b..44a71e95cf40d 100644 --- a/tests/baselines/reference/interfaceImplementation6.errors.txt +++ b/tests/baselines/reference/interfaceImplementation6.errors.txt @@ -15,16 +15,22 @@ tests/cases/compiler/interfaceImplementation6.ts(13,7): error TS2420: Class 'C3' class C2 implements I1 { ~~ -!!! error TS2420: Class 'C2' incorrectly implements interface 'I1'. +!!! error TS2420: Class '{|C2|0|}' incorrectly implements interface '{|I1|1|}'. !!! error TS2420: Property 'item' is private in type 'C2' but not in type 'I1'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation6.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation6.ts:1:11 private item:number; } class C3 implements I1 { ~~ -!!! error TS2420: Class 'C3' incorrectly implements interface 'I1'. -!!! error TS2420: Property 'item' is missing in type 'C3' but required in type 'I1'. +!!! error TS2420: Class '{|C3|0|}' incorrectly implements interface '{|I1|1|}'. +!!! error TS2420: Property 'item' is missing in type '{|C3|2|}' but required in type '{|I1|3|}'. !!! related TS2728 tests/cases/compiler/interfaceImplementation6.ts:2:5: 'item' is declared here. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation6.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation6.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/interfaceImplementation6.ts:13:7 +!!! annotated symbol 3 tests/cases/compiler/interfaceImplementation6.ts:1:11 constructor() { var item: number; } diff --git a/tests/baselines/reference/interfaceImplementation7.errors.txt b/tests/baselines/reference/interfaceImplementation7.errors.txt index a275090b19933..fd816892ad692 100644 --- a/tests/baselines/reference/interfaceImplementation7.errors.txt +++ b/tests/baselines/reference/interfaceImplementation7.errors.txt @@ -19,7 +19,11 @@ tests/cases/compiler/interfaceImplementation7.ts(8,12): error TS2416: Property ' public name(): string { return ""; } ~~~~ !!! error TS2416: Property 'name' in type 'C1' is not assignable to the same property in base type 'i4'. -!!! error TS2416: Type '() => string' is not assignable to type '() => { s: string; n: number; }'. -!!! error TS2416: Type 'string' is not assignable to type '{ s: string; n: number; }'. +!!! error TS2416: Type '() => string' is not assignable to type '() => { {|s|0|}: string; {|n|1|}: number; }'. +!!! error TS2416: Type 'string' is not assignable to type '{ {|s|2|}: string; {|n|3|}: number; }'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation7.ts:5:41 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation7.ts:5:52 +!!! annotated symbol 2 tests/cases/compiler/interfaceImplementation7.ts:5:41 +!!! annotated symbol 3 tests/cases/compiler/interfaceImplementation7.ts:5:52 } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation8.errors.txt b/tests/baselines/reference/interfaceImplementation8.errors.txt index 6b4b8f4a4fa13..76d408ed25599 100644 --- a/tests/baselines/reference/interfaceImplementation8.errors.txt +++ b/tests/baselines/reference/interfaceImplementation8.errors.txt @@ -20,8 +20,10 @@ tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2420: Class 'C6' class C2 implements i1 { ~~ -!!! error TS2420: Class 'C2' incorrectly implements interface 'i1'. +!!! error TS2420: Class '{|C2|0|}' incorrectly implements interface '{|i1|1|}'. !!! error TS2420: Property 'name' is private in type 'C2' but not in type 'i1'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation8.ts:12:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation8.ts:4:11 private name:string; } @@ -32,12 +34,16 @@ tests/cases/compiler/interfaceImplementation8.ts(22,7): error TS2420: Class 'C6' class C4 extends C1 implements i1{ } class C5 extends C2 implements i1{ } ~~ -!!! error TS2420: Class 'C5' incorrectly implements interface 'i1'. +!!! error TS2420: Class '{|C5|0|}' incorrectly implements interface '{|i1|1|}'. !!! error TS2420: Property 'name' is private in type 'C5' but not in type 'i1'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation8.ts:21:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation8.ts:4:11 class C6 extends C3 implements i1{ } ~~ -!!! error TS2420: Class 'C6' incorrectly implements interface 'i1'. +!!! error TS2420: Class '{|C6|0|}' incorrectly implements interface '{|i1|1|}'. !!! error TS2420: Property 'name' is private in type 'C6' but not in type 'i1'. +!!! annotated symbol 0 tests/cases/compiler/interfaceImplementation8.ts:22:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceImplementation8.ts:4:11 /* 2 diff --git a/tests/baselines/reference/interfaceInheritance.errors.txt b/tests/baselines/reference/interfaceInheritance.errors.txt index e6dc8538f73a5..475d7104e66e3 100644 --- a/tests/baselines/reference/interfaceInheritance.errors.txt +++ b/tests/baselines/reference/interfaceInheritance.errors.txt @@ -33,8 +33,10 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is n class C1 implements I2 { // should be an error - it doesn't implement the members of I1 ~~ -!!! error TS2420: Class 'C1' incorrectly implements interface 'I2'. +!!! error TS2420: Class '{|C1|0|}' incorrectly implements interface '{|I2|1|}'. !!! error TS2420: Type 'C1' is missing the following properties from type 'I2': i1P1, i1P2 +!!! annotated symbol 0 tests/cases/compiler/interfaceInheritance.ts:22:7 +!!! annotated symbol 1 tests/cases/compiler/interfaceInheritance.ts:6:11 public i2P1: string; } @@ -53,13 +55,17 @@ tests/cases/compiler/interfaceInheritance.ts(38,1): error TS2322: Type 'I4' is n i4 = i5; // should be an error ~~ -!!! error TS2322: Type 'I5' is not assignable to type 'I4'. +!!! error TS2322: Type '{|I5|0|}' is not assignable to type '{|I4|1|}'. !!! error TS2322: Types of property 'one' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/interfaceInheritance.ts:18:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceInheritance.ts:14:11 i5 = i4; // should be an error ~~ -!!! error TS2322: Type 'I4' is not assignable to type 'I5'. +!!! error TS2322: Type '{|I4|0|}' is not assignable to type '{|I5|1|}'. !!! error TS2322: Types of property 'one' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/interfaceInheritance.ts:14:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceInheritance.ts:18:11 \ No newline at end of file diff --git a/tests/baselines/reference/interfaceMemberValidation.errors.txt b/tests/baselines/reference/interfaceMemberValidation.errors.txt index 3b2b1d1874c21..95893d0cd5bc8 100644 --- a/tests/baselines/reference/interfaceMemberValidation.errors.txt +++ b/tests/baselines/reference/interfaceMemberValidation.errors.txt @@ -9,9 +9,11 @@ tests/cases/compiler/interfaceMemberValidation.ts(10,2): error TS2374: Duplicate interface i1 { name: string; } interface i2 extends i1 { name: number; yo: string; } ~~ -!!! error TS2430: Interface 'i2' incorrectly extends interface 'i1'. +!!! error TS2430: Interface '{|i2|0|}' incorrectly extends interface '{|i1|1|}'. !!! error TS2430: Types of property 'name' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/interfaceMemberValidation.ts:2:11 +!!! annotated symbol 1 tests/cases/compiler/interfaceMemberValidation.ts:1:11 interface foo { bar():any; diff --git a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt index f66e13c0d9d00..069a27d867b3c 100644 --- a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt +++ b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt @@ -12,11 +12,15 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseP interface Derived extends Base { // error ~~~~~~~ -!!! error TS2430: Interface 'Derived' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|Derived|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type '{ a: string; }' is not assignable to type '{ a: number; }'. +!!! error TS2430: Type '{ {|a|2|}: string; }' is not assignable to type '{ {|a|3|}: number; }'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts:7:9 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatHidesBaseProperty2.ts:2:10 x: { a: string; }; diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt index 138f3d9209650..0f3df2cbfd7ee 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt @@ -46,11 +46,16 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived2 extends Base1, Base2 { // error ~~~~~~~~ -!!! error TS2430: Interface 'Derived2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|Derived2|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }'. +!!! error TS2430: Type '{ {|a|2|}: string; {|b|3|}: number; }' is not assignable to type '{ {|b|4|}: string; }'. !!! error TS2430: Types of property 'b' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:21:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:9:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:23:9 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:23:20 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:11:9 x: { a: string; b: number; } @@ -88,17 +93,35 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived4 extends Base1, Base2 { // error ~~~~~~~~ -!!! error TS2430: Interface 'Derived4' incorrectly extends interface 'Base1'. +!!! error TS2430: Interface '{|Derived4|0|}<{|T|1|}>' incorrectly extends interface '{|Base1|2|}'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }'. +!!! error TS2430: Type '{ {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }' is not assignable to type '{ {|a|7|}: number; }'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'number'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:15 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:28:15 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:56:13 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 +!!! annotated symbol 5 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:56:19 +!!! annotated symbol 6 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 +!!! annotated symbol 7 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:30:13 +!!! annotated symbol 8 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 ~~~~~~~~ -!!! error TS2430: Interface 'Derived4' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|Derived4|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }'. +!!! error TS2430: Type '{ {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }' is not assignable to type '{ {|b|7|}: number; }'. !!! error TS2430: Types of property 'b' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'number'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:15 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:34:15 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:56:13 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 +!!! annotated symbol 5 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:56:19 +!!! annotated symbol 6 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 +!!! annotated symbol 7 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:36:13 +!!! annotated symbol 8 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:54:24 x: { a: T; b: T; } @@ -106,13 +129,27 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived5 extends Base1, Base2 { // error ~~~~~~~~ -!!! error TS2430: Interface 'Derived5' incorrectly extends interface 'Base1'. +!!! error TS2430: Interface '{|Derived5|0|}<{|T|1|}>' incorrectly extends interface '{|Base1|2|}<{|T|3|}>'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type '{ a: T; }'. +!!! error TS2430: Type '{|T|4|}' is not assignable to type '{ {|a|5|}: {|T|6|}; }'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:15 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:28:15 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 +!!! annotated symbol 5 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:30:13 +!!! annotated symbol 6 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 ~~~~~~~~ -!!! error TS2430: Interface 'Derived5' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|Derived5|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}<{|T|3|}>'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type '{ b: T; }'. +!!! error TS2430: Type '{|T|4|}' is not assignable to type '{ {|b|5|}: {|T|6|}; }'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:15 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:34:15 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 +!!! annotated symbol 5 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:36:13 +!!! annotated symbol 6 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts:60:24 x: T; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt index b345923392312..ac34519fcd598 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt @@ -24,11 +24,17 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBa interface Derived2 extends Base, Base2 { // error ~~~~~~~~ -!!! error TS2430: Interface 'Derived2' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|Derived2|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'x' are incompatible. -!!! error TS2430: Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }'. +!!! error TS2430: Type '{ {|a|2|}: number; {|b|3|}: string; }' is not assignable to type '{ {|a|4|}?: string; {|b|5|}: string; }'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts:17:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts:18:10 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts:18:21 +!!! annotated symbol 4 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts:3:9 +!!! annotated symbol 5 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes2.ts:3:21 x: { a: number; b: string } } diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt index 79cbd0e6b4e76..120ee684c3e75 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt @@ -11,8 +11,10 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo extends Base { // error ~~~ -!!! error TS2430: Interface 'Foo' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|Foo|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Property 'x' is private in type 'Base' but not in type 'Foo'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts:1:7 x: number; } @@ -22,7 +24,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo2 extends Base2 { // error ~~~~ -!!! error TS2430: Interface 'Foo2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|Foo2|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}<{|T|3|}>'. !!! error TS2430: Property 'x' is private in type 'Base2' but not in type 'Foo2'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts:13:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts:13:16 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts:9:7 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts:13:16 x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt index 3a31d7dfcbd6a..ec4db1b0685f1 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt @@ -11,8 +11,10 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo extends Base { // error ~~~ -!!! error TS2430: Interface 'Foo' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|Foo|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Property 'x' is private in type 'Base' but not in type 'Foo'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts:1:7 x(): any; } @@ -22,7 +24,11 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyTh interface Foo2 extends Base2 { // error ~~~~ -!!! error TS2430: Interface 'Foo2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|Foo2|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}<{|T|3|}>'. !!! error TS2430: Property 'x' is private in type 'Base2' but not in type 'Foo2'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts:13:11 +!!! annotated symbol 1 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts:13:16 +!!! annotated symbol 2 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts:9:7 +!!! annotated symbol 3 tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType2.ts:13:16 x(): any; } \ No newline at end of file diff --git a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt index 4f3b1db01e305..5bba565d88f77 100644 --- a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt +++ b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt @@ -65,91 +65,301 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e b = anb; // Ok anb = a; ~~~ -!!! error TS2322: Type 'A' is not assignable to type 'A & B'. -!!! error TS2322: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|A|1|} & {|B|2|}'. +!!! error TS2322: Property 'b' is missing in type '{|A|3|}' but required in type '{|B|4|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 anb = b; ~~~ -!!! error TS2322: Type 'B' is not assignable to type 'A & B'. -!!! error TS2322: Property 'a' is missing in type 'B' but required in type 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|A|1|} & {|B|2|}'. +!!! error TS2322: Property 'a' is missing in type '{|B|3|}' but required in type '{|A|4|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:15: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 x = anb; // Ok x = aob; ~ -!!! error TS2322: Type 'A | B' is not assignable to type '(A & B) | (C & D)'. -!!! error TS2322: Type 'A' is not assignable to type '(A & B) | (C & D)'. -!!! error TS2322: Type 'A' is not assignable to type 'A & B'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|A|0|} | {|B|1|}' is not assignable to type '({|A|2|} & {|B|3|}) | ({|C|4|} & {|D|5|})'. +!!! error TS2322: Type '{|A|6|}' is not assignable to type '({|A|7|} & {|B|8|}) | ({|C|9|} & {|D|10|})'. +!!! error TS2322: Type '{|A|11|}' is not assignable to type '{|A|12|} & {|B|13|}'. +!!! error TS2322: Type '{|A|14|}' is not assignable to type '{|B|15|}'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 x = cnd; // Ok x = cod; ~ -!!! error TS2322: Type 'C | D' is not assignable to type '(A & B) | (C & D)'. -!!! error TS2322: Type 'C' is not assignable to type '(A & B) | (C & D)'. -!!! error TS2322: Type 'C' is not assignable to type 'C & D'. -!!! error TS2322: Property 'd' is missing in type 'C' but required in type 'D'. +!!! error TS2322: Type '{|C|0|} | {|D|1|}' is not assignable to type '({|A|2|} & {|B|3|}) | ({|C|4|} & {|D|5|})'. +!!! error TS2322: Type '{|C|6|}' is not assignable to type '({|A|7|} & {|B|8|}) | ({|C|9|} & {|D|10|})'. +!!! error TS2322: Type '{|C|11|}' is not assignable to type '{|C|12|} & {|D|13|}'. +!!! error TS2322: Property 'd' is missing in type '{|C|14|}' but required in type '{|D|15|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 anb = x; ~~~ -!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'. -!!! error TS2322: Type 'C & D' is not assignable to type 'A & B'. -!!! error TS2322: Property 'a' is missing in type 'C & D' but required in type 'A'. +!!! error TS2322: Type '({|A|0|} & {|B|1|}) | ({|C|2|} & {|D|3|})' is not assignable to type '{|A|4|} & {|B|5|}'. +!!! error TS2322: Type '{|C|6|} & {|D|7|}' is not assignable to type '{|A|8|} & {|B|9|}'. +!!! error TS2322: Property 'a' is missing in type '{|C|10|} & {|D|11|}' but required in type '{|A|12|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:15: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 aob = x; ~~~ -!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'. -!!! error TS2322: Type 'C & D' is not assignable to type 'A | B'. -!!! error TS2322: Property 'b' is missing in type 'C & D' but required in type 'B'. +!!! error TS2322: Type '({|A|0|} & {|B|1|}) | ({|C|2|} & {|D|3|})' is not assignable to type '{|A|4|} | {|B|5|}'. +!!! error TS2322: Type '{|C|6|} & {|D|7|}' is not assignable to type '{|A|8|} | {|B|9|}'. +!!! error TS2322: Property 'b' is missing in type '{|C|10|} & {|D|11|}' but required in type '{|B|12|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 cnd = x; ~~~ -!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C & D'. -!!! error TS2322: Type 'A & B' is not assignable to type 'C & D'. -!!! error TS2322: Property 'c' is missing in type 'A & B' but required in type 'C'. +!!! error TS2322: Type '({|A|0|} & {|B|1|}) | ({|C|2|} & {|D|3|})' is not assignable to type '{|C|4|} & {|D|5|}'. +!!! error TS2322: Type '{|A|6|} & {|B|7|}' is not assignable to type '{|C|8|} & {|D|9|}'. +!!! error TS2322: Property 'c' is missing in type '{|A|10|} & {|B|11|}' but required in type '{|C|12|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:15: 'c' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 cod = x; ~~~ -!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'. -!!! error TS2322: Type 'A & B' is not assignable to type 'C | D'. -!!! error TS2322: Property 'd' is missing in type 'A & B' but required in type 'D'. +!!! error TS2322: Type '({|A|0|} & {|B|1|}) | ({|C|2|} & {|D|3|})' is not assignable to type '{|C|4|} | {|D|5|}'. +!!! error TS2322: Type '{|A|6|} & {|B|7|}' is not assignable to type '{|C|8|} | {|D|9|}'. +!!! error TS2322: Property 'd' is missing in type '{|A|10|} & {|B|11|}' but required in type '{|D|12|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 y = anb; ~ -!!! error TS2322: Type 'A & B' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'A & B' is not assignable to type 'B & D'. -!!! error TS2322: Type 'A & B' is not assignable to type 'D'. +!!! error TS2322: Type '{|A|0|} & {|B|1|}' is not assignable to type '({|A|2|} & {|C|3|}) | ({|A|4|} & {|D|5|}) | ({|B|6|} & {|C|7|}) | ({|B|8|} & {|D|9|})'. +!!! error TS2322: Type '{|A|10|} & {|B|11|}' is not assignable to type '{|B|12|} & {|D|13|}'. +!!! error TS2322: Type '{|A|14|} & {|B|15|}' is not assignable to type '{|D|16|}'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 16 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 y = aob; ~ -!!! error TS2322: Type 'A | B' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'A' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'A' is not assignable to type 'A & D'. -!!! error TS2322: Property 'd' is missing in type 'A' but required in type 'D'. +!!! error TS2322: Type '{|A|0|} | {|B|1|}' is not assignable to type '({|A|2|} & {|C|3|}) | ({|A|4|} & {|D|5|}) | ({|B|6|} & {|C|7|}) | ({|B|8|} & {|D|9|})'. +!!! error TS2322: Type '{|A|10|}' is not assignable to type '({|A|11|} & {|C|12|}) | ({|A|13|} & {|D|14|}) | ({|B|15|} & {|C|16|}) | ({|B|17|} & {|D|18|})'. +!!! error TS2322: Type '{|A|19|}' is not assignable to type '{|A|20|} & {|D|21|}'. +!!! error TS2322: Property 'd' is missing in type '{|A|22|}' but required in type '{|D|23|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 16 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 17 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 18 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 19 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 20 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 21 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 22 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 23 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 y = cnd; ~ -!!! error TS2322: Type 'C & D' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'C & D' is not assignable to type 'B & D'. -!!! error TS2322: Type 'C & D' is not assignable to type 'B'. +!!! error TS2322: Type '{|C|0|} & {|D|1|}' is not assignable to type '({|A|2|} & {|C|3|}) | ({|A|4|} & {|D|5|}) | ({|B|6|} & {|C|7|}) | ({|B|8|} & {|D|9|})'. +!!! error TS2322: Type '{|C|10|} & {|D|11|}' is not assignable to type '{|B|12|} & {|D|13|}'. +!!! error TS2322: Type '{|C|14|} & {|D|15|}' is not assignable to type '{|B|16|}'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 16 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 y = cod; ~ -!!! error TS2322: Type 'C | D' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'C' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'C' is not assignable to type 'B & C'. -!!! error TS2322: Property 'b' is missing in type 'C' but required in type 'B'. +!!! error TS2322: Type '{|C|0|} | {|D|1|}' is not assignable to type '({|A|2|} & {|C|3|}) | ({|A|4|} & {|D|5|}) | ({|B|6|} & {|C|7|}) | ({|B|8|} & {|D|9|})'. +!!! error TS2322: Type '{|C|10|}' is not assignable to type '({|A|11|} & {|C|12|}) | ({|A|13|} & {|D|14|}) | ({|B|15|} & {|C|16|}) | ({|B|17|} & {|D|18|})'. +!!! error TS2322: Type '{|C|19|}' is not assignable to type '{|B|20|} & {|C|21|}'. +!!! error TS2322: Property 'b' is missing in type '{|C|22|}' but required in type '{|B|23|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 16 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 17 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 18 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 19 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 20 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 21 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 22 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 23 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 anb = y; ~~~ -!!! error TS2322: Type '(A & C) | (A & D) | (B & C) | (B & D)' is not assignable to type 'A & B'. -!!! error TS2322: Type 'A & C' is not assignable to type 'A & B'. -!!! error TS2322: Property 'b' is missing in type 'A & C' but required in type 'B'. +!!! error TS2322: Type '({|A|0|} & {|C|1|}) | ({|A|2|} & {|D|3|}) | ({|B|4|} & {|C|5|}) | ({|B|6|} & {|D|7|})' is not assignable to type '{|A|8|} & {|B|9|}'. +!!! error TS2322: Type '{|A|10|} & {|C|11|}' is not assignable to type '{|A|12|} & {|B|13|}'. +!!! error TS2322: Property 'b' is missing in type '{|A|14|} & {|C|15|}' but required in type '{|B|16|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 16 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 aob = y; // Ok cnd = y; ~~~ -!!! error TS2322: Type '(A & C) | (A & D) | (B & C) | (B & D)' is not assignable to type 'C & D'. -!!! error TS2322: Type 'A & C' is not assignable to type 'C & D'. -!!! error TS2322: Property 'd' is missing in type 'A & C' but required in type 'D'. +!!! error TS2322: Type '({|A|0|} & {|C|1|}) | ({|A|2|} & {|D|3|}) | ({|B|4|} & {|C|5|}) | ({|B|6|} & {|D|7|})' is not assignable to type '{|C|8|} & {|D|9|}'. +!!! error TS2322: Type '{|A|10|} & {|C|11|}' is not assignable to type '{|C|12|} & {|D|13|}'. +!!! error TS2322: Property 'd' is missing in type '{|A|14|} & {|C|15|}' but required in type '{|D|16|}'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:11 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 8 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 9 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 10 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 11 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 12 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 13 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 +!!! annotated symbol 14 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:1:11 +!!! annotated symbol 15 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:3:11 +!!! annotated symbol 16 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:11 cod = y; // Ok \ No newline at end of file diff --git a/tests/baselines/reference/intersectionTypeAssignment.errors.txt b/tests/baselines/reference/intersectionTypeAssignment.errors.txt index 960a3ec4ec0bb..9406b357ad27b 100644 --- a/tests/baselines/reference/intersectionTypeAssignment.errors.txt +++ b/tests/baselines/reference/intersectionTypeAssignment.errors.txt @@ -16,25 +16,41 @@ tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts(14,1): a = y; x = a; // Error ~ -!!! error TS2741: Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: string; }'. +!!! error TS2741: Property 'b' is missing in type '{ {|a|0|}: string; }' but required in type '{ {|a|1|}: string; {|b|2|}: string; }'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:21: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:1:10 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:10 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:21 y = a; // Error ~ -!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: string; } & { b: string; }'. -!!! error TS2322: Property 'b' is missing in type '{ a: string; }' but required in type '{ b: string; }'. +!!! error TS2322: Type '{ {|a|0|}: string; }' is not assignable to type '{ {|a|1|}: string; } & { {|b|2|}: string; }'. +!!! error TS2322: Property 'b' is missing in type '{ {|a|3|}: string; }' but required in type '{ {|b|4|}: string; }'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:26: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:1:10 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:10 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:26 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:1:10 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:26 b = x; b = y; x = b; // Error ~ -!!! error TS2741: Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; b: string; }'. +!!! error TS2741: Property 'a' is missing in type '{ {|b|0|}: string; }' but required in type '{ {|a|1|}: string; {|b|2|}: string; }'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:10: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:2:10 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:10 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:3:21 y = b; // Error ~ -!!! error TS2322: Type '{ b: string; }' is not assignable to type '{ a: string; } & { b: string; }'. -!!! error TS2322: Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; }'. +!!! error TS2322: Type '{ {|b|0|}: string; }' is not assignable to type '{ {|a|1|}: string; } & { {|b|2|}: string; }'. +!!! error TS2322: Property 'a' is missing in type '{ {|b|3|}: string; }' but required in type '{ {|a|4|}: string; }'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:10: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:2:10 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:10 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:26 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:2:10 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionTypeAssignment.ts:4:10 x = y; y = x; diff --git a/tests/baselines/reference/intersectionTypeInference.errors.txt b/tests/baselines/reference/intersectionTypeInference.errors.txt index b6c8ef8aa4e73..faa00f38bc24f 100644 --- a/tests/baselines/reference/intersectionTypeInference.errors.txt +++ b/tests/baselines/reference/intersectionTypeInference.errors.txt @@ -13,14 +13,30 @@ tests/cases/conformance/types/intersection/intersectionTypeInference.ts(6,5): er obj2 = result; result = obj1; // Error ~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'T & U'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|T|1|} & {|U|2|}'. +!!! error TS2322: Type '{|T|3|}' is not assignable to type '{|U|4|}'. +!!! error TS2322: '{|T|5|}' is assignable to the constraint of type '{|U|6|}', but '{|U|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 result = obj2; // Error ~~~~~~ -!!! error TS2322: Type 'U' is not assignable to type 'T & U'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|} & {|U|2|}'. +!!! error TS2322: Type '{|U|3|}' is not assignable to type '{|T|4|}'. +!!! error TS2322: '{|U|5|}' is assignable to the constraint of type '{|T|6|}', but '{|T|7|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:20 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 +!!! annotated symbol 7 tests/cases/conformance/types/intersection/intersectionTypeInference.ts:1:17 return result; } diff --git a/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt b/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt index 97ed1cf489588..8da6301e7e04e 100644 --- a/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt +++ b/tests/baselines/reference/intersectionWithUnionConstraint.errors.txt @@ -29,35 +29,55 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12 function f2(x: T & U) { let y1: string | number = x; // Error ~~ -!!! error TS2322: Type 'T & U' is not assignable to type 'string | number'. +!!! error TS2322: Type '{|T|0|} & {|U|1|}' is not assignable to type 'string | number'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'string | number'. !!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. -!!! error TS2322: Type 'T & U' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|2|} & {|U|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 let y2: string | null = x; // Error ~~ -!!! error TS2322: Type 'T & U' is not assignable to type 'string | null'. +!!! error TS2322: Type '{|T|0|} & {|U|1|}' is not assignable to type 'string | null'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'string | null'. !!! error TS2322: Type 'undefined' is not assignable to type 'string | null'. -!!! error TS2322: Type 'T & U' is not assignable to type 'string'. +!!! error TS2322: Type '{|T|2|} & {|U|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 let y3: string | undefined = x; let y4: number | null = x; // Error ~~ -!!! error TS2322: Type 'T & U' is not assignable to type 'number | null'. +!!! error TS2322: Type '{|T|0|} & {|U|1|}' is not assignable to type 'number | null'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'number | null'. !!! error TS2322: Type 'undefined' is not assignable to type 'number | null'. -!!! error TS2322: Type 'T & U' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|2|} & {|U|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 let y5: number | undefined = x; // Error ~~ -!!! error TS2322: Type 'T & U' is not assignable to type 'number | undefined'. +!!! error TS2322: Type '{|T|0|} & {|U|1|}' is not assignable to type 'number | undefined'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'number | undefined'. !!! error TS2322: Type 'string' is not assignable to type 'number | undefined'. -!!! error TS2322: Type 'T & U' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|2|} & {|U|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 let y6: null | undefined = x; // Error ~~ -!!! error TS2322: Type 'T & U' is not assignable to type 'null | undefined'. +!!! error TS2322: Type '{|T|0|} & {|U|1|}' is not assignable to type 'null | undefined'. !!! error TS2322: Type 'string | undefined' is not assignable to type 'null | undefined'. !!! error TS2322: Type 'string' is not assignable to type 'null | undefined'. -!!! error TS2322: Type 'T & U' is not assignable to type 'null'. +!!! error TS2322: Type '{|T|2|} & {|U|3|}' is not assignable to type 'null'. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:13 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts:6:52 } type T1 = (string | number | undefined) & (string | null | undefined); // string | undefined diff --git a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt index fd3fa48c01be2..d625811805cf5 100644 --- a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt +++ b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt @@ -29,28 +29,35 @@ tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts(22,5): var c: C; x = C; ~ -!!! error TS2322: Type 'typeof C' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof {|C|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:7:7 x = c; ~ -!!! error TS2322: Type 'C' is not assignable to type 'void'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:7:7 interface I { foo: string; } var i: I; x = i; ~ -!!! error TS2322: Type 'I' is not assignable to type 'void'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:12:11 module M { export var x = 1; } x = M; ~ -!!! error TS2322: Type 'typeof M' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof {|M|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:16:8 function f(a: T) { x = a; ~ -!!! error TS2322: Type 'T' is not assignable to type 'void'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:19:12 } x = f; ~ -!!! error TS2322: Type '(a: T) => void' is not assignable to type 'void'. -!!! related TS6212 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:22:5: Did you mean to call this expression? \ No newline at end of file +!!! error TS2322: Type '<{|T|0|}>(a: {|T|1|}) => void' is not assignable to type 'void'. +!!! related TS6212 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:22:5: Did you mean to call this expression? +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:19:12 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts:19:12 \ No newline at end of file diff --git a/tests/baselines/reference/invalidBooleanAssignments.errors.txt b/tests/baselines/reference/invalidBooleanAssignments.errors.txt index bfa14d090a6f6..29a375f34e724 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.errors.txt +++ b/tests/baselines/reference/invalidBooleanAssignments.errors.txt @@ -28,17 +28,20 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26 enum E { A } var e: E = x; ~ -!!! error TS2322: Type 'true' is not assignable to type 'E'. +!!! error TS2322: Type 'true' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts:8:6 class C { foo: string } var f: C = x; ~ -!!! error TS2322: Type 'true' is not assignable to type 'C'. +!!! error TS2322: Type 'true' is not assignable to type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts:11:7 interface I { bar: string } var g: I = x; ~ -!!! error TS2322: Type 'true' is not assignable to type 'I'. +!!! error TS2322: Type 'true' is not assignable to type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts:14:11 var h: { (): string } = x; ~ @@ -53,8 +56,11 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26 function i(a: T) { a = x; ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'T'. -!!! error TS2322: 'boolean' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|T|0|}'. +!!! error TS2322: 'boolean' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts:23:12 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts:23:12 +!!! annotated symbol 2 tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts:23:12 } i = x; ~ diff --git a/tests/baselines/reference/invalidConstraint1.errors.txt b/tests/baselines/reference/invalidConstraint1.errors.txt index e8a4ec43c09c8..6870edf6062be 100644 --- a/tests/baselines/reference/invalidConstraint1.errors.txt +++ b/tests/baselines/reference/invalidConstraint1.errors.txt @@ -9,8 +9,10 @@ tests/cases/compiler/invalidConstraint1.ts(4,11): error TS2344: Type '{ a: numbe } f(); // should error ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: string; }'. +!!! error TS2344: Type '{ {|a|0|}: number; }' does not satisfy the constraint '{ {|a|1|}: string; }'. !!! error TS2344: Types of property 'a' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/invalidConstraint1.ts:4:13 +!!! annotated symbol 1 tests/cases/compiler/invalidConstraint1.ts:1:27 \ No newline at end of file diff --git a/tests/baselines/reference/invalidEnumAssignments.errors.txt b/tests/baselines/reference/invalidEnumAssignments.errors.txt index e769a829c9789..1b2f76c7ea99a 100644 --- a/tests/baselines/reference/invalidEnumAssignments.errors.txt +++ b/tests/baselines/reference/invalidEnumAssignments.errors.txt @@ -22,22 +22,31 @@ tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts(21,5): e e = E2.A; ~ -!!! error TS2322: Type 'E2.A' is not assignable to type 'E'. +!!! error TS2322: Type '{|E2|0|}.A' is not assignable to type '{|E|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:6:6 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:1:6 e2 = E.A; ~~ -!!! error TS2322: Type 'E.A' is not assignable to type 'E2'. +!!! error TS2322: Type '{|E|0|}.A' is not assignable to type '{|E2|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:1:6 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:6:6 e = null; ~ -!!! error TS2322: Type 'void' is not assignable to type 'E'. +!!! error TS2322: Type 'void' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:1:6 e = {}; ~ -!!! error TS2322: Type '{}' is not assignable to type 'E'. +!!! error TS2322: Type '{}' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:1:6 e = ''; ~ -!!! error TS2322: Type '""' is not assignable to type 'E'. +!!! error TS2322: Type '""' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:1:6 function f(a: T) { e = a; ~ -!!! error TS2322: Type 'T' is not assignable to type 'E'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|E|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:20:12 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/enum/invalidEnumAssignments.ts:1:6 } \ No newline at end of file diff --git a/tests/baselines/reference/invalidNumberAssignments.errors.txt b/tests/baselines/reference/invalidNumberAssignments.errors.txt index 6ddda47eefab9..213b6140955e0 100644 --- a/tests/baselines/reference/invalidNumberAssignments.errors.txt +++ b/tests/baselines/reference/invalidNumberAssignments.errors.txt @@ -28,19 +28,23 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1 class C { foo: string; } var e: C = x; ~ -!!! error TS2322: Type 'number' is not assignable to type 'C'. +!!! error TS2322: Type 'number' is not assignable to type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:8:7 interface I { bar: string; } var f: I = x; ~ -!!! error TS2322: Type 'number' is not assignable to type 'I'. +!!! error TS2322: Type 'number' is not assignable to type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:11:11 var g: { baz: string } = 1; ~ -!!! error TS2322: Type '1' is not assignable to type '{ baz: string; }'. +!!! error TS2322: Type '1' is not assignable to type '{ {|baz|0|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:14:10 var g2: { 0: number } = 1; ~~ -!!! error TS2322: Type '1' is not assignable to type '{ 0: number; }'. +!!! error TS2322: Type '1' is not assignable to type '{ {|0|0|}: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:15:11 module M { export var x = 1; } M = x; @@ -50,8 +54,11 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1 function i(a: T) { a = x; ~ -!!! error TS2322: Type 'number' is not assignable to type 'T'. -!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'number' is not assignable to type '{|T|0|}'. +!!! error TS2322: 'number' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:20:12 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:20:12 +!!! annotated symbol 2 tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts:20:12 } i = x; ~ diff --git a/tests/baselines/reference/invalidReturnStatements.errors.txt b/tests/baselines/reference/invalidReturnStatements.errors.txt index a5d41452dbb9c..515c2aad02ade 100644 --- a/tests/baselines/reference/invalidReturnStatements.errors.txt +++ b/tests/baselines/reference/invalidReturnStatements.errors.txt @@ -36,7 +36,9 @@ tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts(1 function fn11(): D { return new C(); } ~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'name' is missing in type 'C' but required in type 'D'. +!!! error TS2741: Property 'name' is missing in type '{|C|0|}' but required in type '{|D|1|}'. !!! related TS2728 tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts:14:5: 'name' is declared here. +!!! annotated symbol 0 tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/statements/returnStatements/invalidReturnStatements.ts:13:7 \ No newline at end of file diff --git a/tests/baselines/reference/invalidStringAssignments.errors.txt b/tests/baselines/reference/invalidStringAssignments.errors.txt index 5ef87e2b94dd5..9326edc82f471 100644 --- a/tests/baselines/reference/invalidStringAssignments.errors.txt +++ b/tests/baselines/reference/invalidStringAssignments.errors.txt @@ -29,19 +29,23 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 class C { foo: string; } var e: C = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'C'. +!!! error TS2322: Type 'string' is not assignable to type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:8:7 interface I { bar: string; } var f: I = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'I'. +!!! error TS2322: Type 'string' is not assignable to type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:11:11 var g: { baz: string } = 1; ~ -!!! error TS2322: Type '1' is not assignable to type '{ baz: string; }'. +!!! error TS2322: Type '1' is not assignable to type '{ {|baz|0|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:14:10 var g2: { 0: number } = 1; ~~ -!!! error TS2322: Type '1' is not assignable to type '{ 0: number; }'. +!!! error TS2322: Type '1' is not assignable to type '{ {|0|0|}: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:15:11 module M { export var x = 1; } M = x; @@ -51,8 +55,11 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 function i(a: T) { a = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:20:12 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:20:12 +!!! annotated symbol 2 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:20:12 } i = x; ~ @@ -61,4 +68,5 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5 enum E { A } var j: E = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'E'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type '{|E|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts:25:6 \ No newline at end of file diff --git a/tests/baselines/reference/invalidVoidAssignments.errors.txt b/tests/baselines/reference/invalidVoidAssignments.errors.txt index ae599fb52b0be..88f80a7244b4d 100644 --- a/tests/baselines/reference/invalidVoidAssignments.errors.txt +++ b/tests/baselines/reference/invalidVoidAssignments.errors.txt @@ -30,19 +30,23 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e class C { foo: string; } var e: C = x; ~ -!!! error TS2322: Type 'void' is not assignable to type 'C'. +!!! error TS2322: Type 'void' is not assignable to type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:8:7 interface I { bar: string; } var f: I = x; ~ -!!! error TS2322: Type 'void' is not assignable to type 'I'. +!!! error TS2322: Type 'void' is not assignable to type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:11:11 var g: { baz: string } = 1; ~ -!!! error TS2322: Type '1' is not assignable to type '{ baz: string; }'. +!!! error TS2322: Type '1' is not assignable to type '{ {|baz|0|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:14:10 var g2: { 0: number } = 1; ~~ -!!! error TS2322: Type '1' is not assignable to type '{ 0: number; }'. +!!! error TS2322: Type '1' is not assignable to type '{ {|0|0|}: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:15:11 module M { export var x = 1; } M = x; @@ -52,7 +56,8 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e function i(a: T) { a = x; ~ -!!! error TS2322: Type 'void' is not assignable to type 'T'. +!!! error TS2322: Type 'void' is not assignable to type '{|T|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:20:12 } i = x; ~ @@ -61,11 +66,14 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e enum E { A } x = E; ~ -!!! error TS2322: Type 'typeof E' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof {|E|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:25:6 x = E.A; ~ -!!! error TS2322: Type 'E' is not assignable to type 'void'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:25:6 x = { f() { } } ~ -!!! error TS2322: Type '{ f(): void; }' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2322: Type '{ {|f|0|}(): void; }' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts:29:7 \ No newline at end of file diff --git a/tests/baselines/reference/invalidVoidValues.errors.txt b/tests/baselines/reference/invalidVoidValues.errors.txt index 51155152864b3..3f95e456464f0 100644 --- a/tests/baselines/reference/invalidVoidValues.errors.txt +++ b/tests/baselines/reference/invalidVoidValues.errors.txt @@ -26,38 +26,47 @@ tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(26,5): error enum E { A } x = E; ~ -!!! error TS2322: Type 'typeof E' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof {|E|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:6:6 x = E.A; ~ -!!! error TS2322: Type 'E' is not assignable to type 'void'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:6:6 class C { foo: string } var a: C; x = a; ~ -!!! error TS2322: Type 'C' is not assignable to type 'void'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:10:7 interface I { foo: string } var b: I; x = b; ~ -!!! error TS2322: Type 'I' is not assignable to type 'void'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:14:11 x = { f() {} } ~ -!!! error TS2322: Type '{ f(): void; }' is not assignable to type 'void'. +!!! error TS2322: Type '{ {|f|0|}(): void; }' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:18:7 module M { export var x = 1; } x = M; ~ -!!! error TS2322: Type 'typeof M' is not assignable to type 'void'. +!!! error TS2322: Type 'typeof {|M|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:20:8 function f(a: T) { x = a; ~ -!!! error TS2322: Type 'T' is not assignable to type 'void'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'void'. +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:23:12 } x = f; ~ -!!! error TS2322: Type '(a: T) => void' is not assignable to type 'void'. -!!! related TS6212 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:26:5: Did you mean to call this expression? \ No newline at end of file +!!! error TS2322: Type '<{|T|0|}>(a: {|T|1|}) => void' is not assignable to type 'void'. +!!! related TS6212 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:26:5: Did you mean to call this expression? +!!! annotated symbol 0 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:23:12 +!!! annotated symbol 1 tests/cases/conformance/types/primitives/void/invalidVoidValues.ts:23:12 \ No newline at end of file diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt b/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt index 0bd79bcf11d6a..46febfda9b3e7 100644 --- a/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt +++ b/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt @@ -16,21 +16,53 @@ tests/cases/compiler/invariantGenericErrorElaboration.ts(4,19): error TS2322: Ty const wat: Runtype = Num; ~~~ -!!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. +!!! error TS2322: Type '{|Num|0|}' is not assignable to type '{|Runtype|1|}'. !!! error TS2322: Types of property 'constraint' are incompatible. -!!! error TS2322: Type 'Constraint' is not assignable to type 'Constraint>'. +!!! error TS2322: Type '{|Constraint|2|}<{|Num|3|}>' is not assignable to type '{|Constraint|4|}<{|Runtype|5|}>'. !!! error TS2322: Types of property 'constraint' are incompatible. -!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint>>'. +!!! error TS2322: Type '{|Constraint|6|}<{|Constraint|7|}<{|Num|8|}>>' is not assignable to type '{|Constraint|9|}<{|Constraint|10|}<{|Runtype|11|}>>'. !!! error TS2322: Types of property 'constraint' are incompatible. -!!! error TS2322: Type 'Constraint>>' is not assignable to type 'Constraint>>>'. -!!! error TS2322: Type 'Constraint>>' is not assignable to type 'Constraint>'. +!!! error TS2322: Type '{|Constraint|12|}<{|Constraint|13|}<{|Constraint|14|}<{|Num|15|}>>>' is not assignable to type '{|Constraint|16|}<{|Constraint|17|}<{|Constraint|18|}<{|Runtype|19|}>>>'. +!!! error TS2322: Type '{|Constraint|20|}<{|Constraint|21|}<{|Runtype|22|}>>' is not assignable to type '{|Constraint|23|}<{|Constraint|24|}<{|Num|25|}>>'. !!! error TS2322: Types of property 'underlying' are incompatible. -!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint'. +!!! error TS2322: Type '{|Constraint|26|}<{|Runtype|27|}>' is not assignable to type '{|Constraint|28|}<{|Num|29|}>'. !!! related TS2728 tests/cases/compiler/invariantGenericErrorElaboration.ts:12:3: 'tag' is declared here. +!!! annotated symbol 0 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 +!!! annotated symbol 2 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 3 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 5 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 +!!! annotated symbol 6 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 7 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 8 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 +!!! annotated symbol 9 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 10 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 11 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 +!!! annotated symbol 12 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 13 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 14 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 15 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 +!!! annotated symbol 16 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 17 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 18 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 19 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 +!!! annotated symbol 20 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 21 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 22 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 +!!! annotated symbol 23 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 24 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 25 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 +!!! annotated symbol 26 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 27 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 +!!! annotated symbol 28 tests/cases/compiler/invariantGenericErrorElaboration.ts:19:11 +!!! annotated symbol 29 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 const Foo = Obj({ foo: Num }) ~~~ -!!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. +!!! error TS2322: Type '{|Num|0|}' is not assignable to type '{|Runtype|1|}'. !!! related TS6501 tests/cases/compiler/invariantGenericErrorElaboration.ts:17:34: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/compiler/invariantGenericErrorElaboration.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/invariantGenericErrorElaboration.ts:6:11 interface Runtype
{ constraint: Constraint diff --git a/tests/baselines/reference/iterableArrayPattern10.errors.txt b/tests/baselines/reference/iterableArrayPattern10.errors.txt index 59b2079975da3..0d8b80a878a60 100644 --- a/tests/baselines/reference/iterableArrayPattern10.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern10.errors.txt @@ -20,4 +20,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern10.ts(17,5): error function fun([a, b]) { } fun(new FooIterator); ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'FooIterator' is not assignable to parameter of type '[any, any]'. \ No newline at end of file +!!! error TS2345: Argument of type '{|FooIterator|0|}' is not assignable to parameter of type '[any, any]'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern10.ts:3:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern13.errors.txt b/tests/baselines/reference/iterableArrayPattern13.errors.txt index af5452de5fa82..8222f92178cff 100644 --- a/tests/baselines/reference/iterableArrayPattern13.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern13.errors.txt @@ -20,4 +20,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern13.ts(17,5): error function fun([a, ...b]) { } fun(new FooIterator); ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'FooIterator' is not assignable to parameter of type '[any, ...any[]]'. \ No newline at end of file +!!! error TS2345: Argument of type '{|FooIterator|0|}' is not assignable to parameter of type '[any, ...any[]]'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern13.ts:3:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern16.errors.txt b/tests/baselines/reference/iterableArrayPattern16.errors.txt index 9d01131954a10..f21f78e7a6157 100644 --- a/tests/baselines/reference/iterableArrayPattern16.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern16.errors.txt @@ -6,7 +6,10 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern16.ts(2,12): error function fun(...[a, b]: [Bar, Bar][]) { } fun(...new FooIteratorIterator); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'FooIterator' is not assignable to parameter of type '[Bar, Bar]'. +!!! error TS2345: Argument of type '{|FooIterator|0|}' is not assignable to parameter of type '[{|Bar|1|}, {|Bar|2|}]'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern16.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/iterableArrayPattern16.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/es6/destructuring/iterableArrayPattern16.ts:3:7 ~~~~~~~~~~~~~~~~~~~ !!! error TS2449: Class 'FooIteratorIterator' used before its declaration. !!! related TS2728 tests/cases/conformance/es6/destructuring/iterableArrayPattern16.ts:18:7: 'FooIteratorIterator' is declared here. diff --git a/tests/baselines/reference/iterableArrayPattern17.errors.txt b/tests/baselines/reference/iterableArrayPattern17.errors.txt index 2a3091adc5bc9..32540c8e5e257 100644 --- a/tests/baselines/reference/iterableArrayPattern17.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern17.errors.txt @@ -21,6 +21,10 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts(17,5): error function fun(...[a, b]: Bar[]) { } fun(new FooIterator); ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'FooIterator' is not assignable to parameter of type 'Bar'. -!!! error TS2345: Property 'x' is missing in type 'FooIterator' but required in type 'Bar'. -!!! related TS2728 tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts:1:13: 'x' is declared here. \ No newline at end of file +!!! error TS2345: Argument of type '{|FooIterator|0|}' is not assignable to parameter of type '{|Bar|1|}'. +!!! error TS2345: Property 'x' is missing in type '{|FooIterator|2|}' but required in type '{|Bar|3|}'. +!!! related TS2728 tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts:1:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/es6/destructuring/iterableArrayPattern17.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern18.errors.txt b/tests/baselines/reference/iterableArrayPattern18.errors.txt index 7819c6c474173..2b46202b7d910 100644 --- a/tests/baselines/reference/iterableArrayPattern18.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern18.errors.txt @@ -21,5 +21,7 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern18.ts(17,5): error function fun([a, b]: Bar[]) { } fun(new FooIterator); ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'FooIterator' is not assignable to parameter of type 'Bar[]'. -!!! error TS2345: Type 'FooIterator' is missing the following properties from type 'Bar[]': length, pop, push, concat, and 24 more. \ No newline at end of file +!!! error TS2345: Argument of type '{|FooIterator|0|}' is not assignable to parameter of type '{|Bar|1|}[]'. +!!! error TS2345: Type 'FooIterator' is missing the following properties from type 'Bar[]': length, pop, push, concat, and 24 more. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern18.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/iterableArrayPattern18.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern19.errors.txt b/tests/baselines/reference/iterableArrayPattern19.errors.txt index a5f63ea55d6f1..8dc0139fde831 100644 --- a/tests/baselines/reference/iterableArrayPattern19.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern19.errors.txt @@ -21,5 +21,7 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern19.ts(17,5): error function fun([[a], b]: Bar[][]) { } fun(new FooArrayIterator); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'FooArrayIterator' is not assignable to parameter of type 'Bar[][]'. -!!! error TS2345: Type 'FooArrayIterator' is missing the following properties from type 'Bar[][]': length, pop, push, concat, and 24 more. \ No newline at end of file +!!! error TS2345: Argument of type '{|FooArrayIterator|0|}' is not assignable to parameter of type '{|Bar|1|}[][]'. +!!! error TS2345: Type 'FooArrayIterator' is missing the following properties from type 'Bar[][]': length, pop, push, concat, and 24 more. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern19.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/iterableArrayPattern19.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern26.errors.txt b/tests/baselines/reference/iterableArrayPattern26.errors.txt index 820e5ead3a4d9..d82a77ca3c59d 100644 --- a/tests/baselines/reference/iterableArrayPattern26.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern26.errors.txt @@ -5,4 +5,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern26.ts(2,21): error function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]: [string, number][]) { } takeFirstTwoEntries(new Map([["", 0], ["hello", 1]])); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'Map' is not assignable to parameter of type '[string, number]'. \ No newline at end of file +!!! error TS2345: Argument of type '{|Map|0|}' is not assignable to parameter of type '[string, number]'. +!!! annotated symbol 0 /.ts/lib.es2015.collection.d.ts:21:11 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern5.errors.txt b/tests/baselines/reference/iterableArrayPattern5.errors.txt index 1bbbe268e6cfb..b814ed6339fed 100644 --- a/tests/baselines/reference/iterableArrayPattern5.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern5.errors.txt @@ -20,4 +20,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern5.ts(17,5): error var a: Bar, b: string; [a, b] = new FooIterator; ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|Foo|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern5.ts:2:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern6.errors.txt b/tests/baselines/reference/iterableArrayPattern6.errors.txt index 3a20f1f52c597..926ff890f6a25 100644 --- a/tests/baselines/reference/iterableArrayPattern6.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern6.errors.txt @@ -21,5 +21,7 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern6.ts(17,8): error var a: Bar, b: string[]; [a, ...b] = new FooIterator; ~ -!!! error TS2322: Type 'Foo[]' is not assignable to type 'string[]'. -!!! error TS2322: Type 'Foo' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|Foo|0|}[]' is not assignable to type 'string[]'. +!!! error TS2322: Type '{|Foo|1|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern6.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/es6/destructuring/iterableArrayPattern6.ts:2:7 \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern8.errors.txt b/tests/baselines/reference/iterableArrayPattern8.errors.txt index 94c6e9593ef55..8b16f815729e6 100644 --- a/tests/baselines/reference/iterableArrayPattern8.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern8.errors.txt @@ -20,4 +20,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern8.ts(17,8): error var a: Bar, b: string; [a, ...b] = new FooIterator; ~ -!!! error TS2322: Type 'Foo[]' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|Foo|0|}[]' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/iterableArrayPattern8.ts:2:7 \ No newline at end of file diff --git a/tests/baselines/reference/iteratorSpreadInArray6.errors.txt b/tests/baselines/reference/iteratorSpreadInArray6.errors.txt index 4f547c59ed045..9f2183a8e8717 100644 --- a/tests/baselines/reference/iteratorSpreadInArray6.errors.txt +++ b/tests/baselines/reference/iteratorSpreadInArray6.errors.txt @@ -23,9 +23,11 @@ tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(15,14): error TS234 var array: number[] = [0, 1]; array.concat([...new SymbolIterator]); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type 'symbol[]' is not assignable to parameter of type 'number | ConcatArray'. -!!! error TS2345: Type 'symbol[]' is not assignable to type 'ConcatArray'. +!!! error TS2345: Argument of type 'symbol[]' is not assignable to parameter of type 'number | {|ConcatArray|0|}'. +!!! error TS2345: Type 'symbol[]' is not assignable to type '{|ConcatArray|1|}'. !!! error TS2345: Types of property 'slice' are incompatible. !!! error TS2345: Type '(start?: number, end?: number) => symbol[]' is not assignable to type '(start?: number, end?: number) => number[]'. !!! error TS2345: Type 'symbol[]' is not assignable to type 'number[]'. -!!! error TS2345: Type 'symbol' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2345: Type 'symbol' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1198:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1198:11 \ No newline at end of file diff --git a/tests/baselines/reference/iteratorSpreadInArray9.errors.txt b/tests/baselines/reference/iteratorSpreadInArray9.errors.txt index b1278354ba2d8..402100c150fcb 100644 --- a/tests/baselines/reference/iteratorSpreadInArray9.errors.txt +++ b/tests/baselines/reference/iteratorSpreadInArray9.errors.txt @@ -22,11 +22,21 @@ tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts(13,17): error TS232 var array = [...new SymbolIterator]; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'SymbolIterator' is not assignable to type 'Iterable'. +!!! error TS2322: Type '{|SymbolIterator|0|}' is not assignable to type '{|Iterable|1|}'. !!! error TS2322: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2322: Type '() => SymbolIterator' is not assignable to type '() => Iterator'. -!!! error TS2322: Type 'SymbolIterator' is not assignable to type 'Iterator'. +!!! error TS2322: Type '() => {|SymbolIterator|2|}' is not assignable to type '() => {|Iterator|3|}'. +!!! error TS2322: Type '{|SymbolIterator|4|}' is not assignable to type '{|Iterator|5|}'. !!! error TS2322: Types of property 'next' are incompatible. -!!! error TS2322: Type '() => { value: symbol; }' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2322: Property 'done' is missing in type '{ value: symbol; }' but required in type 'IteratorResult'. -!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:32:5: 'done' is declared here. \ No newline at end of file +!!! error TS2322: Type '() => { {|value|6|}: symbol; }' is not assignable to type '(value?: any) => {|IteratorResult|7|}'. +!!! error TS2322: Property 'done' is missing in type '{ {|value|8|}: symbol; }' but required in type '{|IteratorResult|9|}'. +!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:32:5: 'done' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts:1:7 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:42:11 +!!! annotated symbol 2 tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts:1:7 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 4 tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts:1:7 +!!! annotated symbol 5 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 6 tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts:4:13 +!!! annotated symbol 7 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 8 tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts:4:13 +!!! annotated symbol 9 /.ts/lib.es2015.iterable.d.ts:31:11 \ No newline at end of file diff --git a/tests/baselines/reference/jsdocFunctionType.errors.txt b/tests/baselines/reference/jsdocFunctionType.errors.txt index 30bd6d7f7f918..d0c5c455860f6 100644 --- a/tests/baselines/reference/jsdocFunctionType.errors.txt +++ b/tests/baselines/reference/jsdocFunctionType.errors.txt @@ -69,7 +69,11 @@ tests/cases/conformance/jsdoc/functions.js(65,14): error TS2345: Argument of typ var y3 = id2(E); ~ -!!! error TS2345: Argument of type 'typeof E' is not assignable to parameter of type 'new (arg1: number) => { length: number; }'. -!!! error TS2345: Property 'length' is missing in type 'E' but required in type '{ length: number; }'. +!!! error TS2345: Argument of type 'typeof {|E|0|}' is not assignable to parameter of type 'new (arg1: number) => { {|length|1|}: number; }'. +!!! error TS2345: Property 'length' is missing in type '{|E|2|}' but required in type '{ {|length|3|}: number; }'. !!! related TS2728 tests/cases/conformance/jsdoc/functions.js:12:28: 'length' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/functions.js:60:9 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/functions.js:12:28 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/functions.js:60:9 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/functions.js:12:28 \ No newline at end of file diff --git a/tests/baselines/reference/jsdocTemplateTag.errors.txt b/tests/baselines/reference/jsdocTemplateTag.errors.txt index 8eff7b215c222..580d1b08faf1d 100644 --- a/tests/baselines/reference/jsdocTemplateTag.errors.txt +++ b/tests/baselines/reference/jsdocTemplateTag.errors.txt @@ -27,6 +27,11 @@ tests/cases/conformance/jsdoc/forgot.js(23,1): error TS2322: Type '(keyframes: a */ Element.prototype.animate = function(keyframes) {}; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '(keyframes: any[]) => void' is not assignable to type '(keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions) => Animation'. -!!! error TS2322: Type 'void' is not assignable to type 'Animation'. +!!! error TS2322: Type '(keyframes: any[]) => void' is not assignable to type '(keyframes: {|Keyframe|0|}[] | {|PropertyIndexedKeyframes|1|}, options?: number | {|KeyframeAnimationOptions|2|}) => {|Animation|3|}'. +!!! error TS2322: Type 'void' is not assignable to type '{|Animation|4|}'. +!!! annotated symbol 0 /.ts/lib.dom.d.ts:617:11 +!!! annotated symbol 1 /.ts/lib.dom.d.ts:1013:11 +!!! annotated symbol 2 /.ts/lib.dom.d.ts:624:11 +!!! annotated symbol 3 /.ts/lib.dom.d.ts:1824:11 +!!! annotated symbol 4 /.ts/lib.dom.d.ts:1824:11 \ No newline at end of file diff --git a/tests/baselines/reference/jsdocTemplateTag3.errors.txt b/tests/baselines/reference/jsdocTemplateTag3.errors.txt index d5b6032c9405d..c95b861edde43 100644 --- a/tests/baselines/reference/jsdocTemplateTag3.errors.txt +++ b/tests/baselines/reference/jsdocTemplateTag3.errors.txt @@ -33,9 +33,15 @@ tests/cases/conformance/jsdoc/a.js(25,2): error TS1069: Unexpected token. A type f({ a: 12, b: 'hi', c: null }, undefined, { c: false, d: 12, b: undefined }, 101, 'nope'); f({ a: 12 }, undefined, undefined, 101, 'nope'); ~~~~~~~~~~ -!!! error TS2345: Argument of type '{ a: number; }' is not assignable to parameter of type '{ a: number; b: string; }'. -!!! error TS2345: Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: string; }'. +!!! error TS2345: Argument of type '{ {|a|0|}: number; }' is not assignable to parameter of type '{ {|a|1|}: number; {|b|2|}: string; }'. +!!! error TS2345: Property 'b' is missing in type '{ {|a|3|}: number; }' but required in type '{ {|a|4|}: number; {|b|5|}: string; }'. !!! related TS2728 tests/cases/conformance/jsdoc/a.js:2:28: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/a.js:21:5 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/a.js:2:17 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/a.js:2:28 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/a.js:21:5 +!!! annotated symbol 4 tests/cases/conformance/jsdoc/a.js:2:17 +!!! annotated symbol 5 tests/cases/conformance/jsdoc/a.js:2:28 /** * @template {NoLongerAllowed} diff --git a/tests/baselines/reference/jsdocTypeTagCast.errors.txt b/tests/baselines/reference/jsdocTypeTagCast.errors.txt index c82eabc65cd63..273844b7a9cda 100644 --- a/tests/baselines/reference/jsdocTypeTagCast.errors.txt +++ b/tests/baselines/reference/jsdocTypeTagCast.errors.txt @@ -70,27 +70,41 @@ tests/cases/conformance/jsdoc/b.js(67,8): error TS2454: Variable 'numOrStr' is u someBase = /** @type {SomeBase} */(someBase); someBase = /** @type {SomeBase} */(someOther); // Error ~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. +!!! error TS2352: Conversion of type '{|SomeOther|0|}' to type '{|SomeBase|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'p' is missing in type '{|SomeOther|2|}' but required in type '{|SomeBase|3|}'. !!! related TS2728 tests/cases/conformance/jsdoc/b.js:17:9: 'p' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/b.js:26:7 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/b.js:15:7 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/b.js:26:7 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/b.js:15:7 someDerived = /** @type {SomeDerived} */(someDerived); someDerived = /** @type {SomeDerived} */(someBase); someDerived = /** @type {SomeDerived} */(someOther); // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Conversion of type '{|SomeOther|0|}' to type '{|SomeDerived|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. !!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': x, p +!!! annotated symbol 0 tests/cases/conformance/jsdoc/b.js:26:7 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/b.js:20:7 someOther = /** @type {SomeOther} */(someDerived); // Error ~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. +!!! error TS2352: Conversion of type '{|SomeDerived|0|}' to type '{|SomeOther|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'q' is missing in type '{|SomeDerived|2|}' but required in type '{|SomeOther|3|}'. !!! related TS2728 tests/cases/conformance/jsdoc/b.js:28:9: 'q' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/b.js:20:7 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/b.js:26:7 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/b.js:20:7 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/b.js:26:7 someOther = /** @type {SomeOther} */(someBase); // Error ~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. +!!! error TS2352: Conversion of type '{|SomeBase|0|}' to type '{|SomeOther|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'q' is missing in type '{|SomeBase|2|}' but required in type '{|SomeOther|3|}'. !!! related TS2728 tests/cases/conformance/jsdoc/b.js:28:9: 'q' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/b.js:15:7 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/b.js:26:7 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/b.js:15:7 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/b.js:26:7 someOther = /** @type {SomeOther} */(someOther); someFakeClass = someBase; @@ -98,10 +112,12 @@ tests/cases/conformance/jsdoc/b.js(67,8): error TS2454: Variable 'numOrStr' is u someBase = someFakeClass; // Error ~~~~~~~~ -!!! error TS2322: Type 'SomeFakeClass' is not assignable to type 'SomeBase'. +!!! error TS2322: Type '{|SomeFakeClass|0|}' is not assignable to type '{|SomeBase|1|}'. !!! error TS2322: Types of property 'p' are incompatible. !!! error TS2322: Type 'string | number' is not assignable to type 'number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/b.js:32:10 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/b.js:15:7 someBase = /** @type {SomeBase} */(someFakeClass); // Type assertion cannot be a type-predicate type diff --git a/tests/baselines/reference/jsxChildrenIndividualErrorElaborations.errors.txt b/tests/baselines/reference/jsxChildrenIndividualErrorElaborations.errors.txt index f7750b86b7a65..ab3ba571baefe 100644 --- a/tests/baselines/reference/jsxChildrenIndividualErrorElaborations.errors.txt +++ b/tests/baselines/reference/jsxChildrenIndividualErrorElaborations.errors.txt @@ -101,10 +101,13 @@ tests/cases/compiler/index.tsx(74,9): error TS2322: Type 'number' is not assigna var a = {x => x} ~~~~~~~~ -!!! error TS2322: Type '(x: number) => number' is not assignable to type 'Cb | Cb[]'. -!!! error TS2322: Type '(x: number) => number' is not assignable to type 'Cb'. +!!! error TS2322: Type '(x: number) => number' is not assignable to type '{|Cb|0|} | {|Cb|1|}[]'. +!!! error TS2322: Type '(x: number) => number' is not assignable to type '{|Cb|2|}'. !!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6500 tests/cases/compiler/index.tsx:54:3: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & PropsMixed' +!!! annotated symbol 0 tests/cases/compiler/index.tsx:52:6 +!!! annotated symbol 1 tests/cases/compiler/index.tsx:52:6 +!!! annotated symbol 2 tests/cases/compiler/index.tsx:52:6 // Blah3 components don't accept text as child elements diff --git a/tests/baselines/reference/keyofAndIndexedAccess2.errors.txt b/tests/baselines/reference/keyofAndIndexedAccess2.errors.txt index 5b749df2cab36..ad3144c8bef56 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess2.errors.txt +++ b/tests/baselines/reference/keyofAndIndexedAccess2.errors.txt @@ -60,18 +60,31 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23 !!! error TS2739: Type '{ [key: string]: number; }' is missing the following properties from type '{ x: number; y: number; }': x, y a = c; // Error, index signature in source doesn't imply properties are present ~ -!!! error TS2322: Type 'T' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{ {|x|1|}: number; {|y|2|}: number; }'. !!! error TS2322: Type '{ [key: string]: number; }' is missing the following properties from type '{ x: number; y: number; }': x, y +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:55 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:66 b = a; b = c; c = a; // Error, constraint on target doesn't imply any properties or signatures ~ -!!! error TS2322: Type '{ x: number; y: number; }' is not assignable to type 'T'. -!!! error TS2322: '{ x: number; y: number; }' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ [key: string]: number; }'. +!!! error TS2322: Type '{ {|x|0|}: number; {|y|1|}: number; }' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{ {|x|3|}: number; {|y|4|}: number; }' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{ [key: string]: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:55 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:66 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:55 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:66 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 c = b; // Error, constraint on target doesn't imply any properties or signatures ~ -!!! error TS2322: Type '{ [key: string]: number; }' is not assignable to type 'T'. -!!! error TS2322: '{ [key: string]: number; }' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ [key: string]: number; }'. +!!! error TS2322: Type '{ [key: string]: number; }' is not assignable to type '{|T|0|}'. +!!! error TS2322: '{ [key: string]: number; }' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{ [key: string]: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 a.x; b.x; c.x; @@ -83,13 +96,17 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23 !!! error TS2339: Property 'x' does not exist on type 'T'. c[k] = 1; // Error, cannot write to index signature through constraint ~~~~ -!!! error TS2322: Type '1' is not assignable to type 'T[keyof T]'. +!!! error TS2322: Type '1' is not assignable to type '{|T|0|}[keyof {|T|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:13:13 } function f3(a: { [P in K]: number }, b: { [key: string]: number }, k: K) { a = b; // Error, index signature doesn't imply properties are present ~ -!!! error TS2322: Type '{ [key: string]: number; }' is not assignable to type '{ [P in K]: number; }'. +!!! error TS2322: Type '{ [key: string]: number; }' is not assignable to type '{ [{|P|0|} in {|K|1|}]: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:30:37 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:30:13 b = a; a[k]; a[k] = 1; @@ -98,7 +115,9 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23 function f3b(a: { [P in K]: number }, b: { [P in string]: number }, k: K) { a = b; // Error, index signature doesn't imply properties are present ~ -!!! error TS2322: Type '{ [x: string]: number; }' is not assignable to type '{ [P in K]: number; }'. +!!! error TS2322: Type '{ [x: string]: number; }' is not assignable to type '{ [{|P|0|} in {|K|1|}]: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:37:38 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:37:14 b = a; } @@ -119,10 +138,14 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23 !!! error TS2322: Type '123' is not assignable to type 'string'. obj[k3] = 123; // Error ~~~~~~~ -!!! error TS2322: Type '123' is not assignable to type 'T[keyof T]'. +!!! error TS2322: Type '123' is not assignable to type '{|T|0|}[keyof {|T|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:49:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:49:14 obj[k4] = 123; // Error ~~~~~~~ -!!! error TS2322: Type '123' is not assignable to type 'T[K]'. +!!! error TS2322: Type '123' is not assignable to type '{|T|0|}[{|K|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:49:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:49:30 } type Dict = Record; @@ -142,10 +165,14 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23 !!! error TS2536: Type 'string' cannot be used to index type 'T'. obj[k2] = 123; // Error ~~~~~~~ -!!! error TS2322: Type '123' is not assignable to type 'T[keyof T]'. +!!! error TS2322: Type '123' is not assignable to type '{|T|0|}[keyof {|T|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:64:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:64:14 obj[k3] = 123; // Error ~~~~~~~ -!!! error TS2322: Type '123' is not assignable to type 'T[K]'. +!!! error TS2322: Type '123' is not assignable to type '{|T|0|}[{|K|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:64:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:64:40 } // Repro from #27895 @@ -187,9 +214,11 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23 function get123(): Type[K] { return 123; // Error ~~~~~~~~~~~ -!!! error TS2322: Type '123' is not assignable to type 'Type[K]'. +!!! error TS2322: Type '123' is not assignable to type '{|Type|0|}[{|K|1|}]'. !!! error TS2322: Type '123' is not assignable to type '123 & "some string"'. !!! error TS2322: Type '123' is not assignable to type '"some string"'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:102:11 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts:107:17 } // Repro from #30920 diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt b/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt index 68e56efb38ab9..1933cf5311cb3 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt @@ -219,31 +219,74 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error k1 = k2; k1 = k3; // Error ~~ -!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'string' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'string' is not assignable to type 'keyof T'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof U'. -!!! error TS2322: Type 'string' is not assignable to type 'keyof U'. +!!! error TS2322: Type 'keyof {|T|0|} | keyof {|U|1|}' is not assignable to type 'keyof {|T|2|} & keyof {|U|3|}'. +!!! error TS2322: Type 'keyof {|T|4|}' is not assignable to type 'keyof {|T|5|} & keyof {|U|6|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof {|T|7|} & keyof {|U|8|}'. +!!! error TS2322: Type 'string' is not assignable to type 'keyof {|T|9|} & keyof {|U|10|}'. +!!! error TS2322: Type 'string' is not assignable to type 'keyof {|T|11|}'. +!!! error TS2322: Type 'keyof {|T|12|}' is not assignable to type 'keyof {|U|13|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof {|U|14|}'. +!!! error TS2322: Type 'string' is not assignable to type 'keyof {|U|15|}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 9 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 10 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 11 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 12 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 13 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 14 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 15 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 k1 = k4; // Error ~~ -!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'. +!!! error TS2322: Type 'keyof {|T|0|} | keyof {|U|1|}' is not assignable to type 'keyof {|T|2|} & keyof {|U|3|}'. +!!! error TS2322: Type 'keyof {|T|4|}' is not assignable to type 'keyof {|T|5|} & keyof {|U|6|}'. +!!! error TS2322: Type 'keyof {|T|7|}' is not assignable to type 'keyof {|U|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 k2 = k1; k2 = k3; // Error ~~ -!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'. +!!! error TS2322: Type 'keyof {|T|0|} | keyof {|U|1|}' is not assignable to type 'keyof {|T|2|} & keyof {|U|3|}'. +!!! error TS2322: Type 'keyof {|T|4|}' is not assignable to type 'keyof {|T|5|} & keyof {|U|6|}'. +!!! error TS2322: Type 'keyof {|T|7|}' is not assignable to type 'keyof {|U|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 k2 = k4; // Error ~~ -!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'. +!!! error TS2322: Type 'keyof {|T|0|} | keyof {|U|1|}' is not assignable to type 'keyof {|T|2|} & keyof {|U|3|}'. +!!! error TS2322: Type 'keyof {|T|4|}' is not assignable to type 'keyof {|T|5|} & keyof {|U|6|}'. +!!! error TS2322: Type 'keyof {|T|7|}' is not assignable to type 'keyof {|U|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:14 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:70:17 k3 = k1; k3 = k2; @@ -261,66 +304,152 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error key = k // ok, K ==> keyof T k = key // error, keyof T =/=> K ~ -!!! error TS2322: Type 'Extract' is not assignable to type 'K'. -!!! error TS2322: 'Extract' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'string & keyof T' is not assignable to type 'K'. -!!! error TS2322: 'string & keyof T' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'string' is not assignable to type 'K'. -!!! error TS2322: 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'string' is not assignable to type 'K'. -!!! error TS2322: 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type '{|Extract|0|}' is not assignable to type '{|K|2|}'. +!!! error TS2322: '{|Extract|3|}' is assignable to the constraint of type '{|K|5|}', but '{|K|6|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type 'string & keyof {|T|7|}' is not assignable to type '{|K|8|}'. +!!! error TS2322: 'string & keyof {|T|9|}' is assignable to the constraint of type '{|K|10|}', but '{|K|11|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type 'string' is not assignable to type '{|K|12|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|K|13|}', but '{|K|14|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type 'string' is not assignable to type '{|K|15|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|K|16|}', but '{|K|17|}' could be instantiated with a different subtype of constraint 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 9 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 10 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 11 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 12 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 13 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 14 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 15 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 16 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 17 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 t[key] = tk; // ok, T[K] ==> T[keyof T] tk = t[key]; // error, T[keyof T] =/=> T[K] ~~ -!!! error TS2322: Type 'T[Extract]' is not assignable to type 'T[K]'. -!!! error TS2322: Type 'Extract' is not assignable to type 'K'. -!!! error TS2322: 'Extract' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type '{|T|0|}[{|Extract|1|}]' is not assignable to type '{|T|3|}[{|K|4|}]'. +!!! error TS2322: Type '{|Extract|5|}' is not assignable to type '{|K|7|}'. +!!! error TS2322: '{|Extract|8|}' is assignable to the constraint of type '{|K|10|}', but '{|K|11|}' could be instantiated with a different subtype of constraint 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 9 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 10 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 11 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 } tk = uk; uk = tk; // error ~~ -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}]' is not assignable to type '{|U|2|}[{|K|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 tj = uj; uj = tj; // error ~~ -!!! error TS2322: Type 'T[J]' is not assignable to type 'U[J]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[{|J|1|}]' is not assignable to type '{|U|2|}[{|J|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 tk = tj; tj = tk; // error ~~ -!!! error TS2322: Type 'T[K]' is not assignable to type 'T[J]'. -!!! error TS2322: Type 'K' is not assignable to type 'J'. -!!! error TS2322: 'K' is assignable to the constraint of type 'J', but 'J' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'Extract' is not assignable to type 'J'. -!!! error TS2322: 'Extract' is assignable to the constraint of type 'J', but 'J' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'string & keyof T' is not assignable to type 'J'. -!!! error TS2322: 'string & keyof T' is assignable to the constraint of type 'J', but 'J' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'string' is not assignable to type 'J'. -!!! error TS2322: 'string' is assignable to the constraint of type 'J', but 'J' could be instantiated with a different subtype of constraint 'string'. -!!! error TS2322: Type 'string' is not assignable to type 'J'. -!!! error TS2322: 'string' is assignable to the constraint of type 'J', but 'J' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}]' is not assignable to type '{|T|2|}[{|J|3|}]'. +!!! error TS2322: Type '{|K|4|}' is not assignable to type '{|J|5|}'. +!!! error TS2322: '{|K|6|}' is assignable to the constraint of type '{|J|7|}', but '{|J|8|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type '{|Extract|9|}' is not assignable to type '{|J|11|}'. +!!! error TS2322: '{|Extract|12|}' is assignable to the constraint of type '{|J|14|}', but '{|J|15|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type 'string & keyof {|T|16|}' is not assignable to type '{|J|17|}'. +!!! error TS2322: 'string & keyof {|T|18|}' is assignable to the constraint of type '{|J|19|}', but '{|J|20|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type 'string' is not assignable to type '{|J|21|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|J|22|}', but '{|J|23|}' could be instantiated with a different subtype of constraint 'string'. +!!! error TS2322: Type 'string' is not assignable to type '{|J|24|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|J|25|}', but '{|J|26|}' could be instantiated with a different subtype of constraint 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 10 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 11 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 13 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 14 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 15 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 16 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 17 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 18 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 19 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 20 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 21 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 22 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 23 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 24 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 25 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 26 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 tk = uj; uj = tk; // error ~~ -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[J]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}]' is not assignable to type '{|U|2|}[{|J|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:16 +!!! annotated symbol 2 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 3 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:65 +!!! annotated symbol 4 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 5 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 6 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:13 +!!! annotated symbol 7 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 +!!! annotated symbol 8 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:99:52 } // The constraint of 'keyof T' is 'keyof T' function f4(k: keyof T) { k = 42; // error ~ -!!! error TS2322: Type '42' is not assignable to type 'keyof T'. +!!! error TS2322: Type '42' is not assignable to type 'keyof {|T|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:121:13 k = "hello"; // error ~ -!!! error TS2322: Type '"hello"' is not assignable to type 'keyof T'. +!!! error TS2322: Type '"hello"' is not assignable to type 'keyof {|T|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:121:13 } // Repro from #27470 @@ -339,13 +468,19 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error function test1, K extends keyof T>(t: T, k: K) { t[k] = 42; // Error ~~~~ -!!! error TS2322: Type '42' is not assignable to type 'T[K]'. +!!! error TS2322: Type '42' is not assignable to type '{|T|0|}[{|K|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:139:16 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:139:47 t[k] = "hello"; // Error ~~~~ -!!! error TS2322: Type '"hello"' is not assignable to type 'T[K]'. +!!! error TS2322: Type '"hello"' is not assignable to type '{|T|0|}[{|K|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:139:16 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:139:47 t[k] = [10, 20]; // Error ~~~~ -!!! error TS2322: Type 'number[]' is not assignable to type 'T[K]'. +!!! error TS2322: Type 'number[]' is not assignable to type '{|T|0|}[{|K|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:139:16 +!!! annotated symbol 1 tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts:139:47 } // Repro from #28839 diff --git a/tests/baselines/reference/keyofIsLiteralContexualType.errors.txt b/tests/baselines/reference/keyofIsLiteralContexualType.errors.txt index 92f3d403d02ad..8c5b8087b32f6 100644 --- a/tests/baselines/reference/keyofIsLiteralContexualType.errors.txt +++ b/tests/baselines/reference/keyofIsLiteralContexualType.errors.txt @@ -10,8 +10,9 @@ tests/cases/compiler/keyofIsLiteralContexualType.ts(13,11): error TS2339: Proper let a: (keyof T)[] = ["a", "b"]; let b: (keyof T)[] = ["a", "b", "c"]; ~~~ -!!! error TS2322: Type '"c"' is not assignable to type 'keyof T'. +!!! error TS2322: Type '"c"' is not assignable to type 'keyof {|T|0|}'. !!! error TS2322: Type '"c"' is not assignable to type '"a" | "b"'. +!!! annotated symbol 0 tests/cases/compiler/keyofIsLiteralContexualType.ts:3:14 } // Repro from #12455 diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt index 63e68d79d89bc..11aa715a82e7f 100644 --- a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt @@ -67,6 +67,8 @@ tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(60,5): error TS23 // Error in all extant branches arr = [...['y']]; ~~~ -!!! error TS2322: Type 'string[]' is not assignable to type 'XY[]'. -!!! error TS2322: Type 'string' is not assignable to type 'XY'. +!!! error TS2322: Type 'string[]' is not assignable to type '{|XY|0|}[]'. +!!! error TS2322: Type 'string' is not assignable to type '{|XY|1|}'. +!!! annotated symbol 0 tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts:31:10 +!!! annotated symbol 1 tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts:31:10 } \ No newline at end of file diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt index 484c8f63b462e..93605dd59c7dc 100644 --- a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt +++ b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt @@ -11,6 +11,14 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrE var r: { a: string } = { a: '', b: 123 } || { a: '', b: true }; ~~~~~~ -!!! error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'. -!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|a|0|}: string; {|b|1|}: number; } | { {|a|2|}: string; {|b|3|}: boolean; }' is not assignable to type '{ {|a|4|}: string; }'. +!!! error TS2322: Type '{ {|a|5|}: string; {|b|6|}: number; }' is not assignable to type '{ {|a|7|}: string; }'. +!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. +!!! annotated symbol 0 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:26 +!!! annotated symbol 1 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:33 +!!! annotated symbol 2 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:47 +!!! annotated symbol 3 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:54 +!!! annotated symbol 4 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:10 +!!! annotated symbol 5 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:26 +!!! annotated symbol 6 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:33 +!!! annotated symbol 7 tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts:6:10 \ No newline at end of file diff --git a/tests/baselines/reference/looseThisTypeInFunctions.errors.txt b/tests/baselines/reference/looseThisTypeInFunctions.errors.txt index 7e12a71440685..b8b62d338a2f4 100644 --- a/tests/baselines/reference/looseThisTypeInFunctions.errors.txt +++ b/tests/baselines/reference/looseThisTypeInFunctions.errors.txt @@ -30,9 +30,11 @@ tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(46,20): error let c = new C(); c.explicitVoid = c.explicitThis; // error, 'void' is missing everything ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: C, m: number) => number' is not assignable to type '(this: void, m: number) => number'. +!!! error TS2322: Type '(this: {|C|0|}, m: number) => number' is not assignable to type '(this: void, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'void' is not assignable to type 'C'. +!!! error TS2322: Type 'void' is not assignable to type '{|C|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts:8:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts:8:7 let o = { n: 101, explicitThis: function (m: number) { @@ -54,7 +56,8 @@ tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts(46,20): error let x = i.explicitThis; let n = x(12); // callee:void doesn't match this:I ~~~~~ -!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'I'. +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/looseThisTypeInFunctions.ts:1:11 let u: Unused; let y = u.implicitNoThis; n = y(12); // ok, callee:void matches this:any diff --git a/tests/baselines/reference/mappedTypeErrors.errors.txt b/tests/baselines/reference/mappedTypeErrors.errors.txt index 254d1cca1a89a..b04ee8c627136 100644 --- a/tests/baselines/reference/mappedTypeErrors.errors.txt +++ b/tests/baselines/reference/mappedTypeErrors.errors.txt @@ -68,12 +68,16 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: type T01 = { [P in number]: string }; // Error type T02 = { [P in Date]: number }; // Error ~~~~ -!!! error TS2322: Type 'Date' is not assignable to type 'string | number | symbol'. -!!! error TS2322: Type 'Date' is not assignable to type 'number'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type 'string | number | symbol'. +!!! error TS2322: Type '{|Date|1|}' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 type T03 = Record; // Error ~~~~ -!!! error TS2344: Type 'Date' does not satisfy the constraint 'string | number | symbol'. -!!! error TS2344: Type 'Date' is not assignable to type 'number'. +!!! error TS2344: Type '{|Date|0|}' does not satisfy the constraint 'string | number | symbol'. +!!! error TS2344: Type '{|Date|1|}' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:729:11 type T10 = Pick; type T11 = Pick; // Error @@ -96,19 +100,23 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: function f1(x: T) { let y: Pick; // Error ~ -!!! error TS2344: Type 'T' does not satisfy the constraint '"name" | "width" | "height" | "visible"'. -!!! error TS2344: Type 'T' is not assignable to type '"visible"'. +!!! error TS2344: Type '{|T|0|}' does not satisfy the constraint '"name" | "width" | "height" | "visible"'. +!!! error TS2344: Type '{|T|1|}' is not assignable to type '"visible"'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:32:13 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:32:13 } function f2(x: T) { let y: Pick; // Error ~ -!!! error TS2344: Type 'T' does not satisfy the constraint '"name" | "width" | "height" | "visible"'. +!!! error TS2344: Type '{|T|0|}' does not satisfy the constraint '"name" | "width" | "height" | "visible"'. !!! error TS2344: Type 'string | number' is not assignable to type '"name" | "width" | "height" | "visible"'. !!! error TS2344: Type 'string' is not assignable to type '"name" | "width" | "height" | "visible"'. -!!! error TS2344: Type 'T' is not assignable to type '"visible"'. +!!! error TS2344: Type '{|T|1|}' is not assignable to type '"visible"'. !!! error TS2344: Type 'string | number' is not assignable to type '"visible"'. !!! error TS2344: Type 'string' is not assignable to type '"visible"'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:36:13 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:36:13 } function f3(x: T) { @@ -156,14 +164,28 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: function f20() { let x1 = objAndReadonly({ x: 0, y: 0 }, { x: 1 }); // Error ~~~~~~~~ -!!! error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type 'Readonly<{ x: number; y: number; }>'. -!!! error TS2345: Property 'y' is missing in type '{ x: number; }' but required in type 'Readonly<{ x: number; y: number; }>'. +!!! error TS2345: Argument of type '{ {|x|0|}: number; }' is not assignable to parameter of type '{|Readonly|1|}<{ {|x|2|}: number; {|y|3|}: number; }>'. +!!! error TS2345: Property 'y' is missing in type '{ {|x|4|}: number; }' but required in type '{|Readonly|5|}<{ {|x|6|}: number; {|y|7|}: number; }>'. !!! related TS2728 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:37: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:47 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:31 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:37 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:31 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:75:37 let x2 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1 }); let x3 = objAndReadonly({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error ~~~~ -!!! error TS2345: Argument of type '{ x: number; y: number; z: number; }' is not assignable to parameter of type 'Readonly<{ x: number; y: number; }>'. +!!! error TS2345: Argument of type '{ {|x|0|}: number; {|y|1|}: number; {|z|2|}: number; }' is not assignable to parameter of type '{|Readonly|3|}<{ {|x|4|}: number; {|y|5|}: number; }>'. !!! error TS2345: Object literal may only specify known properties, and 'z' does not exist in type 'Readonly<{ x: number; y: number; }>'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:77:47 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:77:53 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:77:59 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:77:31 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:77:37 } function f21() { @@ -171,8 +193,14 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: let x2 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1 }); let x3 = objAndPartial({ x: 0, y: 0 }, { x: 1, y: 1, z: 1 }); // Error ~~~~ -!!! error TS2345: Argument of type '{ x: number; y: number; z: number; }' is not assignable to parameter of type 'Partial<{ x: number; y: number; }>'. +!!! error TS2345: Argument of type '{ {|x|0|}: number; {|y|1|}: number; {|z|2|}: number; }' is not assignable to parameter of type '{|Partial|3|}<{ {|x|4|}: number; {|y|5|}: number; }>'. !!! error TS2345: Object literal may only specify known properties, and 'z' does not exist in type 'Partial<{ x: number; y: number; }>'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:83:46 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:83:52 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:83:58 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:83:30 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:83:36 } // Verify use of Pick for setState functions (#12793) @@ -200,8 +228,11 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: !!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:89:5: The expected type comes from property 'a' which is declared here on type 'Pick' setState(foo, { c: true }); // Error ~~~~~~~ -!!! error TS2345: Argument of type '{ c: boolean; }' is not assignable to parameter of type 'Pick'. +!!! error TS2345: Argument of type '{ {|c|0|}: boolean; }' is not assignable to parameter of type '{|Pick|1|}<{|Foo|2|}, "a" | "b">'. !!! error TS2345: Object literal may only specify known properties, and 'c' does not exist in type 'Pick'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:106:17 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:88:11 class C { state: T; @@ -224,8 +255,11 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: !!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:89:5: The expected type comes from property 'a' which is declared here on type 'Pick' c.setState({ c: true }); // Error ~~~~~~~ -!!! error TS2345: Argument of type '{ c: boolean; }' is not assignable to parameter of type 'Pick'. +!!! error TS2345: Argument of type '{ {|c|0|}: boolean; }' is not assignable to parameter of type '{|Pick|1|}<{|Foo|2|}, "a" | "b">'. !!! error TS2345: Object literal may only specify known properties, and 'c' does not exist in type 'Pick'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:124:14 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1445:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:88:11 type T2 = { a?: number, [key: string]: any }; @@ -248,8 +282,10 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339: pf: {[P in F]?: T[P]}, pt: {[P in T]?: T[P]}, // note: should be in keyof T ~ -!!! error TS2322: Type 'T' is not assignable to type 'string | number | symbol'. -!!! error TS2322: Type 'T' is not assignable to type 'symbol'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'string | number | symbol'. +!!! error TS2322: Type '{|T|1|}' is not assignable to type 'symbol'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:134:11 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:134:11 ~~~~ !!! error TS2536: Type 'P' cannot be used to index type 'T'. }; diff --git a/tests/baselines/reference/mappedTypeErrors2.errors.txt b/tests/baselines/reference/mappedTypeErrors2.errors.txt index 9178731d1894d..4b3a503af7d54 100644 --- a/tests/baselines/reference/mappedTypeErrors2.errors.txt +++ b/tests/baselines/reference/mappedTypeErrors2.errors.txt @@ -30,8 +30,12 @@ tests/cases/conformance/types/mapped/mappedTypeErrors2.ts(17,49): error TS2536: ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2536: Type 'S' cannot be used to index type '{ [key in AB[S]]: true; }'. ~~~~~ -!!! error TS2322: Type 'AB[S]' is not assignable to type 'string | number | symbol'. -!!! error TS2322: Type 'AB[S]' is not assignable to type 'symbol'. +!!! error TS2322: Type '{|AB|0|}[{|S|1|}]' is not assignable to type 'string | number | symbol'. +!!! error TS2322: Type '{|AB|2|}[{|S|3|}]' is not assignable to type 'symbol'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeErrors2.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeErrors2.ts:15:9 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeErrors2.ts:3:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeErrors2.ts:15:9 ~~~~~ !!! error TS2536: Type 'S' cannot be used to index type 'AB'. diff --git a/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt b/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt index 24eae941c61bd..ac69189628e7b 100644 --- a/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt +++ b/tests/baselines/reference/mappedTypeIndexedAccess.errors.txt @@ -28,10 +28,20 @@ tests/cases/compiler/mappedTypeIndexedAccess.ts(24,5): error TS2322: Type '{ key // Error expected here let pair1: Pair = { ~~~~~ -!!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; } | { key: "bar"; value: number; }'. -!!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; }'. +!!! error TS2322: Type '{ {|key|0|}: "foo"; {|value|1|}: number; }' is not assignable to type '{ {|key|2|}: "foo"; {|value|3|}: string; } | { {|key|4|}: "bar"; {|value|5|}: number; }'. +!!! error TS2322: Type '{ {|key|6|}: "foo"; {|value|7|}: number; }' is not assignable to type '{ {|key|8|}: "foo"; {|value|9|}: string; }'. !!! error TS2322: Types of property 'value' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/mappedTypeIndexedAccess.ts:19:5 +!!! annotated symbol 1 tests/cases/compiler/mappedTypeIndexedAccess.ts:20:5 +!!! annotated symbol 2 tests/cases/compiler/mappedTypeIndexedAccess.ts:5:9 +!!! annotated symbol 3 tests/cases/compiler/mappedTypeIndexedAccess.ts:6:9 +!!! annotated symbol 4 tests/cases/compiler/mappedTypeIndexedAccess.ts:5:9 +!!! annotated symbol 5 tests/cases/compiler/mappedTypeIndexedAccess.ts:6:9 +!!! annotated symbol 6 tests/cases/compiler/mappedTypeIndexedAccess.ts:19:5 +!!! annotated symbol 7 tests/cases/compiler/mappedTypeIndexedAccess.ts:20:5 +!!! annotated symbol 8 tests/cases/compiler/mappedTypeIndexedAccess.ts:5:9 +!!! annotated symbol 9 tests/cases/compiler/mappedTypeIndexedAccess.ts:6:9 key: "foo", value: 3 }; @@ -39,10 +49,20 @@ tests/cases/compiler/mappedTypeIndexedAccess.ts(24,5): error TS2322: Type '{ key // Error expected here let pair2: Pairs[keyof FooBar] = { ~~~~~ -!!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; } | { key: "bar"; value: number; }'. -!!! error TS2322: Type '{ key: "foo"; value: number; }' is not assignable to type '{ key: "foo"; value: string; }'. +!!! error TS2322: Type '{ {|key|0|}: "foo"; {|value|1|}: number; }' is not assignable to type '{ {|key|2|}: "foo"; {|value|3|}: string; } | { {|key|4|}: "bar"; {|value|5|}: number; }'. +!!! error TS2322: Type '{ {|key|6|}: "foo"; {|value|7|}: number; }' is not assignable to type '{ {|key|8|}: "foo"; {|value|9|}: string; }'. !!! error TS2322: Types of property 'value' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/mappedTypeIndexedAccess.ts:25:5 +!!! annotated symbol 1 tests/cases/compiler/mappedTypeIndexedAccess.ts:26:5 +!!! annotated symbol 2 tests/cases/compiler/mappedTypeIndexedAccess.ts:5:9 +!!! annotated symbol 3 tests/cases/compiler/mappedTypeIndexedAccess.ts:6:9 +!!! annotated symbol 4 tests/cases/compiler/mappedTypeIndexedAccess.ts:5:9 +!!! annotated symbol 5 tests/cases/compiler/mappedTypeIndexedAccess.ts:6:9 +!!! annotated symbol 6 tests/cases/compiler/mappedTypeIndexedAccess.ts:25:5 +!!! annotated symbol 7 tests/cases/compiler/mappedTypeIndexedAccess.ts:26:5 +!!! annotated symbol 8 tests/cases/compiler/mappedTypeIndexedAccess.ts:5:9 +!!! annotated symbol 9 tests/cases/compiler/mappedTypeIndexedAccess.ts:6:9 key: "foo", value: 3 }; diff --git a/tests/baselines/reference/mappedTypeRelationships.errors.txt b/tests/baselines/reference/mappedTypeRelationships.errors.txt index 6e76eb4721c10..97248efe75d2e 100644 --- a/tests/baselines/reference/mappedTypeRelationships.errors.txt +++ b/tests/baselines/reference/mappedTypeRelationships.errors.txt @@ -101,18 +101,36 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS x[k] = y[k]; y[k] = x[k]; // Error ~~~~ -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}]' is not assignable to type '{|U|2|}[keyof {|T|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:13 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:13 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:16 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:13 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:13 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:16 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:13 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:16 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:9:16 } function f4(x: T, y: U, k: K) { x[k] = y[k]; y[k] = x[k]; // Error ~~~~ -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}]' is not assignable to type '{|U|2|}[{|K|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:13 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:29 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:16 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:29 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:13 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:16 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:13 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:16 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:14:16 } function f5(x: T, y: U, k: keyof U) { @@ -136,57 +154,152 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS function f10(x: T, y: Partial, k: keyof T) { x[k] = y[k]; // Error ~~~~ -!!! error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}] | undefined' is not assignable to type '{|T|2|}[keyof {|T|3|}]'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|T|4|}[keyof {|T|5|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:29:14 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:29:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:29:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:29:14 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:29:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:29:14 y[k] = x[k]; } function f11(x: T, y: Partial, k: K) { x[k] = y[k]; // Error ~~~~ -!!! error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}] | undefined' is not assignable to type '{|T|2|}[{|K|3|}]'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|T|4|}[{|K|5|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:34:14 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:34:17 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:34:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:34:17 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:34:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:34:17 y[k] = x[k]; } function f12(x: T, y: Partial, k: keyof T) { x[k] = y[k]; // Error ~~~~ -!!! error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'. +!!! error TS2322: Type '{|U|0|}[keyof {|T|1|}] | undefined' is not assignable to type '{|T|2|}[keyof {|T|3|}]'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|T|4|}[keyof {|T|5|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 y[k] = x[k]; // Error ~~~~ -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[keyof T] | undefined'. -!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'. -!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}]' is not assignable to type '{|U|2|}[keyof {|T|3|}] | undefined'. +!!! error TS2322: Type '{|T|4|}[string] | {|T|5|}[number] | {|T|6|}[symbol]' is not assignable to type '{|U|7|}[keyof {|T|8|}] | undefined'. +!!! error TS2322: Type '{|T|9|}[string]' is not assignable to type '{|U|10|}[keyof {|T|11|}] | undefined'. +!!! error TS2322: Type '{|T|12|}[string]' is not assignable to type '{|U|13|}[keyof {|T|14|}]'. +!!! error TS2322: Type '{|T|15|}' is not assignable to type '{|U|16|}'. +!!! error TS2322: '{|T|17|}' is assignable to the constraint of type '{|U|18|}', but '{|U|19|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|20|}[keyof {|T|21|}]' is not assignable to type '{|U|22|}[keyof {|T|23|}]'. +!!! error TS2322: Type '{|T|24|}' is not assignable to type '{|U|25|}'. +!!! error TS2322: '{|T|26|}' is assignable to the constraint of type '{|U|27|}', but '{|U|28|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 17 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 18 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 19 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 20 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 21 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 22 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 23 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 24 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 25 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 26 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:14 +!!! annotated symbol 27 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 +!!! annotated symbol 28 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:39:17 } function f13(x: T, y: Partial, k: K) { x[k] = y[k]; // Error ~~~~ -!!! error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'. +!!! error TS2322: Type '{|U|0|}[{|K|1|}] | undefined' is not assignable to type '{|T|2|}[{|K|3|}]'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|T|4|}[{|K|5|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 y[k] = x[k]; // Error ~~~~ -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[K] | undefined'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[K] | undefined'. -!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K] | undefined'. -!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}]' is not assignable to type '{|U|2|}[{|K|3|}] | undefined'. +!!! error TS2322: Type '{|T|4|}[keyof {|T|5|}]' is not assignable to type '{|U|6|}[{|K|7|}] | undefined'. +!!! error TS2322: Type '{|T|8|}[string] | {|T|9|}[number] | {|T|10|}[symbol]' is not assignable to type '{|U|11|}[{|K|12|}] | undefined'. +!!! error TS2322: Type '{|T|13|}[string]' is not assignable to type '{|U|14|}[{|K|15|}] | undefined'. +!!! error TS2322: Type '{|T|16|}[string]' is not assignable to type '{|U|17|}[{|K|18|}]'. +!!! error TS2322: Type '{|T|19|}' is not assignable to type '{|U|20|}'. +!!! error TS2322: '{|T|21|}' is assignable to the constraint of type '{|U|22|}', but '{|U|23|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|24|}[keyof {|T|25|}]' is not assignable to type '{|U|26|}[{|K|27|}]'. +!!! error TS2322: Type '{|T|28|}' is not assignable to type '{|U|29|}'. +!!! error TS2322: '{|T|30|}' is assignable to the constraint of type '{|U|31|}', but '{|U|32|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|33|}[{|K|34|}]' is not assignable to type '{|U|35|}[{|K|36|}]'. +!!! error TS2322: Type '{|T|37|}' is not assignable to type '{|U|38|}'. +!!! error TS2322: '{|T|39|}' is assignable to the constraint of type '{|U|40|}', but '{|U|41|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 17 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 18 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 19 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 20 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 21 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 22 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 23 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 24 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 25 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 26 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 27 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 28 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 29 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 30 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 31 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 32 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 33 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 34 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 35 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 36 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:30 +!!! annotated symbol 37 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 38 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 39 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:14 +!!! annotated symbol 40 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 +!!! annotated symbol 41 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:44:17 } function f20(x: T, y: Readonly, k: keyof T) { @@ -207,9 +320,18 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS x[k] = y[k]; y[k] = x[k]; // Error ~~~~ -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[keyof {|T|1|}]' is not assignable to type '{|U|2|}[keyof {|T|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:14 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:17 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:14 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:17 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:14 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:17 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:59:17 ~~~~ !!! error TS2542: Index signature in type 'Readonly' only permits reading. } @@ -218,9 +340,18 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS x[k] = y[k]; y[k] = x[k]; // Error ~~~~ -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}[{|K|1|}]' is not assignable to type '{|U|2|}[{|K|3|}]'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:14 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:30 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:17 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:30 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:17 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:14 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:17 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:64:17 ~~~~ !!! error TS2542: Index signature in type 'Readonly' only permits reading. } @@ -230,8 +361,15 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS function f30(x: T, y: Partial) { x = y; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'T'. -!!! error TS2322: 'Partial' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{|Partial|3|}<{|T|4|}>' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:71:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:71:14 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:71:14 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:71:14 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:71:14 y = x; } @@ -239,7 +377,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS x = y; y = x; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'Partial'. +!!! error TS2322: Type '{|Partial|0|}<{|Thing|1|}>' is not assignable to type '{|Partial|2|}<{|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:69:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:76:14 } function f40(x: T, y: Readonly) { @@ -251,7 +393,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS x = y; y = x; // Error ~ -!!! error TS2322: Type 'Readonly' is not assignable to type 'Readonly'. +!!! error TS2322: Type '{|Readonly|0|}<{|Thing|1|}>' is not assignable to type '{|Readonly|2|}<{|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:69:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:86:14 } type Item = { @@ -292,7 +438,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS function f61(x: Identity, y: Partial) { x = y; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'Identity'. +!!! error TS2322: Type '{|Partial|0|}<{|U|1|}>' is not assignable to type '{|Identity|2|}<{|U|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:126:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:122:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:126:14 y = x; } @@ -310,69 +460,172 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(168,5): error TS x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'. -!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{ [{|P|0|} in keyof {|T|1|}]: {|T|2|}[{|P|3|}]; }' is not assignable to type '{ [{|P|4|} in keyof {|T|5|}]: {|U|6|}[{|P|7|}]; }'. +!!! error TS2322: Type '{|T|8|}[{|P|9|}]' is not assignable to type '{|U|10|}[{|P|11|}]'. +!!! error TS2322: Type '{|T|12|}' is not assignable to type '{|U|13|}'. +!!! error TS2322: '{|T|14|}' is assignable to the constraint of type '{|U|15|}', but '{|U|16|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:36 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:36 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:65 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:14 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:17 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:65 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:14 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:65 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:17 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:65 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:14 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:17 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:14 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:17 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:141:17 } function f72(x: { [P in keyof T]: T[P] }, y: { [P in keyof U]: U[P] }) { x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'. -!!! error TS2322: Type 'keyof U' is not assignable to type 'keyof T'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof T'. -!!! error TS2322: Type 'string' is not assignable to type 'keyof T'. +!!! error TS2322: Type '{ [{|P|0|} in keyof {|T|1|}]: {|T|2|}[{|P|3|}]; }' is not assignable to type '{ [{|P|4|} in keyof {|U|5|}]: {|U|6|}[{|P|7|}]; }'. +!!! error TS2322: Type 'keyof {|U|8|}' is not assignable to type 'keyof {|T|9|}'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof {|T|10|}'. +!!! error TS2322: Type 'string' is not assignable to type 'keyof {|T|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:36 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:36 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:65 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:17 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:17 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:65 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:17 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:14 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:14 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:146:14 } function f73(x: { [P in K]: T[P] }, y: { [P in keyof T]: T[P] }) { x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'K'. -!!! error TS2322: 'keyof T' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'K'. -!!! error TS2322: 'string | number | symbol' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. -!!! error TS2322: Type 'string' is not assignable to type 'K'. -!!! error TS2322: 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type '{ [{|P|0|} in {|K|1|}]: {|T|2|}[{|P|3|}]; }' is not assignable to type '{ [{|P|4|} in keyof {|T|5|}]: {|T|6|}[{|P|7|}]; }'. +!!! error TS2322: Type 'keyof {|T|8|}' is not assignable to type '{|K|9|}'. +!!! error TS2322: 'keyof {|T|10|}' is assignable to the constraint of type '{|K|11|}', but '{|K|12|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type '{|K|13|}'. +!!! error TS2322: 'string | number | symbol' is assignable to the constraint of type '{|K|14|}', but '{|K|15|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type 'string' is not assignable to type '{|K|16|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|K|17|}', but '{|K|18|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:42 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:42 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:65 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:14 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:14 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:65 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:14 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:14 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 17 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 +!!! annotated symbol 18 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:151:17 } function f74(x: { [P in K]: T[P] }, y: { [P in keyof U]: U[P] }) { x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'. -!!! error TS2322: Type 'keyof U' is not assignable to type 'K'. -!!! error TS2322: 'keyof U' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'K'. -!!! error TS2322: 'string | number | symbol' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. -!!! error TS2322: Type 'string' is not assignable to type 'K'. -!!! error TS2322: 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type '{ [{|P|0|} in {|K|1|}]: {|T|2|}[{|P|3|}]; }' is not assignable to type '{ [{|P|4|} in keyof {|U|5|}]: {|U|6|}[{|P|7|}]; }'. +!!! error TS2322: Type 'keyof {|U|8|}' is not assignable to type '{|K|9|}'. +!!! error TS2322: 'keyof {|U|10|}' is assignable to the constraint of type '{|K|11|}', but '{|K|12|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type '{|K|13|}'. +!!! error TS2322: 'string | number | symbol' is assignable to the constraint of type '{|K|14|}', but '{|K|15|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type 'string' is not assignable to type '{|K|16|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|K|17|}', but '{|K|18|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:55 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:55 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:78 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:17 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:17 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:78 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:17 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:17 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 17 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 +!!! annotated symbol 18 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:156:30 } function f75(x: { [P in K]: T[P] }, y: { [P in keyof T]: U[P] }) { x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'K'. -!!! error TS2322: 'keyof T' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'K'. -!!! error TS2322: 'string | number | symbol' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. -!!! error TS2322: Type 'string' is not assignable to type 'K'. -!!! error TS2322: 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type '{ [{|P|0|} in {|K|1|}]: {|T|2|}[{|P|3|}]; }' is not assignable to type '{ [{|P|4|} in keyof {|T|5|}]: {|U|6|}[{|P|7|}]; }'. +!!! error TS2322: Type 'keyof {|T|8|}' is not assignable to type '{|K|9|}'. +!!! error TS2322: 'keyof {|T|10|}' is assignable to the constraint of type '{|K|11|}', but '{|K|12|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type 'string | number | symbol' is not assignable to type '{|K|13|}'. +!!! error TS2322: 'string | number | symbol' is assignable to the constraint of type '{|K|14|}', but '{|K|15|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! error TS2322: Type 'string' is not assignable to type '{|K|16|}'. +!!! error TS2322: 'string' is assignable to the constraint of type '{|K|17|}', but '{|K|18|}' could be instantiated with a different subtype of constraint 'string | number | symbol'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:55 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:55 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:78 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:14 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:17 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:78 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:14 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:14 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 17 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 +!!! annotated symbol 18 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:161:30 } function f76(x: { [P in K]: T[P] }, y: { [P in K]: U[P] }) { x = y; y = x; // Error ~ -!!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'. -!!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{ [{|P|0|} in {|K|1|}]: {|T|2|}[{|P|3|}]; }' is not assignable to type '{ [{|P|4|} in {|K|5|}]: {|U|6|}[{|P|7|}]; }'. +!!! error TS2322: Type '{|T|8|}[{|P|9|}]' is not assignable to type '{|U|10|}[{|P|11|}]'. +!!! error TS2322: Type '{|T|12|}' is not assignable to type '{|U|13|}'. +!!! error TS2322: '{|T|14|}' is assignable to the constraint of type '{|U|15|}', but '{|U|16|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:55 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:30 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:14 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:55 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:78 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:30 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:17 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:78 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:14 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:78 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:17 +!!! annotated symbol 11 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:78 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:14 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:17 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:14 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:17 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts:166:17 } function f80(t: T): Partial { diff --git a/tests/baselines/reference/mappedTypeWithCombinedTypeMappers.errors.txt b/tests/baselines/reference/mappedTypeWithCombinedTypeMappers.errors.txt index 56837dd787e49..c26f281c8c9dc 100644 --- a/tests/baselines/reference/mappedTypeWithCombinedTypeMappers.errors.txt +++ b/tests/baselines/reference/mappedTypeWithCombinedTypeMappers.errors.txt @@ -21,5 +21,6 @@ tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts(18,7): error TS2322: T const shouldFail: { important: boolean } = output.x.children; ~~~~~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type '{ important: boolean; }'. +!!! error TS2322: Type 'string' is not assignable to type '{ {|important|0|}: boolean; }'. +!!! annotated symbol 0 tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts:18:21 \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypes5.errors.txt b/tests/baselines/reference/mappedTypes5.errors.txt index d0c32cd1dd956..4e6eac4751d60 100644 --- a/tests/baselines/reference/mappedTypes5.errors.txt +++ b/tests/baselines/reference/mappedTypes5.errors.txt @@ -11,14 +11,28 @@ tests/cases/conformance/types/mapped/mappedTypes5.ts(9,9): error TS2322: Type 'R let a4: Partial = rp; let b1: Readonly = p; // Error ~~ -!!! error TS2322: Type 'Partial' is not assignable to type 'Readonly'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|Readonly|2|}<{|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes5.ts:1:12 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypes5.ts:1:12 let b2: Readonly = r; let b3: Readonly = pr; // Error ~~ -!!! error TS2322: Type 'Partial>' is not assignable to type 'Readonly'. +!!! error TS2322: Type '{|Partial|0|}<{|Readonly|1|}<{|T|2|}>>' is not assignable to type '{|Readonly|3|}<{|T|4|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes5.ts:1:12 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypes5.ts:1:12 let b4: Readonly = rp; // Error ~~ -!!! error TS2322: Type 'Readonly>' is not assignable to type 'Readonly'. +!!! error TS2322: Type '{|Readonly|0|}<{|Partial|1|}<{|T|2|}>>' is not assignable to type '{|Readonly|3|}<{|T|4|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes5.ts:1:12 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypes5.ts:1:12 let c1: Partial> = p; let c2: Partial> = r; let c3: Partial> = pr; diff --git a/tests/baselines/reference/mappedTypes6.errors.txt b/tests/baselines/reference/mappedTypes6.errors.txt index 590e9ff953476..28a2bb157bf36 100644 --- a/tests/baselines/reference/mappedTypes6.errors.txt +++ b/tests/baselines/reference/mappedTypes6.errors.txt @@ -51,16 +51,30 @@ tests/cases/conformance/types/mapped/mappedTypes6.ts(120,4): error TS2540: Canno x = x; x = y; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'Required'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|Required|1|}<{|T|2|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 x = z; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'Required'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|Required|2|}<{|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 y = x; y = y; y = z; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'T'. -!!! error TS2322: 'Partial' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{|Partial|3|}<{|T|4|}>' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypes6.ts:21:13 z = x; z = y; z = z; @@ -72,32 +86,77 @@ tests/cases/conformance/types/mapped/mappedTypes6.ts(120,4): error TS2540: Canno w = w; w = x; // Error ~ -!!! error TS2322: Type 'Required' is not assignable to type 'Denullified'. -!!! error TS2322: Type 'T[P]' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'NonNullable'. -!!! error TS2322: Type 'T[string]' is not assignable to type 'NonNullable'. +!!! error TS2322: Type '{|Required|0|}<{|T|1|}>' is not assignable to type '{|Denullified|2|}<{|T|3|}>'. +!!! error TS2322: Type '{|T|4|}[{|P|5|}]' is not assignable to type '{|NonNullable|6|}<{|T|7|}[{|P|8|}]>'. +!!! error TS2322: Type '{|T|9|}[keyof {|T|10|}]' is not assignable to type '{|NonNullable|11|}<{|T|12|}[{|P|13|}]>'. +!!! error TS2322: Type '{|T|14|}[string] | {|T|15|}[number] | {|T|16|}[symbol]' is not assignable to type '{|NonNullable|17|}<{|T|18|}[{|P|19|}]>'. +!!! error TS2322: Type '{|T|20|}[string]' is not assignable to type '{|NonNullable|21|}<{|T|22|}[{|P|23|}]>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:26 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 7 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 8 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:26 +!!! annotated symbol 9 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 10 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 12 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 13 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:26 +!!! annotated symbol 14 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 15 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 16 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 18 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 19 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:26 +!!! annotated symbol 20 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 21 /.ts/lib.es5.d.ts:1474:6 +!!! annotated symbol 22 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 23 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:26 w = y; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'Denullified'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|Denullified|1|}<{|T|2|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 w = z; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'Denullified'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|Denullified|2|}<{|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 x = w; x = x; x = y; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'Required'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|Required|1|}<{|T|2|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 x = z; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'Required'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|Required|2|}<{|T|3|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 3 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 y = w; y = x; y = y; y = z; // Error ~ -!!! error TS2322: Type 'Partial' is not assignable to type 'T'. -!!! error TS2322: 'Partial' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Partial|0|}<{|T|1|}>' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{|Partial|3|}<{|T|4|}>' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1424:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 5 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 +!!! annotated symbol 6 tests/cases/conformance/types/mapped/mappedTypes6.ts:35:13 z = w; z = x; z = y; @@ -108,14 +167,21 @@ tests/cases/conformance/types/mapped/mappedTypes6.ts(120,4): error TS2540: Canno function f3(w: Denullified, x: Required, y: T, z: Partial) { w = {}; // Error ~ -!!! error TS2322: Type '{}' is not assignable to type 'Denullified'. +!!! error TS2322: Type '{}' is not assignable to type '{|Denullified|0|}<{|T|1|}>'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:33:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:55:13 x = {}; // Error ~ -!!! error TS2322: Type '{}' is not assignable to type 'Required'. +!!! error TS2322: Type '{}' is not assignable to type '{|Required|0|}<{|T|1|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:55:13 y = {}; // Error ~ -!!! error TS2322: Type '{}' is not assignable to type 'T'. -!!! error TS2322: '{}' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{|T|0|}'. +!!! error TS2322: '{}' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:55:13 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:55:13 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:55:13 z = {}; } @@ -151,8 +217,10 @@ tests/cases/conformance/types/mapped/mappedTypes6.ts(120,4): error TS2540: Canno x1 = { a: 1 }; // Error ~~ -!!! error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type 'Foo'. +!!! error TS2741: Property 'b' is missing in type '{ {|a|0|}: number; }' but required in type '{|Foo|1|}'. !!! related TS2728 tests/cases/conformance/types/mapped/mappedTypes6.ts:80:5: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:92:8 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:78:6 x1 = { a: 1, b: 1 }; x1 = { a: 1, b: 1, c: 1 }; x1 = { a: 1, b: 1, c: 1, d: 1 }; @@ -172,8 +240,13 @@ tests/cases/conformance/types/mapped/mappedTypes6.ts(120,4): error TS2540: Canno !!! error TS2739: Type '{ a: number; b: number; }' is missing the following properties from type 'Required': c, d x2 = { a: 1, b: 1, c: 1 }; // Error ~~ -!!! error TS2741: Property 'd' is missing in type '{ a: number; b: number; c: number; }' but required in type 'Required'. +!!! error TS2741: Property 'd' is missing in type '{ {|a|0|}: number; {|b|1|}: number; {|c|2|}: number; }' but required in type '{|Required|3|}<{|Foo|4|}>'. !!! related TS2728 tests/cases/conformance/types/mapped/mappedTypes6.ts:82:5: 'd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/mapped/mappedTypes6.ts:106:8 +!!! annotated symbol 1 tests/cases/conformance/types/mapped/mappedTypes6.ts:106:14 +!!! annotated symbol 2 tests/cases/conformance/types/mapped/mappedTypes6.ts:106:20 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 4 tests/cases/conformance/types/mapped/mappedTypes6.ts:78:6 x2 = { a: 1, b: 1, c: 1, d: 1 }; type Bar = { diff --git a/tests/baselines/reference/maxConstraints.errors.txt b/tests/baselines/reference/maxConstraints.errors.txt index ad8ba7f35393c..8965b73b0a764 100644 --- a/tests/baselines/reference/maxConstraints.errors.txt +++ b/tests/baselines/reference/maxConstraints.errors.txt @@ -11,4 +11,5 @@ tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type '1' var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'Comparable<1 | 2>'. \ No newline at end of file +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|Comparable|0|}<1 | 2>'. +!!! annotated symbol 0 tests/cases/compiler/maxConstraints.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/mergedDeclarations7.errors.txt b/tests/baselines/reference/mergedDeclarations7.errors.txt index cd9b3a5e939c5..c845ca65bf01d 100644 --- a/tests/baselines/reference/mergedDeclarations7.errors.txt +++ b/tests/baselines/reference/mergedDeclarations7.errors.txt @@ -26,7 +26,11 @@ tests/cases/compiler/test.ts(4,5): error TS2322: Type 'PassportStatic' is not as let p: Passport = passport.use(); ~ -!!! error TS2322: Type 'PassportStatic' is not assignable to type 'Passport'. +!!! error TS2322: Type '{|PassportStatic|0|}' is not assignable to type '{|Passport|1|}'. !!! error TS2322: Types of property 'use' are incompatible. -!!! error TS2322: Type '() => PassportStatic' is not assignable to type '() => this'. -!!! error TS2322: Type 'PassportStatic' is not assignable to type 'this'. \ No newline at end of file +!!! error TS2322: Type '() => {|PassportStatic|2|}' is not assignable to type '() => this'. +!!! error TS2322: Type '{|PassportStatic|3|}' is not assignable to type 'this'. +!!! annotated symbol 0 tests/cases/compiler/passport.d.ts:7:19 +!!! annotated symbol 1 tests/cases/compiler/passport.d.ts:8:13 +!!! annotated symbol 2 tests/cases/compiler/passport.d.ts:7:19 +!!! annotated symbol 3 tests/cases/compiler/passport.d.ts:7:19 \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt index 3bd351ed003ba..186f6386d2b03 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt @@ -20,8 +20,10 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class D implements A { // error ~ -!!! error TS2420: Class 'D' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|D|0|}' incorrectly implements interface '{|A|1|}'. !!! error TS2420: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts:13:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts:5:11 private x: number; y: string; z: string; @@ -29,8 +31,10 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class E implements A { // error ~ -!!! error TS2420: Class 'E' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|E|0|}' incorrectly implements interface '{|A|1|}'. !!! error TS2420: Property 'x' is private in type 'A' but not in type 'E'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates.ts:5:11 x: number; y: string; z: string; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt index db68469577eae..54fa4f2f4f234 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt @@ -27,8 +27,10 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class D extends C implements A { // error ~ -!!! error TS2420: Class 'D' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|D|0|}' incorrectly implements interface '{|A|1|}'. !!! error TS2420: Types have separate declarations of a private property 'w'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:17:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:9:11 private w: number; y: string; z: string; @@ -36,12 +38,18 @@ tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheri class E extends C2 implements A { // error ~ -!!! error TS2415: Class 'E' incorrectly extends base class 'C2'. +!!! error TS2415: Class '{|E|0|}' incorrectly extends base class '{|C2|1|}'. !!! error TS2415: Property 'w' is private in type 'C2' but not in type 'E'. +!!! annotated symbol 0 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:23:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:5:7 ~ -!!! error TS2420: Class 'E' incorrectly implements interface 'A'. -!!! error TS2420: Property 'x' is missing in type 'E' but required in type 'A'. +!!! error TS2420: Class '{|E|0|}' incorrectly implements interface '{|A|1|}'. +!!! error TS2420: Property 'x' is missing in type '{|E|2|}' but required in type '{|A|3|}'. !!! related TS2728 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:2:13: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:23:7 +!!! annotated symbol 1 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:9:11 +!!! annotated symbol 2 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:23:7 +!!! annotated symbol 3 tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts:9:11 w: number; y: string; z: string; diff --git a/tests/baselines/reference/mismatchedGenericArguments1.errors.txt b/tests/baselines/reference/mismatchedGenericArguments1.errors.txt index 8c95aa78fb78a..4afd18317e9e2 100644 --- a/tests/baselines/reference/mismatchedGenericArguments1.errors.txt +++ b/tests/baselines/reference/mismatchedGenericArguments1.errors.txt @@ -16,9 +16,13 @@ tests/cases/compiler/mismatchedGenericArguments1.ts(11,4): error TS2416: Propert foo(x: string): number { ~~~ !!! error TS2416: Property 'foo' in type 'C' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => number' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '(x: string) => number' is not assignable to type '<{|T|0|}>(x: {|T|1|}) => {|T|2|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 +!!! annotated symbol 1 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 +!!! annotated symbol 2 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 +!!! annotated symbol 3 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 return null; } } @@ -27,9 +31,14 @@ tests/cases/compiler/mismatchedGenericArguments1.ts(11,4): error TS2416: Propert foo(x: string): number { ~~~ !!! error TS2416: Property 'foo' in type 'C2' is not assignable to the same property in base type 'IFoo'. -!!! error TS2416: Type '(x: string) => number' is not assignable to type '(x: T) => T'. +!!! error TS2416: Type '<{|U|0|}>(x: string) => number' is not assignable to type '<{|T|1|}>(x: {|T|2|}) => {|T|3|}'. !!! error TS2416: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2416: Type 'T' is not assignable to type 'string'. +!!! error TS2416: Type '{|T|4|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/mismatchedGenericArguments1.ts:11:8 +!!! annotated symbol 1 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 +!!! annotated symbol 2 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 +!!! annotated symbol 3 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 +!!! annotated symbol 4 tests/cases/compiler/mismatchedGenericArguments1.ts:2:8 return null; } } diff --git a/tests/baselines/reference/mixinAccessModifiers.errors.txt b/tests/baselines/reference/mixinAccessModifiers.errors.txt index 05cd72cbb6bf7..9d5899c2e2b33 100644 --- a/tests/baselines/reference/mixinAccessModifiers.errors.txt +++ b/tests/baselines/reference/mixinAccessModifiers.errors.txt @@ -98,19 +98,34 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(130,4): error TS2445: Pr class C1 extends Mix(Private, Private2) {} ~~ -!!! error TS2415: Class 'C1' incorrectly extends base class 'Private & Private2'. -!!! error TS2415: Type 'C1' is not assignable to type 'Private'. +!!! error TS2415: Class '{|C1|0|}' incorrectly extends base class '{|Private|1|} & {|Private2|2|}'. +!!! error TS2415: Type '{|C1|3|}' is not assignable to type '{|Private|4|}'. !!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C1'. +!!! annotated symbol 0 tests/cases/conformance/classes/mixinAccessModifiers.ts:65:7 +!!! annotated symbol 1 tests/cases/conformance/classes/mixinAccessModifiers.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/classes/mixinAccessModifiers.ts:8:7 +!!! annotated symbol 3 tests/cases/conformance/classes/mixinAccessModifiers.ts:65:7 +!!! annotated symbol 4 tests/cases/conformance/classes/mixinAccessModifiers.ts:3:7 class C2 extends Mix(Private, Protected) {} ~~ -!!! error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'. -!!! error TS2415: Type 'C2' is not assignable to type 'Private'. +!!! error TS2415: Class '{|C2|0|}' incorrectly extends base class '{|Private|1|} & {|Protected|2|}'. +!!! error TS2415: Type '{|C2|3|}' is not assignable to type '{|Private|4|}'. !!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C2'. +!!! annotated symbol 0 tests/cases/conformance/classes/mixinAccessModifiers.ts:66:7 +!!! annotated symbol 1 tests/cases/conformance/classes/mixinAccessModifiers.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/classes/mixinAccessModifiers.ts:13:7 +!!! annotated symbol 3 tests/cases/conformance/classes/mixinAccessModifiers.ts:66:7 +!!! annotated symbol 4 tests/cases/conformance/classes/mixinAccessModifiers.ts:3:7 class C3 extends Mix(Private, Public) {} ~~ -!!! error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'. -!!! error TS2415: Type 'C3' is not assignable to type 'Private'. +!!! error TS2415: Class '{|C3|0|}' incorrectly extends base class '{|Private|1|} & {|Public|2|}'. +!!! error TS2415: Type '{|C3|3|}' is not assignable to type '{|Private|4|}'. !!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C3'. +!!! annotated symbol 0 tests/cases/conformance/classes/mixinAccessModifiers.ts:67:7 +!!! annotated symbol 1 tests/cases/conformance/classes/mixinAccessModifiers.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/classes/mixinAccessModifiers.ts:25:7 +!!! annotated symbol 3 tests/cases/conformance/classes/mixinAccessModifiers.ts:67:7 +!!! annotated symbol 4 tests/cases/conformance/classes/mixinAccessModifiers.ts:3:7 class C4 extends Mix(Protected, Protected2) { f(c4: C4, c5: C5, c6: C6) { diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt b/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt index 3cfa184d7f5da..300c90beeb910 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_preserveSymlinks.errors.txt @@ -13,8 +13,10 @@ // Should fail. We no longer resolve any symlinks. x = new C2(); ~ -!!! error TS2322: Type 'import("/app/node_modules/linked2/index").C' is not assignable to type 'import("/app/node_modules/linked/index").C'. +!!! error TS2322: Type 'import("/app/node_modules/linked2/index").{|C|0|}' is not assignable to type 'import("/app/node_modules/linked/index").{|C|1|}'. !!! error TS2322: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 /app/node_modules/linked2/index.d.ts:2:14 +!!! annotated symbol 1 /app/node_modules/linked/index.d.ts:2:14 ==== /linked/index.d.ts (0 errors) ==== export { real } from "real"; diff --git a/tests/baselines/reference/multiLineContextDiagnosticWithPretty.errors.txt b/tests/baselines/reference/multiLineContextDiagnosticWithPretty.errors.txt index 44b13d7ea8e99..16ee000c08965 100644 --- a/tests/baselines/reference/multiLineContextDiagnosticWithPretty.errors.txt +++ b/tests/baselines/reference/multiLineContextDiagnosticWithPretty.errors.txt @@ -17,8 +17,11 @@ ~~~~~~~~~~~~~~ } ~~~~~ -!!! error TS2322: Type '{ a: { b: string; }; }' is not assignable to type '{ c: string; }'. +!!! error TS2322: Type '{ {|a|0|}: { {|b|1|}: string; }; }' is not assignable to type '{ {|c|2|}: string; }'. !!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ c: string; }'. +!!! annotated symbol 0 tests/cases/compiler/multiLineContextDiagnosticWithPretty.ts:2:5 +!!! annotated symbol 1 tests/cases/compiler/multiLineContextDiagnosticWithPretty.ts:3:9 +!!! annotated symbol 2 tests/cases/compiler/multiLineContextDiagnosticWithPretty.ts:1:11 }; Found 1 error. diff --git a/tests/baselines/reference/multiLineErrors.errors.txt b/tests/baselines/reference/multiLineErrors.errors.txt index 70366aeabedcd..d753c9533d8a5 100644 --- a/tests/baselines/reference/multiLineErrors.errors.txt +++ b/tests/baselines/reference/multiLineErrors.errors.txt @@ -34,9 +34,13 @@ tests/cases/compiler/multiLineErrors.ts(21,1): error TS2322: Type 'A2' is not as var t2: A2; t1 = t2; ~~ -!!! error TS2322: Type 'A2' is not assignable to type 'A1'. +!!! error TS2322: Type '{|A2|0|}' is not assignable to type '{|A1|1|}'. !!! error TS2322: Types of property 'x' are incompatible. -!!! error TS2322: Type '{ y: string; }' is not assignable to type '{ y: number; }'. +!!! error TS2322: Type '{ {|y|2|}: string; }' is not assignable to type '{ {|y|3|}: number; }'. !!! error TS2322: Types of property 'y' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/multiLineErrors.ts:15:11 +!!! annotated symbol 1 tests/cases/compiler/multiLineErrors.ts:12:11 +!!! annotated symbol 2 tests/cases/compiler/multiLineErrors.ts:16:10 +!!! annotated symbol 3 tests/cases/compiler/multiLineErrors.ts:13:10 \ No newline at end of file diff --git a/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt b/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt index bb90bcee99943..461ab44829922 100644 --- a/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt +++ b/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt @@ -15,10 +15,17 @@ tests/cases/compiler/mutuallyRecursiveCallbacks.ts(7,1): error TS2322: Type ' declare var bar: Bar<{}>; bar = foo; ~~~ -!!! error TS2322: Type '(bar: Bar) => void' is not assignable to type 'Bar<{}>'. +!!! error TS2322: Type '<{|T|0|}>(bar: {|Bar|1|}<{|T|2|}>) => void' is not assignable to type '{|Bar|3|}<{}>'. !!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible. !!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible. -!!! error TS2322: Type 'Foo' is not assignable to type 'Bar<{}>'. +!!! error TS2322: Type '{|Foo|4|}' is not assignable to type '{|Bar|5|}<{}>'. !!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible. -!!! error TS2322: Type 'void' is not assignable to type 'Foo'. +!!! error TS2322: Type 'void' is not assignable to type '{|Foo|6|}'. +!!! annotated symbol 0 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:5:22 +!!! annotated symbol 1 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:4:6 +!!! annotated symbol 2 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:5:22 +!!! annotated symbol 3 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:4:6 +!!! annotated symbol 4 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:3:11 +!!! annotated symbol 5 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:4:6 +!!! annotated symbol 6 tests/cases/compiler/mutuallyRecursiveCallbacks.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt index 70b04d2658000..650f7ca1e7e55 100644 --- a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt @@ -17,9 +17,15 @@ tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeF if (x instanceof B) { acceptA(x); ~ -!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'A'. -!!! error TS2345: Property 'a' is missing in type 'B' but required in type 'A'. +!!! error TS2345: Argument of type '{|B|0|}<{|T|1|}>' is not assignable to parameter of type '{|A|2|}'. +!!! error TS2345: Property 'a' is missing in type '{|B|3|}<{|T|4|}>' but required in type '{|A|5|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:2:17: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:11:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:1:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:5:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:11:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:1:7 } if (x instanceof A) { diff --git a/tests/baselines/reference/nativeToBoxedTypes.errors.txt b/tests/baselines/reference/nativeToBoxedTypes.errors.txt index 34c43fe0a51d9..43892ee868cbd 100644 --- a/tests/baselines/reference/nativeToBoxedTypes.errors.txt +++ b/tests/baselines/reference/nativeToBoxedTypes.errors.txt @@ -13,26 +13,34 @@ tests/cases/compiler/nativeToBoxedTypes.ts(15,1): error TS2322: Type 'Symbol' is var n = 100; n = N; ~ -!!! error TS2322: Type 'Number' is not assignable to type 'number'. -!!! error TS2322: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. +!!! error TS2322: Type '{|Number|0|}' is not assignable to type 'number'. +!!! error TS2322: 'number' is a primitive, but '{|Number|1|}' is a wrapper object. Prefer using 'number' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:542:11 var S = new String(); var s = "foge"; s = S; ~ -!!! error TS2322: Type 'String' is not assignable to type 'string'. -!!! error TS2322: 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. +!!! error TS2322: Type '{|String|0|}' is not assignable to type 'string'. +!!! error TS2322: 'string' is a primitive, but '{|String|1|}' is a wrapper object. Prefer using 'string' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:394:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:394:11 var B = new Boolean(); var b = true; b = B; ~ -!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'. -!!! error TS2322: 'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible. +!!! error TS2322: Type '{|Boolean|0|}' is not assignable to type 'boolean'. +!!! error TS2322: 'boolean' is a primitive, but '{|Boolean|1|}' is a wrapper object. Prefer using 'boolean' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:529:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:529:11 var sym: symbol; var Sym: Symbol; sym = Sym; ~~~ -!!! error TS2322: Type 'Symbol' is not assignable to type 'symbol'. -!!! error TS2322: 'symbol' is a primitive, but 'Symbol' is a wrapper object. Prefer using 'symbol' when possible. \ No newline at end of file +!!! error TS2322: Type '{|Symbol|0|}' is not assignable to type 'symbol'. +!!! error TS2322: 'symbol' is a primitive, but '{|Symbol|1|}' is a wrapper object. Prefer using 'symbol' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:97:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:97:11 \ No newline at end of file diff --git a/tests/baselines/reference/nestedFreshLiteral.errors.txt b/tests/baselines/reference/nestedFreshLiteral.errors.txt index fc7fc8976990f..c1d84133271ed 100644 --- a/tests/baselines/reference/nestedFreshLiteral.errors.txt +++ b/tests/baselines/reference/nestedFreshLiteral.errors.txt @@ -18,9 +18,14 @@ tests/cases/compiler/nestedFreshLiteral.ts(12,21): error TS2322: Type '{ prop: { let stylen: NestedCSSProps = { nested: { prop: { colour: 'red' } } ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'. +!!! error TS2322: Type '{ {|prop|0|}: { {|colour|1|}: string; }; }' is not assignable to type '{|NestedSelector|2|}'. !!! error TS2322: Types of property 'prop' are incompatible. -!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'. +!!! error TS2322: Type '{ {|colour|3|}: string; }' is not assignable to type '{|CSSProps|4|}'. !!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'? !!! related TS6500 tests/cases/compiler/nestedFreshLiteral.ts:5:3: The expected type comes from property 'nested' which is declared here on type 'NestedCSSProps' +!!! annotated symbol 0 tests/cases/compiler/nestedFreshLiteral.ts:12:13 +!!! annotated symbol 1 tests/cases/compiler/nestedFreshLiteral.ts:12:21 +!!! annotated symbol 2 tests/cases/compiler/nestedFreshLiteral.ts:7:11 +!!! annotated symbol 3 tests/cases/compiler/nestedFreshLiteral.ts:12:21 +!!! annotated symbol 4 tests/cases/compiler/nestedFreshLiteral.ts:1:11 } \ No newline at end of file diff --git a/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt b/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt index 138a4a8415825..b00b6cefba962 100644 --- a/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt +++ b/tests/baselines/reference/nestedRecursiveArraysOrObjectsError01.errors.txt @@ -26,20 +26,50 @@ tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts(10,9): error TS232 foo: 'asdf', jj: 1 // intentional error ~~~~~ -!!! error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'Style'. -!!! error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'StyleArray'. +!!! error TS2322: Type '{ {|foo|0|}: string; {|jj|1|}: number; }[][][]' is not assignable to type '{|Style|2|}'. +!!! error TS2322: Type '{ {|foo|3|}: string; {|jj|4|}: number; }[][][]' is not assignable to type '{|StyleArray|5|}'. !!! error TS2322: Types of property 'pop' are incompatible. -!!! error TS2322: Type '() => { foo: string; jj: number; }[][]' is not assignable to type '() => Style'. -!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'Style'. -!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'StyleArray'. +!!! error TS2322: Type '() => { {|foo|6|}: string; {|jj|7|}: number; }[][]' is not assignable to type '() => {|Style|8|}'. +!!! error TS2322: Type '{ {|foo|9|}: string; {|jj|10|}: number; }[][]' is not assignable to type '{|Style|11|}'. +!!! error TS2322: Type '{ {|foo|12|}: string; {|jj|13|}: number; }[][]' is not assignable to type '{|StyleArray|14|}'. !!! error TS2322: Types of property 'pop' are incompatible. -!!! error TS2322: Type '() => { foo: string; jj: number; }[]' is not assignable to type '() => Style'. -!!! error TS2322: Type '{ foo: string; jj: number; }[]' is not assignable to type 'Style'. -!!! error TS2322: Type '{ foo: string; jj: number; }[]' is not assignable to type 'StyleArray'. +!!! error TS2322: Type '() => { {|foo|15|}: string; {|jj|16|}: number; }[]' is not assignable to type '() => {|Style|17|}'. +!!! error TS2322: Type '{ {|foo|18|}: string; {|jj|19|}: number; }[]' is not assignable to type '{|Style|20|}'. +!!! error TS2322: Type '{ {|foo|21|}: string; {|jj|22|}: number; }[]' is not assignable to type '{|StyleArray|23|}'. !!! error TS2322: Types of property 'pop' are incompatible. -!!! error TS2322: Type '() => { foo: string; jj: number; }' is not assignable to type '() => Style'. -!!! error TS2322: Type '{ foo: string; jj: number; }' is not assignable to type 'Style'. +!!! error TS2322: Type '() => { {|foo|24|}: string; {|jj|25|}: number; }' is not assignable to type '() => {|Style|26|}'. +!!! error TS2322: Type '{ {|foo|27|}: string; {|jj|28|}: number; }' is not assignable to type '{|Style|29|}'. !!! error TS2322: Object literal may only specify known properties, and 'jj' does not exist in type 'Style'. +!!! annotated symbol 0 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 1 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 2 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 +!!! annotated symbol 3 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 4 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 5 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:2:11 +!!! annotated symbol 6 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 7 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 8 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 +!!! annotated symbol 9 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 10 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 11 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 +!!! annotated symbol 12 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 13 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 14 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:2:11 +!!! annotated symbol 15 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 16 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 17 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 +!!! annotated symbol 18 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 19 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 20 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 +!!! annotated symbol 21 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 22 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 23 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:2:11 +!!! annotated symbol 24 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 25 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 26 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 +!!! annotated symbol 27 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:9:9 +!!! annotated symbol 28 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:10:9 +!!! annotated symbol 29 tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts:1:6 }]] ]; diff --git a/tests/baselines/reference/noErrorTruncation.errors.txt b/tests/baselines/reference/noErrorTruncation.errors.txt index d5244df81a893..336a3f8bbc3ce 100644 --- a/tests/baselines/reference/noErrorTruncation.errors.txt +++ b/tests/baselines/reference/noErrorTruncation.errors.txt @@ -13,7 +13,13 @@ tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not const x: SomeLongOptionA ~ -!!! error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'. +!!! error TS2322: Type '42' is not assignable to type '{|SomeLongOptionA|0|} | {|SomeLongOptionB|1|} | {|SomeLongOptionC|2|} | {|SomeLongOptionD|3|} | {|SomeLongOptionE|4|} | {|SomeLongOptionF|5|}'. +!!! annotated symbol 0 tests/cases/compiler/noErrorTruncation.ts:3:6 +!!! annotated symbol 1 tests/cases/compiler/noErrorTruncation.ts:4:6 +!!! annotated symbol 2 tests/cases/compiler/noErrorTruncation.ts:5:6 +!!! annotated symbol 3 tests/cases/compiler/noErrorTruncation.ts:6:6 +!!! annotated symbol 4 tests/cases/compiler/noErrorTruncation.ts:7:6 +!!! annotated symbol 5 tests/cases/compiler/noErrorTruncation.ts:8:6 | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt index f616693788cdc..b4e6329388068 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt @@ -19,5 +19,7 @@ tests/cases/compiler/noImplicitAnyInCastExpression.ts(15,2): error TS2352: Conve // Neither types is assignable to each other ({ c: null }); ~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '{ c: null; }' to type 'IFoo' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type '{ c: null; }' is missing the following properties from type 'IFoo': a, b \ No newline at end of file +!!! error TS2352: Conversion of type '{ {|c|0|}: null; }' to type '{|IFoo|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type '{ c: null; }' is missing the following properties from type 'IFoo': a, b +!!! annotated symbol 0 tests/cases/compiler/noImplicitAnyInCastExpression.ts:15:10 +!!! annotated symbol 1 tests/cases/compiler/noImplicitAnyInCastExpression.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/nonIterableRestElement3.errors.txt b/tests/baselines/reference/nonIterableRestElement3.errors.txt index 4c4fbe217607a..c30d99f1a7098 100644 --- a/tests/baselines/reference/nonIterableRestElement3.errors.txt +++ b/tests/baselines/reference/nonIterableRestElement3.errors.txt @@ -5,5 +5,6 @@ tests/cases/conformance/es6/destructuring/nonIterableRestElement3.ts(2,5): error var c = { bogus: 0 }; [...c] = ["", 0]; ~ -!!! error TS2741: Property 'bogus' is missing in type '(string | number)[]' but required in type '{ bogus: number; }'. -!!! related TS2728 tests/cases/conformance/es6/destructuring/nonIterableRestElement3.ts:1:11: 'bogus' is declared here. \ No newline at end of file +!!! error TS2741: Property 'bogus' is missing in type '(string | number)[]' but required in type '{ {|bogus|0|}: number; }'. +!!! related TS2728 tests/cases/conformance/es6/destructuring/nonIterableRestElement3.ts:1:11: 'bogus' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/destructuring/nonIterableRestElement3.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt b/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt index 4cf8a99e0eafb..ef666cc7015fd 100644 --- a/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt +++ b/tests/baselines/reference/nonObjectUnionNestedExcessPropertyCheck.errors.txt @@ -24,21 +24,35 @@ tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts(19,56): error TS // These are the types of errors we want: const propB1: IProps | number = { INVALID_PROP_NAME: 'share', iconProp: 'test' }; ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'number | IProps'. +!!! error TS2322: Type '{ {|INVALID_PROP_NAME|0|}: string; {|iconProp|1|}: string; }' is not assignable to type 'number | {|IProps|2|}'. !!! error TS2322: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. +!!! annotated symbol 0 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:13:35 +!!! annotated symbol 1 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:13:63 +!!! annotated symbol 2 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:1:11 // Nested typing works here and we also get an expected error: const propB2: IProps | number = { nestedProp: { asdfasdf: 'test' }, iconProp: 'test' }; ~~~~~~ -!!! error TS2322: Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'number | IProps'. -!!! error TS2322: Type '{ nestedProp: { asdfasdf: string; }; iconProp: string; }' is not assignable to type 'IProps'. +!!! error TS2322: Type '{ {|nestedProp|0|}: { {|asdfasdf|1|}: string; }; {|iconProp|2|}: string; }' is not assignable to type 'number | {|IProps|3|}'. +!!! error TS2322: Type '{ {|nestedProp|4|}: { {|asdfasdf|5|}: string; }; {|iconProp|6|}: string; }' is not assignable to type '{|IProps|7|}'. !!! error TS2322: Types of property 'nestedProp' are incompatible. !!! error TS2322: Type '{ asdfasdf: string; }' has no properties in common with type '{ testBool?: boolean; }'. +!!! annotated symbol 0 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:16:35 +!!! annotated symbol 1 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:16:49 +!!! annotated symbol 2 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:16:69 +!!! annotated symbol 3 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:16:35 +!!! annotated symbol 5 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:16:49 +!!! annotated symbol 6 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:16:69 +!!! annotated symbol 7 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:1:11 // Want an error generated here but there isn't one. const propA1: INestedProps | number = { nestedProps: { INVALID_PROP_NAME: 'share', iconProp: 'test' } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2326: Types of property 'nestedProps' are incompatible. -!!! error TS2326: Type '{ INVALID_PROP_NAME: string; iconProp: string; }' is not assignable to type 'IProps'. +!!! error TS2326: Type '{ {|INVALID_PROP_NAME|0|}: string; {|iconProp|1|}: string; }' is not assignable to type '{|IProps|2|}'. !!! error TS2326: Object literal may only specify known properties, and 'INVALID_PROP_NAME' does not exist in type 'IProps'. +!!! annotated symbol 0 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:19:56 +!!! annotated symbol 1 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:19:84 +!!! annotated symbol 2 tests/cases/compiler/nonObjectUnionNestedExcessPropertyCheck.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/nonPrimitiveAndTypeVariables.errors.txt b/tests/baselines/reference/nonPrimitiveAndTypeVariables.errors.txt index 7e69f57747635..21288f076f9e2 100644 --- a/tests/baselines/reference/nonPrimitiveAndTypeVariables.errors.txt +++ b/tests/baselines/reference/nonPrimitiveAndTypeVariables.errors.txt @@ -16,11 +16,19 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts(11,9) function foo(x: T) { let a: object = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'object'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'object'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:14 let b: U | object = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'object | U'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'object | {|U|1|}'. +!!! error TS2322: Type '{|T|2|}' is not assignable to type '{|U|3|}'. +!!! error TS2322: '{|T|4|}' is assignable to the constraint of type '{|U|5|}', but '{|U|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:14 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:17 +!!! annotated symbol 2 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:14 +!!! annotated symbol 3 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:17 +!!! annotated symbol 4 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:14 +!!! annotated symbol 5 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:17 +!!! annotated symbol 6 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts:9:17 } \ No newline at end of file diff --git a/tests/baselines/reference/nonPrimitiveAssignError.errors.txt b/tests/baselines/reference/nonPrimitiveAssignError.errors.txt index 76bdf786834c5..9f122cfadde5e 100644 --- a/tests/baselines/reference/nonPrimitiveAssignError.errors.txt +++ b/tests/baselines/reference/nonPrimitiveAssignError.errors.txt @@ -14,8 +14,9 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(19,1): err x = a; y = a; // expect error ~ -!!! error TS2741: Property 'foo' is missing in type '{}' but required in type '{ foo: string; }'. +!!! error TS2741: Property 'foo' is missing in type '{}' but required in type '{ {|foo|0|}: string; }'. !!! related TS2728 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts:2:10: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts:2:10 a = x; a = y; diff --git a/tests/baselines/reference/nonPrimitiveConstraintOfIndexAccessType.errors.txt b/tests/baselines/reference/nonPrimitiveConstraintOfIndexAccessType.errors.txt index 14c97cb148c1a..7de343a868b25 100644 --- a/tests/baselines/reference/nonPrimitiveConstraintOfIndexAccessType.errors.txt +++ b/tests/baselines/reference/nonPrimitiveConstraintOfIndexAccessType.errors.txt @@ -16,52 +16,72 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessTy function f(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:2:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:2:30 } function g(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:5:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:5:28 } function h(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:8:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:8:33 } function i(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:11:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:11:28 } function j(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. !!! error TS2322: Type 'string' is not assignable to type 'never'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:14:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:14:29 } function k(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:17:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:17:30 } function o(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:20:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:20:30 } function l(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:23:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:23:26 } function m(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:26:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:26:37 } function n(s: string, tp: T[P]): void { tp = s; ~~ -!!! error TS2322: Type 'string' is not assignable to type 'T[P]'. +!!! error TS2322: Type 'string' is not assignable to type '{|T|0|}[{|P|1|}]'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:29:12 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveConstraintOfIndexAccessType.ts:29:47 } \ No newline at end of file diff --git a/tests/baselines/reference/nonPrimitiveInGeneric.errors.txt b/tests/baselines/reference/nonPrimitiveInGeneric.errors.txt index ce257c876809d..5ef0fd3076109 100644 --- a/tests/baselines/reference/nonPrimitiveInGeneric.errors.txt +++ b/tests/baselines/reference/nonPrimitiveInGeneric.errors.txt @@ -12,7 +12,8 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveInGeneric.ts(34,14): erro function generic(t: T) { var o: object = t; // expect error ~ -!!! error TS2322: Type 'T' is not assignable to type 'object'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'object'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveInGeneric.ts:1:18 } var a = {}; var b = "42"; diff --git a/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt b/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt index 5aad982dc20f0..35ce9eceb9166 100644 --- a/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt +++ b/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt @@ -27,6 +27,8 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(8,38 const foo: object & {} = {bar: 'bar'}; // ok const bar: object & {err: string} = {bar: 'bar'}; // error ~~~~~~~~~~ -!!! error TS2322: Type '{ bar: string; }' is not assignable to type 'object & { err: string; }'. +!!! error TS2322: Type '{ {|bar|0|}: string; }' is not assignable to type 'object & { {|err|1|}: string; }'. !!! error TS2322: Object literal may only specify known properties, and 'bar' does not exist in type 'object & { err: string; }'. +!!! annotated symbol 0 tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts:8:38 +!!! annotated symbol 1 tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts:8:22 \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt index 0807af21960a0..b26b257ba0716 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt @@ -55,7 +55,8 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo "2.5": new B(), 3.0: 1, ~~~ -!!! error TS2322: Type 'number' is not assignable to type 'A'. +!!! error TS2322: Type 'number' is not assignable to type '{|A|0|}'. !!! related TS6501 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts:39:10: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations2.ts:3:7 "4.0": '' } \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint1.errors.txt b/tests/baselines/reference/numericIndexerConstraint1.errors.txt index 0d4bb17002bbc..5222b3d631337 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint1.errors.txt @@ -6,5 +6,6 @@ tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'numb var x: { [index: string]: number; }; var result: Foo = x["one"]; // error ~~~~~~ -!!! error TS2322: Type 'number' is not assignable to type 'Foo'. +!!! error TS2322: Type 'number' is not assignable to type '{|Foo|0|}'. +!!! annotated symbol 0 tests/cases/compiler/numericIndexerConstraint1.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint2.errors.txt b/tests/baselines/reference/numericIndexerConstraint2.errors.txt index 5c0337acc3247..9a00a43e620e4 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint2.errors.txt @@ -9,6 +9,9 @@ tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ on var a: { one: number; }; x = a; ~ -!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: Foo; }'. +!!! error TS2322: Type '{ {|one|0|}: number; }' is not assignable to type '{ [index: string]: {|Foo|1|}; }'. !!! error TS2322: Property 'one' is incompatible with index signature. -!!! error TS2322: Type 'number' is not assignable to type 'Foo'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type '{|Foo|2|}'. +!!! annotated symbol 0 tests/cases/compiler/numericIndexerConstraint2.ts:3:10 +!!! annotated symbol 1 tests/cases/compiler/numericIndexerConstraint2.ts:1:7 +!!! annotated symbol 2 tests/cases/compiler/numericIndexerConstraint2.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint5.errors.txt b/tests/baselines/reference/numericIndexerConstraint5.errors.txt index 04b7e0dc337c3..47806e15a0fad 100644 --- a/tests/baselines/reference/numericIndexerConstraint5.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint5.errors.txt @@ -7,6 +7,10 @@ tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2322: Type '{ na var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; ~ -!!! error TS2322: Type '{ name: string; 0: Date; }' is not assignable to type '{ [name: number]: string; }'. +!!! error TS2322: Type '{ {|name|0|}: string; {|0|1|}: {|Date|2|}; }' is not assignable to type '{ [name: number]: string; }'. !!! error TS2322: Property '0' is incompatible with index signature. -!!! error TS2322: Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|Date|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/numericIndexerConstraint5.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/numericIndexerConstraint5.ts:1:22 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:729:11 \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping1.errors.txt b/tests/baselines/reference/numericIndexerTyping1.errors.txt index 3717a79a0adbe..a5d5cabb3f661 100644 --- a/tests/baselines/reference/numericIndexerTyping1.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping1.errors.txt @@ -13,9 +13,11 @@ tests/cases/compiler/numericIndexerTyping1.ts(12,5): error TS2322: Type 'Date' i var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! error TS2322: Type 'Date' is not assignable to type 'string'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexer ~~ -!!! error TS2322: Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|Date|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping2.errors.txt b/tests/baselines/reference/numericIndexerTyping2.errors.txt index 5f2278c6ac1ca..07acac6a50cb7 100644 --- a/tests/baselines/reference/numericIndexerTyping2.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping2.errors.txt @@ -13,9 +13,11 @@ tests/cases/compiler/numericIndexerTyping2.ts(12,5): error TS2322: Type 'Date' i var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! error TS2322: Type 'Date' is not assignable to type 'string'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere ~~ -!!! error TS2322: Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '{|Date|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 \ No newline at end of file diff --git a/tests/baselines/reference/numericLiteralTypes3.errors.txt b/tests/baselines/reference/numericLiteralTypes3.errors.txt index a9fbb5df915a0..e41cf5d7e4697 100644 --- a/tests/baselines/reference/numericLiteralTypes3.errors.txt +++ b/tests/baselines/reference/numericLiteralTypes3.errors.txt @@ -46,31 +46,41 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 a = a; a = b; ~ -!!! error TS2322: Type 'B' is not assignable to type '1'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '1'. !!! error TS2322: Type '2' is not assignable to type '1'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 a = c; ~ -!!! error TS2322: Type 'C' is not assignable to type '1'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '1'. !!! error TS2322: Type '2' is not assignable to type '1'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:3:6 a = d; ~ -!!! error TS2322: Type 'D' is not assignable to type '1'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '1'. !!! error TS2322: Type '0' is not assignable to type '1'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 } function f2(a: A, b: B, c: C, d: D) { b = a; ~ -!!! error TS2322: Type '1' is not assignable to type 'B'. +!!! error TS2322: Type '1' is not assignable to type '{|B|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 b = b; b = c; ~ -!!! error TS2322: Type 'C' is not assignable to type 'B'. -!!! error TS2322: Type '1' is not assignable to type 'B'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|B|1|}'. +!!! error TS2322: Type '1' is not assignable to type '{|B|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 +!!! annotated symbol 2 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 b = d; ~ -!!! error TS2322: Type 'D' is not assignable to type 'B'. -!!! error TS2322: Type '0' is not assignable to type 'B'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|B|1|}'. +!!! error TS2322: Type '0' is not assignable to type '{|B|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 +!!! annotated symbol 2 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 } function f3(a: A, b: B, c: C, d: D) { @@ -79,20 +89,29 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 c = c; c = d; ~ -!!! error TS2322: Type 'D' is not assignable to type 'C'. -!!! error TS2322: Type '0' is not assignable to type 'C'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|C|1|}'. +!!! error TS2322: Type '0' is not assignable to type '{|C|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:3:6 +!!! annotated symbol 2 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:3:6 } function f4(a: A, b: B, c: C, d: D) { d = a; d = b; ~ -!!! error TS2322: Type 'B' is not assignable to type 'D'. -!!! error TS2322: Type '3' is not assignable to type 'D'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|D|1|}'. +!!! error TS2322: Type '3' is not assignable to type '{|D|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 +!!! annotated symbol 2 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 d = c; ~ -!!! error TS2322: Type 'C' is not assignable to type 'D'. -!!! error TS2322: Type '3' is not assignable to type 'D'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|D|1|}'. +!!! error TS2322: Type '3' is not assignable to type '{|D|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:3:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 +!!! annotated symbol 2 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 d = d; } @@ -109,15 +128,18 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 !!! error TS2322: Type '3' is not assignable to type '1'. b = 0; ~ -!!! error TS2322: Type '0' is not assignable to type 'B'. +!!! error TS2322: Type '0' is not assignable to type '{|B|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 b = 1; ~ -!!! error TS2322: Type '1' is not assignable to type 'B'. +!!! error TS2322: Type '1' is not assignable to type '{|B|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:2:6 b = 2; b = 3; c = 0; ~ -!!! error TS2322: Type '0' is not assignable to type 'C'. +!!! error TS2322: Type '0' is not assignable to type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:3:6 c = 1; c = 2; c = 3; @@ -126,7 +148,8 @@ tests/cases/conformance/types/literal/numericLiteralTypes3.ts(98,14): error TS26 d = 2; d = 3; ~ -!!! error TS2322: Type '3' is not assignable to type 'D'. +!!! error TS2322: Type '3' is not assignable to type '{|D|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/numericLiteralTypes3.ts:4:6 } function f6(a: A, b: B, c: C, d: D) { diff --git a/tests/baselines/reference/objectLitIndexerContextualType.errors.txt b/tests/baselines/reference/objectLitIndexerContextualType.errors.txt index 3c766dedcc6bb..c111a60b9be9e 100644 --- a/tests/baselines/reference/objectLitIndexerContextualType.errors.txt +++ b/tests/baselines/reference/objectLitIndexerContextualType.errors.txt @@ -36,8 +36,10 @@ tests/cases/compiler/objectLitIndexerContextualType.ts(21,17): error TS2363: The y = { s: t => t * t, // Should error ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ s: (t: any) => number; }' is not assignable to type 'J'. +!!! error TS2322: Type '{ {|s|0|}: (t: any) => number; }' is not assignable to type '{|J|1|}'. !!! error TS2322: Object literal may only specify known properties, and 's' does not exist in type 'J'. +!!! annotated symbol 0 tests/cases/compiler/objectLitIndexerContextualType.ts:18:5 +!!! annotated symbol 1 tests/cases/compiler/objectLitIndexerContextualType.ts:5:11 }; y = { 0: t => t * t, // Should error diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 1b79e4db5ad48..3ddf58405372f 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt @@ -6,5 +6,7 @@ tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,27): error TS2322: Typ // Shouldn't compile var x: { a: number; } = { b: 5 }; ~~~~ -!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. -!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|b|0|}: number; }' is not assignable to type '{ {|a|1|}: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. +!!! annotated symbol 0 tests/cases/compiler/objectLitStructuralTypeMismatch.ts:2:27 +!!! annotated symbol 1 tests/cases/compiler/objectLitStructuralTypeMismatch.ts:2:10 \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralExcessProperties.errors.txt b/tests/baselines/reference/objectLiteralExcessProperties.errors.txt index 4721cc7288227..3446b8721cb0c 100644 --- a/tests/baselines/reference/objectLiteralExcessProperties.errors.txt +++ b/tests/baselines/reference/objectLiteralExcessProperties.errors.txt @@ -46,51 +46,91 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type var b1: Book = { forword: "oops" }; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ forword: string; }' is not assignable to type 'Book'. +!!! error TS2322: Type '{ {|forword|0|}: string; }' is not assignable to type '{|Book|1|}'. !!! error TS2322: Object literal may only specify known properties, but 'forword' does not exist in type 'Book'. Did you mean to write 'foreword'? +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:9:18 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 var b2: Book | string = { foreward: "nope" }; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ foreward: string; }' is not assignable to type 'string | Book'. +!!! error TS2322: Type '{ {|foreward|0|}: string; }' is not assignable to type 'string | {|Book|1|}'. !!! error TS2322: Object literal may only specify known properties, but 'foreward' does not exist in type 'Book'. Did you mean to write 'foreword'? +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:11:27 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 var b3: Book | (Book[]) = [{ foreword: "hello" }, { forwards: "back" }]; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '({ foreword: string; } | { forwards: string; })[]' is not assignable to type 'Book | Book[]'. -!!! error TS2322: Type '({ foreword: string; } | { forwards: string; })[]' is not assignable to type 'Book[]'. -!!! error TS2322: Type '{ foreword: string; } | { forwards: string; }' is not assignable to type 'Book'. -!!! error TS2322: Type '{ forwards: string; }' is not assignable to type 'Book'. +!!! error TS2322: Type '({ {|foreword|0|}: string; } | { {|forwards|1|}: string; })[]' is not assignable to type '{|Book|2|} | {|Book|3|}[]'. +!!! error TS2322: Type '({ {|foreword|4|}: string; } | { {|forwards|5|}: string; })[]' is not assignable to type '{|Book|6|}[]'. +!!! error TS2322: Type '{ {|foreword|7|}: string; } | { {|forwards|8|}: string; }' is not assignable to type '{|Book|9|}'. +!!! error TS2322: Type '{ {|forwards|10|}: string; }' is not assignable to type '{|Book|11|}'. !!! error TS2322: Object literal may only specify known properties, and 'forwards' does not exist in type 'Book'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:13:30 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:13:53 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralExcessProperties.ts:13:30 +!!! annotated symbol 5 tests/cases/compiler/objectLiteralExcessProperties.ts:13:53 +!!! annotated symbol 6 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 7 tests/cases/compiler/objectLiteralExcessProperties.ts:13:30 +!!! annotated symbol 8 tests/cases/compiler/objectLiteralExcessProperties.ts:13:53 +!!! annotated symbol 9 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/objectLiteralExcessProperties.ts:13:53 +!!! annotated symbol 11 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 var b4: Book & Cover = { foreword: "hi", colour: "blue" }; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ foreword: string; colour: string; }' is not assignable to type 'Book & Cover'. +!!! error TS2322: Type '{ {|foreword|0|}: string; {|colour|1|}: string; }' is not assignable to type '{|Book|2|} & {|Cover|3|}'. !!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'Book & Cover'. Did you mean to write 'color'? +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:15:26 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:15:42 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:5:11 var b5: Book & Cover = { foreward: "hi", color: "blue" }; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ foreward: string; color: string; }' is not assignable to type 'Book & Cover'. +!!! error TS2322: Type '{ {|foreward|0|}: string; {|color|1|}: string; }' is not assignable to type '{|Book|2|} & {|Cover|3|}'. !!! error TS2322: Object literal may only specify known properties, but 'foreward' does not exist in type 'Book & Cover'. Did you mean to write 'foreword'? +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:17:26 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:17:42 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:5:11 var b6: Book & Cover = { foreword: "hi", color: "blue", price: 10.99 }; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ foreword: string; color: string; price: number; }' is not assignable to type 'Book & Cover'. +!!! error TS2322: Type '{ {|foreword|0|}: string; {|color|1|}: string; {|price|2|}: number; }' is not assignable to type '{|Book|3|} & {|Cover|4|}'. !!! error TS2322: Object literal may only specify known properties, and 'price' does not exist in type 'Book & Cover'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:19:26 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:19:42 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:19:57 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralExcessProperties.ts:5:11 var b7: Book & number = { foreword: "hi", price: 10.99 }; ~~ -!!! error TS2322: Type '{ foreword: string; price: number; }' is not assignable to type 'Book & number'. -!!! error TS2322: Type '{ foreword: string; price: number; }' is not assignable to type 'number'. +!!! error TS2322: Type '{ {|foreword|0|}: string; {|price|1|}: number; }' is not assignable to type '{|Book|2|} & number'. +!!! error TS2322: Type '{ {|foreword|3|}: string; {|price|4|}: number; }' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:21:27 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:21:43 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:21:27 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralExcessProperties.ts:21:43 var b8: Cover | Cover[] = { couleur : "non" }; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ couleur: string; }' is not assignable to type 'Cover | Cover[]'. +!!! error TS2322: Type '{ {|couleur|0|}: string; }' is not assignable to type '{|Cover|1|} | {|Cover|2|}[]'. !!! error TS2322: Object literal may only specify known properties, and 'couleur' does not exist in type 'Cover | Cover[]'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:23:29 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:5:11 var b9: Book | Book[] = { forewarned: "still no" }; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ forewarned: string; }' is not assignable to type 'Book | Book[]'. +!!! error TS2322: Type '{ {|forewarned|0|}: string; }' is not assignable to type '{|Book|1|} | {|Book|2|}[]'. !!! error TS2322: Object literal may only specify known properties, and 'forewarned' does not exist in type 'Book | Book[]'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:25:27 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:1:11 interface Indexed { [n: number]: Cover; @@ -100,9 +140,11 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type var b11: Indexed = { 0: { colour: "blue" } }; // nested object literal still errors ~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'Cover'. +!!! error TS2322: Type '{ {|colour|0|}: string; }' is not assignable to type '{|Cover|1|}'. !!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'Cover'. Did you mean to write 'color'? !!! related TS6501 tests/cases/compiler/objectLiteralExcessProperties.ts:28:5: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:33:27 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:5:11 // Repros inspired by #28752 @@ -112,30 +154,57 @@ tests/cases/compiler/objectLiteralExcessProperties.ts(49,44): error TS2322: Type // No excess property checks on generic types const obj1: T = { name: "test" }; ~~~~ -!!! error TS2322: Type '{ name: string; }' is not assignable to type 'T'. -!!! error TS2322: '{ name: string; }' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'any'. +!!! error TS2322: Type '{ {|name|0|}: string; }' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{ {|name|2|}: string; }' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint 'any'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:39:23 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:39:23 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 // No excess property checks on intersections involving generics const obj2: T & { prop: boolean } = { name: "test", prop: true }; ~~~~ -!!! error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type 'T & { prop: boolean; }'. -!!! error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type 'T'. -!!! error TS2322: '{ name: string; prop: boolean; }' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'any'. +!!! error TS2322: Type '{ {|name|0|}: string; {|prop|1|}: boolean; }' is not assignable to type '{|T|2|} & { {|prop|3|}: boolean; }'. +!!! error TS2322: Type '{ {|name|4|}: string; {|prop|5|}: boolean; }' is not assignable to type '{|T|6|}'. +!!! error TS2322: '{ {|name|7|}: string; {|prop|8|}: boolean; }' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint 'any'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:41:43 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:41:57 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:41:23 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralExcessProperties.ts:41:43 +!!! annotated symbol 5 tests/cases/compiler/objectLiteralExcessProperties.ts:41:57 +!!! annotated symbol 6 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 7 tests/cases/compiler/objectLiteralExcessProperties.ts:41:43 +!!! annotated symbol 8 tests/cases/compiler/objectLiteralExcessProperties.ts:41:57 +!!! annotated symbol 9 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 10 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 // Excess property checks only on non-generic parts of unions const obj3: T | { prop: boolean } = { name: "test", prop: true }; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ name: string; prop: true; }' is not assignable to type 'T | { prop: boolean; }'. +!!! error TS2322: Type '{ {|name|0|}: string; {|prop|1|}: true; }' is not assignable to type '{|T|2|} | { {|prop|3|}: boolean; }'. !!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ prop: boolean; }'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:43:43 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:43:57 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:43:23 // Excess property checks only on non-generic parts of unions const obj4: T & { prop: boolean } | { name: string } = { name: "test", prop: true }; ~~~~~~~~~~ -!!! error TS2322: Type '{ name: string; prop: boolean; }' is not assignable to type '{ name: string; } | (T & { prop: boolean; })'. +!!! error TS2322: Type '{ {|name|0|}: string; {|prop|1|}: boolean; }' is not assignable to type '{ {|name|2|}: string; } | ({|T|3|} & { {|prop|4|}: boolean; })'. !!! error TS2322: Object literal may only specify known properties, and 'prop' does not exist in type '{ name: string; }'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:45:62 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:45:76 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralExcessProperties.ts:45:43 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralExcessProperties.ts:37:15 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralExcessProperties.ts:45:23 // No excess property checks when union includes 'object' type const obj5: object | { x: string } = { z: 'abc' } // The 'object' type has no effect on intersections const obj6: object & { x: string } = { z: 'abc' } ~~~~~~~~ -!!! error TS2322: Type '{ z: string; }' is not assignable to type 'object & { x: string; }'. +!!! error TS2322: Type '{ {|z|0|}: string; }' is not assignable to type 'object & { {|x|1|}: string; }'. !!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type 'object & { x: string; }'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralExcessProperties.ts:49:44 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralExcessProperties.ts:49:28 } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFreshnessWithSpread.errors.txt b/tests/baselines/reference/objectLiteralFreshnessWithSpread.errors.txt index ac6b56f6cea43..ab6a0bbe76c97 100644 --- a/tests/baselines/reference/objectLiteralFreshnessWithSpread.errors.txt +++ b/tests/baselines/reference/objectLiteralFreshnessWithSpread.errors.txt @@ -6,6 +6,12 @@ tests/cases/compiler/objectLiteralFreshnessWithSpread.ts(2,35): error TS2322: Ty let x = { b: 1, extra: 2 } let xx: { a, b } = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra' ~~~~ -!!! error TS2322: Type '{ z: number; b: number; extra: number; a: number; }' is not assignable to type '{ a: any; b: any; }'. +!!! error TS2322: Type '{ {|z|0|}: number; {|b|1|}: number; {|extra|2|}: number; {|a|3|}: number; }' is not assignable to type '{ {|a|4|}: any; {|b|5|}: any; }'. !!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ a: any; b: any; }'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFreshnessWithSpread.ts:2:35 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFreshnessWithSpread.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralFreshnessWithSpread.ts:1:17 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralFreshnessWithSpread.ts:2:23 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralFreshnessWithSpread.ts:2:11 +!!! annotated symbol 5 tests/cases/compiler/objectLiteralFreshnessWithSpread.ts:2:14 \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt index 2c81e20f47316..e82c61a79448a 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt @@ -19,23 +19,36 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(13,36): error T f2({ hello: 1 }) // error ~~~~~~~~ -!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Argument of type '{ {|hello|0|}: number; }' is not assignable to parameter of type '{|I|1|}'. !!! error TS2345: Object literal may only specify known properties, and 'hello' does not exist in type 'I'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:8:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:1:11 f2({ value: '' }) // missing toString satisfied by Object's member f2({ value: '', what: 1 }) // missing toString satisfied by Object's member ~~~~~~~ -!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Argument of type '{ {|value|0|}: string; {|what|1|}: number; }' is not assignable to parameter of type '{|I|2|}'. !!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:10:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:10:17 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:1:11 f2({ toString: (s) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. -!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'. +!!! error TS2345: Argument of type '{ {|toString|0|}: (s: string) => string; }' is not assignable to parameter of type '{|I|1|}'. +!!! error TS2345: Property 'value' is missing in type '{ {|toString|2|}: (s: string) => string; }' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:2:5: 'value' is declared here. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:11:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:11:6 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:1:11 f2({ toString: (s: string) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. -!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'. +!!! error TS2345: Argument of type '{ {|toString|0|}: (s: string) => string; }' is not assignable to parameter of type '{|I|1|}'. +!!! error TS2345: Property 'value' is missing in type '{ {|toString|2|}: (s: string) => string; }' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:2:5: 'value' is declared here. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:12:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:12:6 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts:1:11 f2({ value: '', toString: (s) => s.uhhh }) // error ~~~~ !!! error TS2339: Property 'uhhh' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt index 41157c363eb59..a5deb7fe0f9e4 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt @@ -19,17 +19,26 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,17): error f2({ hello: 1 }) ~~~~~~~~ -!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Argument of type '{ {|hello|0|}: number; }' is not assignable to parameter of type '{|I2|1|}'. !!! error TS2345: Object literal may only specify known properties, and 'hello' does not exist in type 'I2'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:8:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:1:11 f2({ value: '' }) ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. -!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; }' but required in type 'I2'. +!!! error TS2345: Argument of type '{ {|value|0|}: string; }' is not assignable to parameter of type '{|I2|1|}'. +!!! error TS2345: Property 'doStuff' is missing in type '{ {|value|2|}: string; }' but required in type '{|I2|3|}'. !!! related TS2728 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:3:5: 'doStuff' is declared here. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:9:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:9:6 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:1:11 f2({ value: '', what: 1 }) ~~~~~~~ -!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Argument of type '{ {|value|0|}: string; {|what|1|}: number; }' is not assignable to parameter of type '{|I2|2|}'. !!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I2'. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:10:6 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:10:17 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts:1:11 f2({ toString: (s) => s }) ~~~~~~~~ !!! error TS2322: Type '(s: any) => any' is not assignable to type '() => string'. diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt index c32719dd4fe4b..bbe525e2bbc5e 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt @@ -17,10 +17,14 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(14,14): error TS2322: Type 'A var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A ~ -!!! error TS2741: Property 'y' is missing in type 'A' but required in type 'B'. +!!! error TS2741: Property 'y' is missing in type '{|A|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/objectLiteralIndexerErrors.ts:6:5: 'y' is declared here. !!! related TS6501 tests/cases/compiler/objectLiteralIndexerErrors.ts:13:26: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralIndexerErrors.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralIndexerErrors.ts:5:11 o1 = { x: c, 0: a }; // string indexer is any, number indexer is A ~ -!!! error TS2322: Type 'A' is not assignable to type 'B'. -!!! related TS6501 tests/cases/compiler/objectLiteralIndexerErrors.ts:13:26: The expected type comes from this index signature. \ No newline at end of file +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|B|1|}'. +!!! related TS6501 tests/cases/compiler/objectLiteralIndexerErrors.ts:13:26: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/compiler/objectLiteralIndexerErrors.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralIndexerErrors.ts:5:11 \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralNormalization.errors.txt b/tests/baselines/reference/objectLiteralNormalization.errors.txt index bc2dfdf228438..899a4c2efa57b 100644 --- a/tests/baselines/reference/objectLiteralNormalization.errors.txt +++ b/tests/baselines/reference/objectLiteralNormalization.errors.txt @@ -24,12 +24,32 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts !!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47: The expected type comes from property 'b' which is declared here on type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }' a1 = { b: "y" }; // Error ~~ -!!! error TS2322: Type '{ b: string; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'. +!!! error TS2322: Type '{ {|b|0|}: string; }' is not assignable to type '{ {|a|1|}: number; {|b|2|}?: undefined; {|c|3|}?: undefined; } | { {|a|4|}: number; {|b|5|}: string; {|c|6|}?: undefined; } | { {|a|7|}: number; {|b|8|}: string; {|c|9|}: boolean; }'. !!! error TS2322: Type '{ b: string; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, c +!!! annotated symbol 0 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:8:8 +!!! annotated symbol 1 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:13 +!!! annotated symbol 2 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 3 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:55 +!!! annotated symbol 4 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:23 +!!! annotated symbol 5 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:29 +!!! annotated symbol 6 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:55 +!!! annotated symbol 7 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:41 +!!! annotated symbol 8 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 9 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:55 a1 = { c: true }; // Error ~~ -!!! error TS2322: Type '{ c: true; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'. +!!! error TS2322: Type '{ {|c|0|}: true; }' is not assignable to type '{ {|a|1|}: number; {|b|2|}?: undefined; {|c|3|}?: undefined; } | { {|a|4|}: number; {|b|5|}: string; {|c|6|}?: undefined; } | { {|a|7|}: number; {|b|8|}: string; {|c|9|}: boolean; }'. !!! error TS2322: Type '{ c: true; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, b +!!! annotated symbol 0 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:9:8 +!!! annotated symbol 1 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:13 +!!! annotated symbol 2 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 3 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:55 +!!! annotated symbol 4 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:23 +!!! annotated symbol 5 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:29 +!!! annotated symbol 6 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:55 +!!! annotated symbol 7 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:41 +!!! annotated symbol 8 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 9 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:55 let a2 = [{ a: 1, b: 2 }, { a: "abc" }, {}][0]; a2.a; // string | number | undefined @@ -39,15 +59,37 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts a2 = {}; a2 = { a: "def", b: 20 }; // Error ~~ -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'. -!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a?: undefined; b?: undefined; }'. +!!! error TS2322: Type '{ {|a|0|}: string; {|b|1|}: number; }' is not assignable to type '{ {|a|2|}: number; {|b|3|}: number; } | { {|a|4|}: string; {|b|5|}?: undefined; } | { {|a|6|}?: undefined; {|b|7|}?: undefined; }'. +!!! error TS2322: Type '{ {|a|8|}: string; {|b|9|}: number; }' is not assignable to type '{ {|a|10|}?: undefined; {|b|11|}?: undefined; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'undefined'. +!!! annotated symbol 0 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:17:8 +!!! annotated symbol 1 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:17:18 +!!! annotated symbol 2 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:13 +!!! annotated symbol 3 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:19 +!!! annotated symbol 4 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:29 +!!! annotated symbol 5 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 6 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:29 +!!! annotated symbol 7 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 8 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:17:8 +!!! annotated symbol 9 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:17:18 +!!! annotated symbol 10 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:29 +!!! annotated symbol 11 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 a2 = { a: 1 }; // Error ~~ -!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'. -!!! error TS2322: Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: number; }'. +!!! error TS2322: Type '{ {|a|0|}: number; }' is not assignable to type '{ {|a|1|}: number; {|b|2|}: number; } | { {|a|3|}: string; {|b|4|}?: undefined; } | { {|a|5|}?: undefined; {|b|6|}?: undefined; }'. +!!! error TS2322: Property 'b' is missing in type '{ {|a|7|}: number; }' but required in type '{ {|a|8|}: number; {|b|9|}: number; }'. !!! related TS2728 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:19: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:18:8 +!!! annotated symbol 1 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:13 +!!! annotated symbol 2 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:19 +!!! annotated symbol 3 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:29 +!!! annotated symbol 4 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 5 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:29 +!!! annotated symbol 6 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47 +!!! annotated symbol 7 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:18:8 +!!! annotated symbol 8 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:13 +!!! annotated symbol 9 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:19 // Object literals containing spreads are not normalized declare let b1: { a: string, b: string } | { b: string, c: string }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt index 7a425857bd6dc..2dccd5091378e 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt @@ -11,8 +11,12 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person: { b: string; id: number } = { name, id }; // error ~~~~ -!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. +!!! error TS2322: Type '{ {|name|0|}: string; {|id|1|}: number; }' is not assignable to type '{ {|b|2|}: string; {|id|3|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'. +!!! annotated symbol 0 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts:4:43 +!!! annotated symbol 1 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts:4:49 +!!! annotated symbol 2 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts:4:15 +!!! annotated symbol 3 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts:4:26 var person1: { name, id }; // ok function foo(name: string, id: number): { id: string, name: number } { return { name, id }; } // error ~~~~ diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt index 235276bc6e5b6..8f58c011443e5 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt @@ -13,8 +13,12 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person: { b: string; id: number } = { name, id }; // error ~~~~ -!!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. +!!! error TS2322: Type '{ {|name|0|}: string; {|id|1|}: number; }' is not assignable to type '{ {|b|2|}: string; {|id|3|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'. +!!! annotated symbol 0 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:4:43 +!!! annotated symbol 1 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:4:49 +!!! annotated symbol 2 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:4:15 +!!! annotated symbol 3 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:4:26 function bar(name: string, id: number): { name: number, id: string } { return { name, id }; } // error ~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. @@ -26,7 +30,11 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person1: { name, id }; // ok var person2: { name: string, id: number } = bar("hello", 5); ~~~~~~~ -!!! error TS2322: Type '{ name: number; id: string; }' is not assignable to type '{ name: string; id: number; }'. +!!! error TS2322: Type '{ {|name|0|}: number; {|id|1|}: string; }' is not assignable to type '{ {|name|2|}: string; {|id|3|}: number; }'. !!! error TS2322: Types of property 'name' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:5:43 +!!! annotated symbol 1 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:5:57 +!!! annotated symbol 2 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:8:16 +!!! annotated symbol 3 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts:8:30 \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt index f98bcfb1cefc7..b99223a0c5f5a 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt @@ -11,7 +11,15 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr function foo(p: { a: string; id: number }) { } foo(person); // error ~~~~~~ -!!! error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'. -!!! error TS2345: Property 'a' is missing in type '{ name: string; id: number; }' but required in type '{ a: string; id: number; }'. +!!! error TS2345: Argument of type '{ {|name|0|}: string; {|id|1|}: number; }' is not assignable to parameter of type '{ {|a|2|}: string; {|id|3|}: number; }'. +!!! error TS2345: Property 'a' is missing in type '{ {|name|4|}: string; {|id|5|}: number; }' but required in type '{ {|a|6|}: string; {|id|7|}: number; }'. !!! related TS2728 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:6:19: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:4:16 +!!! annotated symbol 1 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:4:22 +!!! annotated symbol 2 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:6:19 +!!! annotated symbol 3 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:6:30 +!!! annotated symbol 4 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:4:16 +!!! annotated symbol 5 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:4:22 +!!! annotated symbol 6 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:6:19 +!!! annotated symbol 7 tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesFunctionArgument2.ts:6:30 \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt b/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt index 5260d6a8da6d3..6580ea48e4312 100644 --- a/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt +++ b/tests/baselines/reference/objectLiteralsAgainstUnionsOfArrays01.errors.txt @@ -16,10 +16,15 @@ tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts(10,5): error TS232 let x: Foo[] = [ { bar: { prop: 100 } } ~~~ -!!! error TS2322: Type '{ prop: number; }' is not assignable to type 'Bar | Bar[]'. -!!! error TS2322: Type '{ prop: number; }' is not assignable to type 'Bar'. +!!! error TS2322: Type '{ {|prop|0|}: number; }' is not assignable to type '{|Bar|1|} | {|Bar|2|}[]'. +!!! error TS2322: Type '{ {|prop|3|}: number; }' is not assignable to type '{|Bar|4|}'. !!! error TS2322: Types of property 'prop' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6500 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:2:3: The expected type comes from property 'bar' which is declared here on type 'Foo' +!!! annotated symbol 0 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:10:12 +!!! annotated symbol 1 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:5:11 +!!! annotated symbol 3 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:10:12 +!!! annotated symbol 4 tests/cases/compiler/objectLiteralsAgainstUnionsOfArrays01.ts:5:11 ] \ No newline at end of file diff --git a/tests/baselines/reference/objectRestNegative.errors.txt b/tests/baselines/reference/objectRestNegative.errors.txt index 42b25d137ef96..64c206a2f6f3f 100644 --- a/tests/baselines/reference/objectRestNegative.errors.txt +++ b/tests/baselines/reference/objectRestNegative.errors.txt @@ -18,9 +18,11 @@ tests/cases/conformance/types/rest/objectRestNegative.ts(17,9): error TS2701: Th let notAssignable: { a: string }; ({ b, ...notAssignable } = o); ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ a: string; }'. +!!! error TS2322: Type '{ {|a|0|}: number; }' is not assignable to type '{ {|a|1|}: string; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/rest/objectRestNegative.ts:1:11 +!!! annotated symbol 1 tests/cases/conformance/types/rest/objectRestNegative.ts:5:22 function stillMustBeLast({ ...mustBeLast, a }: { a: number, b: string }): void { diff --git a/tests/baselines/reference/objectSpreadNegative.errors.txt b/tests/baselines/reference/objectSpreadNegative.errors.txt index bb064283a7bda..c4ea14299d507 100644 --- a/tests/baselines/reference/objectSpreadNegative.errors.txt +++ b/tests/baselines/reference/objectSpreadNegative.errors.txt @@ -36,8 +36,10 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(58,11): error TS233 let optionalNumber: { sn?: number }; let allOptional: { sn: string | number } = { ...optionalString, ...optionalNumber }; ~~~~~~~~~~~ -!!! error TS2322: Type '{ sn?: string | number; }' is not assignable to type '{ sn: string | number; }'. +!!! error TS2322: Type '{ {|sn|0|}?: string | number; }' is not assignable to type '{ {|sn|1|}: string | number; }'. !!! error TS2322: Property 'sn' is optional in type '{ sn?: string | number; }' but required in type '{ sn: string | number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadNegative.ts:14:23 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadNegative.ts:16:20 // error, 'sn' is optional in source, required in target // assignability as target @@ -46,13 +48,19 @@ tests/cases/conformance/types/spread/objectSpreadNegative.ts(58,11): error TS233 let spread = { ...{ b: true }, ...{s: "foo" } }; spread = { s: "foo" }; // error, missing 'b' ~~~~~~ -!!! error TS2741: Property 'b' is missing in type '{ s: string; }' but required in type '{ s: string; b: boolean; }'. +!!! error TS2741: Property 'b' is missing in type '{ {|s|0|}: string; }' but required in type '{ {|s|1|}: string; {|b|2|}: boolean; }'. !!! related TS2728 tests/cases/conformance/types/spread/objectSpreadNegative.ts:22:21: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadNegative.ts:23:12 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadNegative.ts:22:36 +!!! annotated symbol 2 tests/cases/conformance/types/spread/objectSpreadNegative.ts:22:21 let b = { b: false }; spread = b; // error, missing 's' ~~~~~~ -!!! error TS2741: Property 's' is missing in type '{ b: boolean; }' but required in type '{ s: string; b: boolean; }'. +!!! error TS2741: Property 's' is missing in type '{ {|b|0|}: boolean; }' but required in type '{ {|s|1|}: string; {|b|2|}: boolean; }'. !!! related TS2728 tests/cases/conformance/types/spread/objectSpreadNegative.ts:22:36: 's' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadNegative.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadNegative.ts:22:36 +!!! annotated symbol 2 tests/cases/conformance/types/spread/objectSpreadNegative.ts:22:21 // literal repeats are not allowed, but spread repeats are fine let duplicated = { b: 'bad', ...o, b: 'bad', ...o2, b: 'bad' } diff --git a/tests/baselines/reference/objectSpreadStrictNull.errors.txt b/tests/baselines/reference/objectSpreadStrictNull.errors.txt index 9ebc4a5faaa45..2e4a6dc938b98 100644 --- a/tests/baselines/reference/objectSpreadStrictNull.errors.txt +++ b/tests/baselines/reference/objectSpreadStrictNull.errors.txt @@ -33,24 +33,30 @@ tests/cases/conformance/types/spread/objectSpreadStrictNull.ts(42,5): error TS23 // undefined let undefinedUnionStops: { sn: string | number } = { ...definiteBoolean, ...definiteString, ...undefinedNumber }; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ sn: number | undefined; }' is not assignable to type '{ sn: string | number; }'. +!!! error TS2322: Type '{ {|sn|0|}: number | undefined; }' is not assignable to type '{ {|sn|1|}: string | number; }'. !!! error TS2322: Types of property 'sn' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'string | number'. !!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:7:24 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:14:32 let undefinedUnionDuplicates: { sn: string | number } = { ...definiteBoolean, ...definiteString, ...undefinedString, ...undefinedNumber }; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ sn: number | undefined; }' is not assignable to type '{ sn: string | number; }'. +!!! error TS2322: Type '{ {|sn|0|}: number | undefined; }' is not assignable to type '{ {|sn|1|}: string | number; }'. !!! error TS2322: Types of property 'sn' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'string | number'. !!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:7:24 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:15:37 let allUndefined: { sn: string | number | undefined } = { ...undefinedString, ...undefinedNumber }; let undefinedWithOptionalContinues: { sn: string | number | boolean } = { ...definiteBoolean, ...undefinedString, ...optionalNumber }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ sn: string | number | undefined; }' is not assignable to type '{ sn: string | number | boolean; }'. +!!! error TS2322: Type '{ {|sn|0|}: string | number | undefined; }' is not assignable to type '{ {|sn|1|}: string | number | boolean; }'. !!! error TS2322: Types of property 'sn' are incompatible. !!! error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number | boolean'. !!! error TS2322: Type 'undefined' is not assignable to type 'string | number | boolean'. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:6:24 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:18:43 } type Movie = { @@ -79,9 +85,12 @@ tests/cases/conformance/types/spread/objectSpreadStrictNull.ts(42,5): error TS23 // error: not optional, undefined remains fields = { ...fields, ...nearlyPartialFields }; ~~~~~~ -!!! error TS2322: Type '{ foo: number | undefined; bar: string | undefined; }' is not assignable to type 'Fields'. +!!! error TS2322: Type '{ {|foo|0|}: number | undefined; {|bar|1|}: string | undefined; }' is not assignable to type '{|Fields|2|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'number | undefined' is not assignable to type 'number'. !!! error TS2322: Type 'undefined' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:35:5 +!!! annotated symbol 1 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:36:5 +!!! annotated symbol 2 tests/cases/conformance/types/spread/objectSpreadStrictNull.ts:30:11 } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt index c4ee3ea17b27b..0a8d7b7bc417e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt @@ -21,10 +21,12 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var o: Object; o = i; // error ~ -!!! error TS2322: Type 'I' is not assignable to type 'Object'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => void' is not assignable to type '() => string'. !!! error TS2322: Type 'void' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts:1:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 i = o; // ok class C { @@ -33,10 +35,12 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var c: C; o = c; // error ~ -!!! error TS2322: Type 'C' is not assignable to type 'Object'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => void' is not assignable to type '() => string'. !!! error TS2322: Type 'void' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts:10:7 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 c = o; // ok var a = { @@ -44,8 +48,10 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC } o = a; // error ~ -!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'. +!!! error TS2322: Type '{ {|toString|0|}: () => void; }' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => void' is not assignable to type '() => string'. !!! error TS2322: Type 'void' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts:18:5 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt index 3e27b22240e6b..24daa2545af32 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt @@ -31,17 +31,21 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var o: Object; o = i; // error ~ -!!! error TS2322: Type 'I' is not assignable to type 'Object'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => number' is not assignable to type '() => string'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts:1:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 i = o; // error ~ -!!! error TS2322: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => string' is not assignable to type '() => number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts:1:11 class C { toString(): number { return 1; } @@ -49,25 +53,31 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC var c: C; o = c; // error ~ -!!! error TS2322: Type 'C' is not assignable to type 'Object'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => number' is not assignable to type '() => string'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts:10:7 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 c = o; // error ~ -!!! error TS2322: Type 'Object' is not assignable to type 'C'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => string' is not assignable to type '() => number'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts:10:7 var a = { toString: () => { } } o = a; // error ~ -!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'. +!!! error TS2322: Type '{ {|toString|0|}: () => void; }' is not assignable to type '{|Object|1|}'. !!! error TS2322: Types of property 'toString' are incompatible. !!! error TS2322: Type '() => void' is not assignable to type '() => string'. !!! error TS2322: Type 'void' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts:18:5 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index bd6a09f500bd9..f789d1f571ef4 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -16,9 +16,11 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOf f = i; i = f; ~ -!!! error TS2322: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature '(): void'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts:1:11 var a: { (): void @@ -26,6 +28,7 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOf f = a; a = f; ~ -!!! error TS2322: Type 'Object' is not assignable to type '() => void'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '() => void'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature '(): void'. \ No newline at end of file +!!! error TS2322: Type 'Object' provides no match for the signature '(): void'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 24136942ea711..4499cb8ba6bc6 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -16,9 +16,11 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMemb f = i; i = f; ~ -!!! error TS2322: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts:1:11 var a: { new(): any @@ -26,6 +28,7 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMemb f = a; a = f; ~ -!!! error TS2322: Type 'Object' is not assignable to type 'new () => any'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type 'new () => any'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. \ No newline at end of file +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt index 582d7719a8976..7fe39923d3eb9 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt @@ -17,5 +17,7 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! error TS2322: Type 'List' is not assignable to type 'List'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '{|List|0|}' is not assignable to type '{|List|1|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty.ts:3:7 \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt index 6349a4528213a..5c9071a5837eb 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt @@ -17,5 +17,7 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! error TS2322: Type 'List' is not assignable to type 'List'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '{|List|0|}' is not assignable to type '{|List|1|}'. +!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedProperty2.ts:3:7 \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt index 72093dab99e9a..dfd56322d443b 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt @@ -40,15 +40,19 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec list1 = myList1; // error, not nominally equal list1 = myList2; // error, type mismatch ~~~~~ -!!! error TS2322: Type 'MyList' is not assignable to type 'List'. +!!! error TS2322: Type '{|MyList|0|}' is not assignable to type '{|List|1|}'. !!! error TS2322: Types of property 'data' are incompatible. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:3:7 list2 = myList1; // error, not nominally equal ~~~~~ -!!! error TS2322: Type 'MyList' is not assignable to type 'List'. +!!! error TS2322: Type '{|MyList|0|}' is not assignable to type '{|List|1|}'. !!! error TS2322: Types of property 'data' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:3:7 list2 = myList2; // error, type mismatch var rList1 = new List>(); @@ -58,16 +62,40 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec function foo, U extends MyList>(t: T, u: U) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'List'. -!!! error TS2322: Type 'MyList' is not assignable to type 'T'. -!!! error TS2322: 'MyList' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'List'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|List|5|}'. +!!! error TS2322: Type '{|MyList|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|MyList|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|List|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:3:7 u = t; // error ~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'MyList'. -!!! error TS2322: Type 'List' is not assignable to type 'U'. -!!! error TS2322: 'List' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'MyList'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|MyList|5|}'. +!!! error TS2322: Type '{|List|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2322: '{|List|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|MyList|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:29:38 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 var a: List; var b: MyList; @@ -80,10 +108,22 @@ tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRec function foo2>(t: T, u: U) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'MyList'. -!!! error TS2322: Type 'MyList' is not assignable to type 'T'. -!!! error TS2322: 'MyList' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'MyList'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|MyList|5|}'. +!!! error TS2322: Type '{|MyList|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|MyList|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|MyList|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:28 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:41:15 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/recursiveTypes/objectTypeWithRecursiveWrappedPropertyCheckedNominally.ts:8:7 u = t; // was error, ok after constraint made illegal, doesn't matter var a: List; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt index b037b3e6c81a2..230f6b4d16894 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.errors.txt @@ -29,6 +29,12 @@ tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectType var c3: C3; c3; // Should fail (private x originates in the same declaration, but different types) ~~~~~~ -!!! error TS2352: Conversion of type 'C3' to type 'C4' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'y' is missing in type 'C3' but required in type 'C4'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:21:5: 'y' is declared here. \ No newline at end of file +!!! error TS2352: Conversion of type '{|C3|0|}<{|T2|1|}>' to type '{|C4|2|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'y' is missing in type '{|C3|3|}<{|T2|4|}>' but required in type '{|C4|5|}'. +!!! related TS2728 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:21:5: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:16:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:2:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:20:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:16:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:2:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts:20:7 \ No newline at end of file diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt index 1898db924635b..76c82fd61811e 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt +++ b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt @@ -13,8 +13,18 @@ tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: Typ var b = function then(onFulFill?: (value: number) => U, onReject?: (reason: any) => U): Promise { return null }; a = b; // error because number is not assignable to string ~ -!!! error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise'. +!!! error TS2322: Type '<{|U|0|}>(onFulFill?: (value: number) => {|U|1|}, onReject?: (reason: any) => {|U|2|}) => {|Promise|3|}<{|U|4|}>' is not assignable to type '<{|U|5|}>(onFulfill?: (value: string) => {|U|6|}, onReject?: (reason: any) => {|U|7|}) => {|Promise|8|}<{|U|9|}>'. !!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible. !!! error TS2322: Types of parameters 'value' and 'value' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/optionalFunctionArgAssignability.ts:6:23 +!!! annotated symbol 1 tests/cases/compiler/optionalFunctionArgAssignability.ts:6:23 +!!! annotated symbol 2 tests/cases/compiler/optionalFunctionArgAssignability.ts:6:23 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/optionalFunctionArgAssignability.ts:6:23 +!!! annotated symbol 5 tests/cases/compiler/optionalFunctionArgAssignability.ts:5:23 +!!! annotated symbol 6 tests/cases/compiler/optionalFunctionArgAssignability.ts:5:23 +!!! annotated symbol 7 tests/cases/compiler/optionalFunctionArgAssignability.ts:5:23 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 9 tests/cases/compiler/optionalFunctionArgAssignability.ts:5:23 \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt index 10222bc5d8fc0..45805ab2b0c13 100644 --- a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt +++ b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt @@ -15,8 +15,10 @@ tests/cases/compiler/optionalParamAssignmentCompat.ts(10,13): error TS2322: Type var c: I1 = i2.p1; // should be ok var d: I1 = i2.m1; // should error ~~~~~ -!!! error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1'. +!!! error TS2322: Type '(p1?: string) => {|I1|0|}' is not assignable to type '{|I1|1|}'. !!! error TS2322: Types of parameters 'p1' and 'p1' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6212 tests/cases/compiler/optionalParamAssignmentCompat.ts:10:13: Did you mean to call this expression? +!!! annotated symbol 0 tests/cases/compiler/optionalParamAssignmentCompat.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/optionalParamAssignmentCompat.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/optionalParameterProperty.errors.txt b/tests/baselines/reference/optionalParameterProperty.errors.txt index c82dbd4ec9c2a..8aed6259ad270 100644 --- a/tests/baselines/reference/optionalParameterProperty.errors.txt +++ b/tests/baselines/reference/optionalParameterProperty.errors.txt @@ -11,10 +11,12 @@ tests/cases/compiler/optionalParameterProperty.ts(5,7): error TS2415: Class 'D' class D extends C { ~ -!!! error TS2415: Class 'D' incorrectly extends base class 'C'. +!!! error TS2415: Class '{|D|0|}' incorrectly extends base class '{|C|1|}'. !!! error TS2415: Types of property 'p' are incompatible. !!! error TS2415: Type 'number | undefined' is not assignable to type 'number'. !!! error TS2415: Type 'undefined' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/optionalParameterProperty.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/optionalParameterProperty.ts:1:7 constructor(public p?: number) { super(); } diff --git a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt index 3972eb400e3d6..e5c6642081988 100644 --- a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt +++ b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt @@ -14,9 +14,13 @@ tests/cases/compiler/optionalPropertiesInClasses.ts(10,7): error TS2420: Class ' class C2 implements ifoo { // ERROR - still need 'y' ~~ -!!! error TS2420: Class 'C2' incorrectly implements interface 'ifoo'. -!!! error TS2420: Property 'y' is missing in type 'C2' but required in type 'ifoo'. +!!! error TS2420: Class '{|C2|0|}' incorrectly implements interface '{|ifoo|1|}'. +!!! error TS2420: Property 'y' is missing in type '{|C2|2|}' but required in type '{|ifoo|3|}'. !!! related TS2728 tests/cases/compiler/optionalPropertiesInClasses.ts:3:2: 'y' is declared here. +!!! annotated symbol 0 tests/cases/compiler/optionalPropertiesInClasses.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/optionalPropertiesInClasses.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/optionalPropertiesInClasses.ts:10:7 +!!! annotated symbol 3 tests/cases/compiler/optionalPropertiesInClasses.ts:1:11 public x:number; } diff --git a/tests/baselines/reference/optionalPropertiesTest.errors.txt b/tests/baselines/reference/optionalPropertiesTest.errors.txt index 1482944ae5e96..09c2a5fdde64e 100644 --- a/tests/baselines/reference/optionalPropertiesTest.errors.txt +++ b/tests/baselines/reference/optionalPropertiesTest.errors.txt @@ -21,8 +21,10 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is foo = { id: 1234, name: "test" }; // Ok foo = { name: "test" }; // Error, id missing ~~~ -!!! error TS2741: Property 'id' is missing in type '{ name: string; }' but required in type 'IFoo'. +!!! error TS2741: Property 'id' is missing in type '{ {|name|0|}: string; }' but required in type '{|IFoo|1|}'. !!! related TS2728 tests/cases/compiler/optionalPropertiesTest.ts:5:5: 'id' is declared here. +!!! annotated symbol 0 tests/cases/compiler/optionalPropertiesTest.ts:14:9 +!!! annotated symbol 1 tests/cases/compiler/optionalPropertiesTest.ts:3:11 foo = {id: 1234, print:()=>{}} // Ok var s = foo.name || "default"; @@ -35,12 +37,14 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is var test1: i1 = {}; ~~~~~ -!!! error TS2741: Property 'M' is missing in type '{}' but required in type 'i1'. +!!! error TS2741: Property 'M' is missing in type '{}' but required in type '{|i1|0|}'. !!! related TS2728 tests/cases/compiler/optionalPropertiesTest.ts:20:16: 'M' is declared here. +!!! annotated symbol 0 tests/cases/compiler/optionalPropertiesTest.ts:20:11 var test2: i3 = {}; ~~~~~ -!!! error TS2741: Property 'M' is missing in type '{}' but required in type 'i3'. +!!! error TS2741: Property 'M' is missing in type '{}' but required in type '{|i3|0|}'. !!! related TS2728 tests/cases/compiler/optionalPropertiesTest.ts:22:16: 'M' is declared here. +!!! annotated symbol 0 tests/cases/compiler/optionalPropertiesTest.ts:22:11 var test3: i2 = {}; var test4: i4 = {}; var test5: i1 = { M: function () { } }; @@ -56,5 +60,7 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is var test10_2: i2; test10_1 = test10_2; ~~~~~~~~ -!!! error TS2322: Type 'i2' is not assignable to type 'i1'. -!!! error TS2322: Property 'M' is optional in type 'i2' but required in type 'i1'. \ No newline at end of file +!!! error TS2322: Type '{|i2|0|}' is not assignable to type '{|i1|1|}'. +!!! error TS2322: Property 'M' is optional in type 'i2' but required in type 'i1'. +!!! annotated symbol 0 tests/cases/compiler/optionalPropertiesTest.ts:21:11 +!!! annotated symbol 1 tests/cases/compiler/optionalPropertiesTest.ts:20:11 \ No newline at end of file diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index f108f0ea92da0..9c5f5aa3ef511 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -26,8 +26,11 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,5): error TS234 v({ s: "", n: 0 }).toLowerCase(); ~~~~~ -!!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. +!!! error TS2345: Argument of type '{ {|s|0|}: string; {|n|1|}: number; }' is not assignable to parameter of type '{ {|n|2|}: number; }'. !!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. +!!! annotated symbol 0 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:19:5 +!!! annotated symbol 1 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:19:12 +!!! annotated symbol 2 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:3:11 var w: A; var w: C; @@ -36,5 +39,8 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,5): error TS234 w({ s: "", n: 0 }).toLowerCase(); ~~~~~ -!!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. -!!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ {|s|0|}: string; {|n|1|}: number; }' is not assignable to parameter of type '{ {|n|2|}: number; }'. +!!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. +!!! annotated symbol 0 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:24:5 +!!! annotated symbol 1 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:24:12 +!!! annotated symbol 2 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt index c18a965a6dc6d..2c7b157128d5b 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt @@ -12,8 +12,10 @@ tests/cases/compiler/overEagerReturnTypeSpecialization.ts(8,5): error TS2322: Ty declare var v1: I1; var r1: I1 = v1.func(num => num.toString()) // Correctly returns an I1 ~~ -!!! error TS2322: Type 'I1' is not assignable to type 'I1'. +!!! error TS2322: Type '{|I1|0|}' is not assignable to type '{|I1|1|}'. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/overEagerReturnTypeSpecialization.ts:3:11 +!!! annotated symbol 1 tests/cases/compiler/overEagerReturnTypeSpecialization.ts:3:11 .func(str => str.length); // should error var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 diff --git a/tests/baselines/reference/overload1.errors.txt b/tests/baselines/reference/overload1.errors.txt index aa58f23b95a35..1418ecde4ae19 100644 --- a/tests/baselines/reference/overload1.errors.txt +++ b/tests/baselines/reference/overload1.errors.txt @@ -35,7 +35,8 @@ tests/cases/compiler/overload1.ts(34,9): error TS2345: Argument of type '2' is n var e:string=x.g(new O.A()); // matches overload but bad assignment ~ -!!! error TS2322: Type 'C' is not assignable to type 'string'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/overload1.ts:9:18 var y:string=x.f(3); // good y=x.f("nope"); // can't assign number to string ~ @@ -50,7 +51,8 @@ tests/cases/compiler/overload1.ts(34,9): error TS2345: Argument of type '2' is n !!! related TS6210 tests/cases/compiler/overload1.ts:17:11: An argument for 'n' was not provided. z=x.g(new O.B()); // ambiguous (up and down conversion) ~ -!!! error TS2322: Type 'C' is not assignable to type 'string'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/overload1.ts:9:18 z=x.h(2,2); // no match ~ !!! error TS2345: Argument of type '2' is not assignable to parameter of type 'string'. diff --git a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index 8d104fc1ab01e..1cdd084c05b08 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -12,11 +12,13 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interfa } interface Deriver extends Base { ~~~~~~~ -!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|Deriver|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'addEventListener' are incompatible. !!! error TS2430: Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Type '"foo"' is not assignable to type '"bar"'. +!!! annotated symbol 0 tests/cases/compiler/overloadOnConstInheritance2.ts:5:11 +!!! annotated symbol 1 tests/cases/compiler/overloadOnConstInheritance2.ts:1:11 addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload } \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants1.errors.txt b/tests/baselines/reference/overloadingOnConstants1.errors.txt index c696e3c876984..522a1df90c8a0 100644 --- a/tests/baselines/reference/overloadingOnConstants1.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants1.errors.txt @@ -28,17 +28,25 @@ tests/cases/compiler/overloadingOnConstants1.ts(25,5): error TS2741: Property 'b // these are errors var htmlElement2: Derived1 = d2.createElement("yo") ~~~~~~~~~~~~ -!!! error TS2741: Property 'bar' is missing in type 'Base' but required in type 'Derived1'. +!!! error TS2741: Property 'bar' is missing in type '{|Base|0|}' but required in type '{|Derived1|1|}'. !!! related TS2728 tests/cases/compiler/overloadingOnConstants1.ts:2:31: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/overloadingOnConstants1.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/overloadingOnConstants1.ts:2:7 var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); ~~~~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'biz' is missing in type 'Derived1' but required in type 'Derived3'. +!!! error TS2741: Property 'biz' is missing in type '{|Derived1|0|}' but required in type '{|Derived3|1|}'. !!! related TS2728 tests/cases/compiler/overloadingOnConstants1.ts:4:31: 'biz' is declared here. +!!! annotated symbol 0 tests/cases/compiler/overloadingOnConstants1.ts:2:7 +!!! annotated symbol 1 tests/cases/compiler/overloadingOnConstants1.ts:4:7 var htmlDivElement2: Derived1 = d2.createElement("div"); ~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'bar' is missing in type 'Derived2' but required in type 'Derived1'. +!!! error TS2741: Property 'bar' is missing in type '{|Derived2|0|}' but required in type '{|Derived1|1|}'. !!! related TS2728 tests/cases/compiler/overloadingOnConstants1.ts:2:31: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/overloadingOnConstants1.ts:3:7 +!!! annotated symbol 1 tests/cases/compiler/overloadingOnConstants1.ts:2:7 var htmlSpanElement2: Derived1 = d2.createElement("span"); ~~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'bar' is missing in type 'Derived3' but required in type 'Derived1'. -!!! related TS2728 tests/cases/compiler/overloadingOnConstants1.ts:2:31: 'bar' is declared here. \ No newline at end of file +!!! error TS2741: Property 'bar' is missing in type '{|Derived3|0|}' but required in type '{|Derived1|1|}'. +!!! related TS2728 tests/cases/compiler/overloadingOnConstants1.ts:2:31: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/overloadingOnConstants1.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/overloadingOnConstants1.ts:2:7 \ No newline at end of file diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 24476ecafd272..8580c0c47ac3c 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -27,25 +27,39 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): ~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. ~ -!!! error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. -!!! error TS2345: Property 'x' is missing in type 'D' but required in type 'A'. +!!! error TS2345: Argument of type '{|D|0|}' is not assignable to parameter of type '{|A|1|}'. +!!! error TS2345: Property 'x' is missing in type '{|D|2|}' but required in type '{|A|3|}'. !!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:1:15: 'x' is declared here. +!!! annotated symbol 0 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 +!!! annotated symbol 3 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:1:11 var result2: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. ~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. ~~~~~~~~ -!!! error TS2344: Type 'D' does not satisfy the constraint 'A'. +!!! error TS2344: Type '{|D|0|}' does not satisfy the constraint '{|A|1|}'. +!!! annotated symbol 0 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:1:11 var result3: string = foo(x => { // x has type D ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2345: Argument of type '(x: {|D|0|}) => {|G|1|}<{|D|2|}>' is not assignable to parameter of type '(x: {|B|3|}) => any'. !!! error TS2345: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2345: Property 'q' is missing in type 'B' but required in type 'D'. +!!! error TS2345: Property 'q' is missing in type '{|B|4|}' but required in type '{|D|5|}'. !!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. +!!! annotated symbol 0 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:6:7 +!!! annotated symbol 2 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 +!!! annotated symbol 3 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:2:11 +!!! annotated symbol 5 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 var y: G; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error ~~~~~~~~ -!!! error TS2344: Type 'D' does not satisfy the constraint 'A'. +!!! error TS2344: Type '{|D|0|}' does not satisfy the constraint '{|A|1|}'. +!!! annotated symbol 0 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:1:11 return y; }); \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 3db9a29053f54..521fdf226bf45 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -19,8 +19,11 @@ tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cann !!! error TS2304: Cannot find name 'blah'. func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway ~~~~~~~~~~~~~ -!!! error TS2741: Property 'b' is missing in type '{ a: any; }' but required in type '{ a: number; b: number; }'. +!!! error TS2741: Property 'b' is missing in type '{ {|a|0|}: any; }' but required in type '{ {|a|1|}: number; {|b|2|}: number; }'. !!! related TS2728 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:42: 'b' is declared here. !!! related TS6502 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:14: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/overloadsWithProvisionalErrors.ts:8:14 +!!! annotated symbol 1 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:31 +!!! annotated symbol 2 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:42 ~~~~ !!! error TS2304: Cannot find name 'blah'. \ No newline at end of file diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt index c63856a9ee1f6..433a900b22887 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt +++ b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt @@ -9,7 +9,9 @@ tests/cases/compiler/overridingPrivateStaticMembers.ts(5,7): error TS2417: Class class Derived2 extends Base2 { ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'. +!!! error TS2417: Class static side 'typeof {|Derived2|0|}' incorrectly extends base class static side 'typeof {|Base2|1|}'. !!! error TS2417: Types have separate declarations of a private property 'y'. +!!! annotated symbol 0 tests/cases/compiler/overridingPrivateStaticMembers.ts:5:7 +!!! annotated symbol 1 tests/cases/compiler/overridingPrivateStaticMembers.ts:1:7 private static y: { foo: string; bar: string; }; } \ No newline at end of file diff --git a/tests/baselines/reference/parameterListAsTupleType.errors.txt b/tests/baselines/reference/parameterListAsTupleType.errors.txt index 6bf3d74466e66..be7d821dce024 100644 --- a/tests/baselines/reference/parameterListAsTupleType.errors.txt +++ b/tests/baselines/reference/parameterListAsTupleType.errors.txt @@ -23,8 +23,9 @@ tests/cases/compiler/parameterListAsTupleType.ts(16,23): error TS2344: Type 'typ type Cps = Parameters; // should not work ~~~~~~~~ -!!! error TS2344: Type 'typeof C' does not satisfy the constraint '(...args: any) => any'. +!!! error TS2344: Type 'typeof {|C|0|}' does not satisfy the constraint '(...args: any) => any'. !!! error TS2344: Type 'typeof C' provides no match for the signature '(...args: any): any'. +!!! annotated symbol 0 tests/cases/compiler/parameterListAsTupleType.ts:11:7 type Ccps = ConstructorParameters; // should be [number, string] class D { diff --git a/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.errors.txt b/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.errors.txt index 4304bb486ef0e..be026c401f39c 100644 --- a/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.errors.txt +++ b/tests/baselines/reference/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.errors.txt @@ -39,15 +39,21 @@ tests/cases/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.t appendToOptionalArray(foo, 'y', 'bar'); // ok appendToOptionalArray(foo, 'y', 12); // should fail ~~~ -!!! error TS2345: Argument of type '{ x?: number[] | undefined; y?: string[] | undefined; }' is not assignable to parameter of type '{ y?: number[] | undefined; }'. +!!! error TS2345: Argument of type '{ {|x|0|}?: number[] | undefined; {|y|1|}?: string[] | undefined; }' is not assignable to parameter of type '{ {|y|2|}?: number[] | undefined; }'. !!! error TS2345: Types of property 'y' are incompatible. !!! error TS2345: Type 'string[] | undefined' is not assignable to type 'number[] | undefined'. !!! error TS2345: Type 'string[]' is not assignable to type 'number[]'. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.ts:24:13 +!!! annotated symbol 1 tests/cases/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.ts:24:27 +!!! annotated dropped!: 2 appendToOptionalArray(foo, 'x', "no"); // should fail ~~~ -!!! error TS2345: Argument of type '{ x?: number[] | undefined; y?: string[] | undefined; }' is not assignable to parameter of type '{ x?: string[] | undefined; }'. +!!! error TS2345: Argument of type '{ {|x|0|}?: number[] | undefined; {|y|1|}?: string[] | undefined; }' is not assignable to parameter of type '{ {|x|2|}?: string[] | undefined; }'. !!! error TS2345: Types of property 'x' are incompatible. !!! error TS2345: Type 'number[] | undefined' is not assignable to type 'string[] | undefined'. !!! error TS2345: Type 'number[]' is not assignable to type 'string[]'. -!!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.ts:24:13 +!!! annotated symbol 1 tests/cases/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.ts:24:27 +!!! annotated dropped!: 2 \ No newline at end of file diff --git a/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt index 16eb82ecb34db..8ee291393421e 100644 --- a/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt +++ b/tests/baselines/reference/parseClassDeclarationInStrictModeByDefaultInES6.errors.txt @@ -18,6 +18,7 @@ tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeBy ~~~~~~~~~ !!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode. ~~~~~~~~~ -!!! error TS2322: Type '"hello"' is not assignable to type 'IArguments'. +!!! error TS2322: Type '"hello"' is not assignable to type '{|IArguments|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:388:11 } } \ No newline at end of file diff --git a/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt b/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt index 6797a574021f9..f9c6f223821fa 100644 --- a/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt +++ b/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt @@ -16,9 +16,11 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAut o = i; i = o; ~ -!!! error TS2322: Type 'Object' is not assignable to type 'I'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature '(): void'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts:1:11 var a: { (): void @@ -26,7 +28,8 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAut o = a; a = o; ~ -!!! error TS2322: Type 'Object' is not assignable to type '() => void'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '() => void'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? !!! error TS2322: Type 'Object' provides no match for the signature '(): void'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 \ No newline at end of file diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt index a6a4524592993..c88f8dfd673d3 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt @@ -17,11 +17,14 @@ tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partial // more args testError((t1: D, t2, t3) => {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(t1: D, t2: any, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +!!! error TS2345: Argument of type '(t1: {|D|0|}, t2: any, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts:5:7 testError((t1, t2: D, t3) => {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(t1: any, t2: D, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +!!! error TS2345: Argument of type '(t1: any, t2: {|D|0|}, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts:5:7 testError((t1, t2, t3: D) => {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(t1: any, t2: any, t3: D) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +!!! error TS2345: Argument of type '(t1: any, t2: any, t3: {|D|0|}) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +!!! annotated symbol 0 tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts:5:7 \ No newline at end of file diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt b/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt index 9028ebe0377eb..4fa39c4bce4d6 100644 --- a/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt +++ b/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt @@ -89,8 +89,10 @@ tests/cases/compiler/potentiallyUncalledDecorators.ts(68,5): error TS1241: Unabl @allRest ~~~~~~~~ !!! error TS1238: Unable to resolve signature of class decorator when called as an expression. -!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof B'. +!!! error TS1238: Type '{|OmniDecorator|0|}' is not assignable to type 'typeof {|B|1|}'. !!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): B'. +!!! annotated symbol 0 tests/cases/compiler/potentiallyUncalledDecorators.ts:24:11 +!!! annotated symbol 1 tests/cases/compiler/potentiallyUncalledDecorators.ts:42:7 class B { @allRest foo: any; ~~~~~~~~ @@ -105,8 +107,10 @@ tests/cases/compiler/potentiallyUncalledDecorators.ts(68,5): error TS1241: Unabl @oneOptional ~~~~~~~~~~~~ !!! error TS1238: Unable to resolve signature of class decorator when called as an expression. -!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof C'. +!!! error TS1238: Type '{|OmniDecorator|0|}' is not assignable to type 'typeof {|C|1|}'. !!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): C'. +!!! annotated symbol 0 tests/cases/compiler/potentiallyUncalledDecorators.ts:24:11 +!!! annotated symbol 1 tests/cases/compiler/potentiallyUncalledDecorators.ts:48:7 class C { @oneOptional foo: any; ~~~~~~~~~~~~ @@ -119,8 +123,10 @@ tests/cases/compiler/potentiallyUncalledDecorators.ts(68,5): error TS1241: Unabl @twoOptional ~~~~~~~~~~~~ !!! error TS1238: Unable to resolve signature of class decorator when called as an expression. -!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof D'. +!!! error TS1238: Type '{|OmniDecorator|0|}' is not assignable to type 'typeof {|D|1|}'. !!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): D'. +!!! annotated symbol 0 tests/cases/compiler/potentiallyUncalledDecorators.ts:24:11 +!!! annotated symbol 1 tests/cases/compiler/potentiallyUncalledDecorators.ts:54:7 class D { @twoOptional foo: any; ~~~~~~~~~~~~ @@ -135,8 +141,10 @@ tests/cases/compiler/potentiallyUncalledDecorators.ts(68,5): error TS1241: Unabl @threeOptional ~~~~~~~~~~~~~~ !!! error TS1238: Unable to resolve signature of class decorator when called as an expression. -!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof E'. +!!! error TS1238: Type '{|OmniDecorator|0|}' is not assignable to type 'typeof {|E|1|}'. !!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): E'. +!!! annotated symbol 0 tests/cases/compiler/potentiallyUncalledDecorators.ts:24:11 +!!! annotated symbol 1 tests/cases/compiler/potentiallyUncalledDecorators.ts:60:7 class E { @threeOptional foo: any; ~~~~~~~~~~~~~~ @@ -151,8 +159,10 @@ tests/cases/compiler/potentiallyUncalledDecorators.ts(68,5): error TS1241: Unabl @oneOptionalWithRest ~~~~~~~~~~~~~~~~~~~~ !!! error TS1238: Unable to resolve signature of class decorator when called as an expression. -!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof F'. +!!! error TS1238: Type '{|OmniDecorator|0|}' is not assignable to type 'typeof {|F|1|}'. !!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): F'. +!!! annotated symbol 0 tests/cases/compiler/potentiallyUncalledDecorators.ts:24:11 +!!! annotated symbol 1 tests/cases/compiler/potentiallyUncalledDecorators.ts:66:7 class F { @oneOptionalWithRest foo: any; ~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/primitiveMembers.errors.txt b/tests/baselines/reference/primitiveMembers.errors.txt index 49ef8c4e3cf0e..74f83df5d4ebe 100644 --- a/tests/baselines/reference/primitiveMembers.errors.txt +++ b/tests/baselines/reference/primitiveMembers.errors.txt @@ -18,8 +18,10 @@ tests/cases/compiler/primitiveMembers.ts(11,1): error TS2322: Type 'Number' is n n = N; // should not work, as 'number' has a different brand ~ -!!! error TS2322: Type 'Number' is not assignable to type 'number'. -!!! error TS2322: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. +!!! error TS2322: Type '{|Number|0|}' is not assignable to type 'number'. +!!! error TS2322: 'number' is a primitive, but '{|Number|1|}' is a wrapper object. Prefer using 'number' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:542:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:542:11 N = n; // should work var o: Object = {} diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.errors.txt b/tests/baselines/reference/privateInstanceMemberAccessibility.errors.txt index ae7dac2f18c8c..8388a64be6232 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.errors.txt +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.errors.txt @@ -13,8 +13,10 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces class Derived extends Base { ~~~~~~~ -!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'. +!!! error TS2415: Class '{|Derived|0|}' incorrectly extends base class '{|Base|1|}'. !!! error TS2415: Property 'foo' is private in type 'Base' but not in type 'Derived'. +!!! annotated symbol 0 tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts:1:7 x = super.foo; // error ~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. diff --git a/tests/baselines/reference/privateInterfaceProperties.errors.txt b/tests/baselines/reference/privateInterfaceProperties.errors.txt index 2c363ad40cce9..03b23d1dfeb0a 100644 --- a/tests/baselines/reference/privateInterfaceProperties.errors.txt +++ b/tests/baselines/reference/privateInterfaceProperties.errors.txt @@ -8,8 +8,10 @@ tests/cases/compiler/privateInterfaceProperties.ts(4,7): error TS2420: Class 'c1 // should be an error class c1 implements i1 { private name:string; } ~~ -!!! error TS2420: Class 'c1' incorrectly implements interface 'i1'. +!!! error TS2420: Class '{|c1|0|}' incorrectly implements interface '{|i1|1|}'. !!! error TS2420: Property 'name' is private in type 'c1' but not in type 'i1'. +!!! annotated symbol 0 tests/cases/compiler/privateInterfaceProperties.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/privateInterfaceProperties.ts:1:11 // should be ok class c2 implements i1 { public name:string; } diff --git a/tests/baselines/reference/promiseChaining1.errors.txt b/tests/baselines/reference/promiseChaining1.errors.txt index 95f421b36f02b..160f36af4b243 100644 --- a/tests/baselines/reference/promiseChaining1.errors.txt +++ b/tests/baselines/reference/promiseChaining1.errors.txt @@ -10,8 +10,9 @@ tests/cases/compiler/promiseChaining1.ts(7,55): error TS2322: Type 'string' is n // should get a fresh type parameter which each then call var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function ~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'Function'. +!!! error TS2322: Type 'string' is not assignable to type '{|Function|0|}'. !!! related TS6502 tests/cases/compiler/promiseChaining1.ts:4:34: The expected type comes from the return type of this signature. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining2.errors.txt b/tests/baselines/reference/promiseChaining2.errors.txt index f7326ec8cbd9d..bcfa9cacfb57c 100644 --- a/tests/baselines/reference/promiseChaining2.errors.txt +++ b/tests/baselines/reference/promiseChaining2.errors.txt @@ -10,8 +10,9 @@ tests/cases/compiler/promiseChaining2.ts(7,50): error TS2322: Type 'string' is n // should get a fresh type parameter which each then call var z = this.then(x => result).then(x => "abc").then(x => x.length); ~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'Function'. +!!! error TS2322: Type 'string' is not assignable to type '{|Function|0|}'. !!! related TS6502 tests/cases/compiler/promiseChaining2.ts:4:34: The expected type comes from the return type of this signature. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index c719d8a9b951e..2319576c0c013 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -140,92 +140,161 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var s3c = s3.then(testFunction3P, testFunction3, testFunction3); var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. +!!! error TS2345: Argument of type '(x: number) => {|IPromise|0|}' is not assignable to parameter of type '(value: {|IPromise|1|}) => {|IPromise|2|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. -!!! error TS2345: Type 'IPromise' is not assignable to type 'number'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 var r4: IPromise; var sIPromise: (x: any) => IPromise; var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|Promise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|Promise|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:27:48 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:27:48 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:27:48 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:27:48 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:27:48 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:27:48 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|Promise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:28:49 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:28:49 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:28:49 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:28:49 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:28:49 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:28:49 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations.ts:29:37 var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:29:37 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|Promise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations.ts:30:38 var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:30:38 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations.ts:30:38 var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -233,48 +302,116 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|IPromise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:9:11 var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|IPromise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:31:32 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:9:11 var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|Promise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|Promise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1399:11 var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|Promise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:32:33 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:9:11 var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|IPromise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:33:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:33:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:33:46 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:33:46 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:33:46 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:33:32 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations.ts:9:11 var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! error TS2345: Type '{|IPromise|2|}' is not assignable to type '{|IPromise|3|}'. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|IPromise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:33:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:33:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:33:46 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:33:46 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:33:46 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:33:32 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations.ts:9:11 var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|Promise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|Promise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:34:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:34:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:34:47 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:34:47 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:34:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:34:33 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1399:11 var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|Promise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:34:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:34:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:34:47 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:34:47 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:34:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations.ts:34:33 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations.ts:9:11 var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! error TS2345: Type '{|IPromise|2|}' is not assignable to type '{|IPromise|3|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -283,7 +420,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -293,36 +432,119 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. -!!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|Promise|1|}'. +!!! error TS2345: Property 'catch' is missing in type '{|IPromise|2|}' but required in type '{|Promise|3|}'. !!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|IPromise|0|}; (x: string): {|IPromise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type '{|IPromise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|IPromise|0|}; (x: string): {|IPromise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type '{|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (x: number): {|Promise|0|}; (x: string): {|Promise|1|}; }' is not assignable to parameter of type '(value: number) => {|Promise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|Promise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|Promise|0|}; (x: string): {|Promise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|IPromise|4|}'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. +!!! error TS2345: Type '{ <{|TResult1|5|} = number, {|TResult2|6|} = never>(onfulfilled?: (value: number) => {|TResult1|7|} | {|PromiseLike|8|}<{|TResult1|9|}>, onrejected?: (reason: any) => {|TResult2|10|} | {|PromiseLike|11|}<{|TResult2|12|}>): {|Promise|13|}<{|TResult1|14|} | {|TResult2|15|}>; <{|U|16|}>(success?: (value: number) => {|Promise|17|}<{|U|18|}>, error?: (error: any) => {|Promise|19|}<{|U|20|}>, progress?: (progress: any) => void): {|Promise|21|}<{|U|22|}>; <{|U|23|}>(success?: (value: number) => {|Promise|24|}<{|U|25|}>, error?: (error: any) => {|U|26|}, progress?: (progress: any) => void): {|Promise|27|}<{|U|28|}>; <{|U|29|}>(success?: (value: number) => {|U|30|}, error?: (error: any) => {|Promise|31|}<{|U|32|}>, progress?: (progress: any) => void): {|Promise|33|}<{|U|34|}>; <{|U|35|}>(success?: (value: number) => {|U|36|}, error?: (error: any) => {|U|37|}, progress?: (progress: any) => void): {|Promise|38|}<{|U|39|}>; }' is not assignable to type '{ <{|U|40|}>(success?: (value: string) => {|IPromise|41|}<{|U|42|}>, error?: (error: any) => {|IPromise|43|}<{|U|44|}>, progress?: (progress: any) => void): {|IPromise|45|}<{|U|46|}>; <{|U|47|}>(success?: (value: string) => {|IPromise|48|}<{|U|49|}>, error?: (error: any) => {|U|50|}, progress?: (progress: any) => void): {|IPromise|51|}<{|U|52|}>; <{|U|53|}>(success?: (value: string) => {|U|54|}, error?: (error: any) => {|IPromise|55|}<{|U|56|}>, progress?: (progress: any) => void): {|IPromise|57|}<{|U|58|}>; <{|U|59|}>(success?: (value: string) => {|U|60|}, error?: (error: any) => {|U|61|}, progress?: (progress: any) => void): {|IPromise|62|}<{|U|63|}>; }'. !!! error TS2345: Types of parameters 'onfulfilled' and 'success' are incompatible. !!! error TS2345: Types of parameters 'value' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 13 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 16 tests/cases/compiler/promisePermutations.ts:2:10 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 18 tests/cases/compiler/promisePermutations.ts:2:10 +!!! annotated symbol 19 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 20 tests/cases/compiler/promisePermutations.ts:2:10 +!!! annotated symbol 21 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 22 tests/cases/compiler/promisePermutations.ts:2:10 +!!! annotated symbol 23 tests/cases/compiler/promisePermutations.ts:3:10 +!!! annotated symbol 24 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 25 tests/cases/compiler/promisePermutations.ts:3:10 +!!! annotated symbol 26 tests/cases/compiler/promisePermutations.ts:3:10 +!!! annotated symbol 27 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 28 tests/cases/compiler/promisePermutations.ts:3:10 +!!! annotated symbol 29 tests/cases/compiler/promisePermutations.ts:4:10 +!!! annotated symbol 30 tests/cases/compiler/promisePermutations.ts:4:10 +!!! annotated symbol 31 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 32 tests/cases/compiler/promisePermutations.ts:4:10 +!!! annotated symbol 33 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 34 tests/cases/compiler/promisePermutations.ts:4:10 +!!! annotated symbol 35 tests/cases/compiler/promisePermutations.ts:5:10 +!!! annotated symbol 36 tests/cases/compiler/promisePermutations.ts:5:10 +!!! annotated symbol 37 tests/cases/compiler/promisePermutations.ts:5:10 +!!! annotated symbol 38 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 39 tests/cases/compiler/promisePermutations.ts:5:10 +!!! annotated symbol 40 tests/cases/compiler/promisePermutations.ts:10:10 +!!! annotated symbol 41 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 42 tests/cases/compiler/promisePermutations.ts:10:10 +!!! annotated symbol 43 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 44 tests/cases/compiler/promisePermutations.ts:10:10 +!!! annotated symbol 45 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 46 tests/cases/compiler/promisePermutations.ts:10:10 +!!! annotated symbol 47 tests/cases/compiler/promisePermutations.ts:11:10 +!!! annotated symbol 48 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 49 tests/cases/compiler/promisePermutations.ts:11:10 +!!! annotated symbol 50 tests/cases/compiler/promisePermutations.ts:11:10 +!!! annotated symbol 51 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 52 tests/cases/compiler/promisePermutations.ts:11:10 +!!! annotated symbol 53 tests/cases/compiler/promisePermutations.ts:12:10 +!!! annotated symbol 54 tests/cases/compiler/promisePermutations.ts:12:10 +!!! annotated symbol 55 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 56 tests/cases/compiler/promisePermutations.ts:12:10 +!!! annotated symbol 57 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 58 tests/cases/compiler/promisePermutations.ts:12:10 +!!! annotated symbol 59 tests/cases/compiler/promisePermutations.ts:13:10 +!!! annotated symbol 60 tests/cases/compiler/promisePermutations.ts:13:10 +!!! annotated symbol 61 tests/cases/compiler/promisePermutations.ts:13:10 +!!! annotated symbol 62 tests/cases/compiler/promisePermutations.ts:9:11 +!!! annotated symbol 63 tests/cases/compiler/promisePermutations.ts:13:10 var r12 = testFunction12(x => x); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index b88ef28ca5c51..55ec9b5ac4410 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -139,92 +139,161 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var s3c = s3.then(testFunction3P, testFunction3, testFunction3); var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // Should error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. +!!! error TS2345: Argument of type '(x: number) => {|IPromise|0|}' is not assignable to parameter of type '(value: {|IPromise|1|}) => {|IPromise|2|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. -!!! error TS2345: Type 'IPromise' is not assignable to type 'number'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 var r4: IPromise; var sIPromise: (x: any) => IPromise; var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|Promise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|Promise|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:26:48 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:26:48 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:26:48 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:26:48 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:26:48 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:26:48 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|Promise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:27:49 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:27:49 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:27:49 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:27:49 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:27:49 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:27:49 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations2.ts:28:37 var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:28:37 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|Promise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations2.ts:29:38 var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:29:38 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations2.ts:29:38 var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -232,48 +301,116 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|IPromise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:8:11 var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|IPromise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:30:32 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:8:11 var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|Promise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|Promise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1399:11 var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|Promise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:31:33 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:8:11 var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|IPromise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:32:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:32:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:32:46 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:32:46 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:32:46 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:32:32 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations2.ts:8:11 var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! error TS2345: Type '{|IPromise|2|}' is not assignable to type '{|IPromise|3|}'. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|IPromise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:32:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:32:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:32:46 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:32:46 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:32:46 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:32:32 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations2.ts:8:11 var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|Promise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|Promise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:33:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:33:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:33:47 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:33:47 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:33:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:33:33 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1399:11 var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|Promise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:33:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:33:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:33:47 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:33:47 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:33:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations2.ts:33:33 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations2.ts:8:11 var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! error TS2345: Type '{|IPromise|2|}' is not assignable to type '{|IPromise|3|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -282,7 +419,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -292,36 +431,100 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. -!!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|Promise|1|}'. +!!! error TS2345: Property 'catch' is missing in type '{|IPromise|2|}' but required in type '{|Promise|3|}'. !!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|IPromise|0|}; (x: string): {|IPromise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type '{|IPromise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|IPromise|0|}; (x: string): {|IPromise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type '{|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (x: number): {|Promise|0|}; (x: string): {|Promise|1|}; }' is not assignable to parameter of type '(value: number) => {|Promise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|Promise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|Promise|0|}; (x: string): {|Promise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|IPromise|4|}'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. +!!! error TS2345: Type '{ <{|TResult1|5|} = number, {|TResult2|6|} = never>(onfulfilled?: (value: number) => {|TResult1|7|} | {|PromiseLike|8|}<{|TResult1|9|}>, onrejected?: (reason: any) => {|TResult2|10|} | {|PromiseLike|11|}<{|TResult2|12|}>): {|Promise|13|}<{|TResult1|14|} | {|TResult2|15|}>; <{|U|16|}>(success?: (value: number) => {|U|17|}, error?: (error: any) => {|U|18|}, progress?: (progress: any) => void): {|Promise|19|}<{|U|20|}>; }' is not assignable to type '{ <{|U|21|}>(success?: (value: string) => {|IPromise|22|}<{|U|23|}>, error?: (error: any) => {|IPromise|24|}<{|U|25|}>, progress?: (progress: any) => void): {|IPromise|26|}<{|U|27|}>; <{|U|28|}>(success?: (value: string) => {|IPromise|29|}<{|U|30|}>, error?: (error: any) => {|U|31|}, progress?: (progress: any) => void): {|IPromise|32|}<{|U|33|}>; <{|U|34|}>(success?: (value: string) => {|U|35|}, error?: (error: any) => {|IPromise|36|}<{|U|37|}>, progress?: (progress: any) => void): {|IPromise|38|}<{|U|39|}>; <{|U|40|}>(success?: (value: string) => {|U|41|}, error?: (error: any) => {|U|42|}, progress?: (progress: any) => void): {|IPromise|43|}<{|U|44|}>; }'. !!! error TS2345: Types of parameters 'onfulfilled' and 'success' are incompatible. !!! error TS2345: Types of parameters 'value' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 13 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 16 tests/cases/compiler/promisePermutations2.ts:4:10 +!!! annotated symbol 17 tests/cases/compiler/promisePermutations2.ts:4:10 +!!! annotated symbol 18 tests/cases/compiler/promisePermutations2.ts:4:10 +!!! annotated symbol 19 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 20 tests/cases/compiler/promisePermutations2.ts:4:10 +!!! annotated symbol 21 tests/cases/compiler/promisePermutations2.ts:9:10 +!!! annotated symbol 22 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 23 tests/cases/compiler/promisePermutations2.ts:9:10 +!!! annotated symbol 24 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 25 tests/cases/compiler/promisePermutations2.ts:9:10 +!!! annotated symbol 26 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 27 tests/cases/compiler/promisePermutations2.ts:9:10 +!!! annotated symbol 28 tests/cases/compiler/promisePermutations2.ts:10:10 +!!! annotated symbol 29 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 30 tests/cases/compiler/promisePermutations2.ts:10:10 +!!! annotated symbol 31 tests/cases/compiler/promisePermutations2.ts:10:10 +!!! annotated symbol 32 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 33 tests/cases/compiler/promisePermutations2.ts:10:10 +!!! annotated symbol 34 tests/cases/compiler/promisePermutations2.ts:11:10 +!!! annotated symbol 35 tests/cases/compiler/promisePermutations2.ts:11:10 +!!! annotated symbol 36 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 37 tests/cases/compiler/promisePermutations2.ts:11:10 +!!! annotated symbol 38 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 39 tests/cases/compiler/promisePermutations2.ts:11:10 +!!! annotated symbol 40 tests/cases/compiler/promisePermutations2.ts:12:10 +!!! annotated symbol 41 tests/cases/compiler/promisePermutations2.ts:12:10 +!!! annotated symbol 42 tests/cases/compiler/promisePermutations2.ts:12:10 +!!! annotated symbol 43 tests/cases/compiler/promisePermutations2.ts:8:11 +!!! annotated symbol 44 tests/cases/compiler/promisePermutations2.ts:12:10 var r12 = testFunction12(x => x); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 83a161af960d4..e3a8355dd221e 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -139,101 +139,174 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var r3a = r3.then(testFunction3, testFunction3, testFunction3); var r3b = r3.then(testFunction3, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. +!!! error TS2345: Argument of type '(x: number) => {|IPromise|0|}' is not assignable to parameter of type '(value: {|IPromise|1|}) => {|IPromise|2|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. -!!! error TS2345: Type 'IPromise' is not assignable to type 'number'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 var s3: Promise; var s3a = s3.then(testFunction3, testFunction3, testFunction3); var s3b = s3.then(testFunction3P, testFunction3P, testFunction3P); var s3c = s3.then(testFunction3P, testFunction3, testFunction3); var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. +!!! error TS2345: Argument of type '(x: number) => {|IPromise|0|}' is not assignable to parameter of type '(value: {|IPromise|1|}) => {|IPromise|2|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. -!!! error TS2345: Type 'IPromise' is not assignable to type 'number'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 var r4: IPromise; var sIPromise: (x: any) => IPromise; var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|Promise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, y?: string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. !!! error TS2345: Types of parameters 'x' and 'value' are incompatible. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|IPromise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|Promise|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => {|Promise|0|}' is not assignable to parameter of type '(value: string) => {|IPromise|1|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:26:48 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:26:48 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:26:48 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:26:48 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:26:48 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:26:48 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|Promise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:27:49 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:27:49 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:27:49 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(x: number, cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:27:49 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:27:49 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:27:49 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations3.ts:28:37 var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|IPromise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:28:37 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|Promise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations3.ts:29:38 var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! error TS2345: Argument of type '(cb: <{|T|0|}>(a: {|T|1|}) => {|T|2|}) => {|Promise|3|}' is not assignable to parameter of type '(value: string) => {|IPromise|4|}'. !!! error TS2345: Types of parameters 'cb' and 'value' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type '(a: T) => T'. +!!! error TS2345: Type 'string' is not assignable to type '<{|T|5|}>(a: {|T|6|}) => {|T|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:29:38 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations3.ts:29:38 var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -241,48 +314,116 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|IPromise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:11:11 var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|IPromise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:30:32 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:11:11 var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|Promise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|Promise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1399:11 var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: (a: {|T|2|}) => {|T|3|}) => {|Promise|4|}<{|T|5|}>' is not assignable to parameter of type '(value: number) => {|IPromise|6|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:31:33 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:11:11 var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|IPromise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:32:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:32:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:32:46 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:32:46 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:32:46 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:32:32 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations3.ts:11:11 var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! error TS2345: Type '{|IPromise|2|}' is not assignable to type '{|IPromise|3|}'. !!! error TS2345: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|IPromise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:32:32 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:32:32 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:32:46 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:32:46 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:32:46 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:32:32 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations3.ts:11:11 var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|Promise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|Promise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:33:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:33:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:33:47 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:33:47 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:33:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:33:33 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1399:11 var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! error TS2345: Argument of type '<{|T|0|}>(x: {|T|1|}, cb: <{|U|2|}>(a: {|U|3|}) => {|U|4|}) => {|Promise|5|}<{|T|6|}>' is not assignable to parameter of type '(value: number) => {|IPromise|7|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:33:33 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:33:33 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:33:47 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:33:47 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:33:47 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:33:33 +!!! annotated symbol 7 tests/cases/compiler/promisePermutations3.ts:11:11 var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! error TS2345: Type '{|IPromise|2|}' is not assignable to type '{|IPromise|3|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -291,7 +432,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|IPromise|1|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -301,36 +444,100 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. -!!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. +!!! error TS2345: Argument of type '(x: any) => {|IPromise|0|}' is not assignable to parameter of type '(error: any) => {|Promise|1|}'. +!!! error TS2345: Property 'catch' is missing in type '{|IPromise|2|}' but required in type '{|Promise|3|}'. !!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; var r11a = r11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|IPromise|0|}; (x: string): {|IPromise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type '{|IPromise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'IPromise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|IPromise|0|}; (x: string): {|IPromise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|IPromise|3|}' is not assignable to type '{|IPromise|4|}'. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2345: Argument of type '{ (x: number): {|Promise|0|}; (x: string): {|Promise|1|}; }' is not assignable to parameter of type '(value: number) => {|Promise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|Promise|4|}'. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:1399:11 var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. -!!! error TS2345: Type 'Promise' is not assignable to type 'IPromise'. +!!! error TS2345: Argument of type '{ (x: number): {|Promise|0|}; (x: string): {|Promise|1|}; }' is not assignable to parameter of type '(value: number) => {|IPromise|2|}'. +!!! error TS2345: Type '{|Promise|3|}' is not assignable to type '{|IPromise|4|}'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise'. +!!! error TS2345: Type '{ <{|TResult1|5|} = number, {|TResult2|6|} = never>(onfulfilled?: (value: number) => {|TResult1|7|} | {|PromiseLike|8|}<{|TResult1|9|}>, onrejected?: (reason: any) => {|TResult2|10|} | {|PromiseLike|11|}<{|TResult2|12|}>): {|Promise|13|}<{|TResult1|14|} | {|TResult2|15|}>; <{|U|16|}>(success?: (value: number) => {|Promise|17|}<{|U|18|}>, error?: (error: any) => {|Promise|19|}<{|U|20|}>, progress?: (progress: any) => void): {|Promise|21|}<{|U|22|}>; <{|U|23|}>(success?: (value: number) => {|Promise|24|}<{|U|25|}>, error?: (error: any) => {|U|26|}, progress?: (progress: any) => void): {|Promise|27|}<{|U|28|}>; <{|U|29|}>(success?: (value: number) => {|U|30|}, error?: (error: any) => {|Promise|31|}<{|U|32|}>, progress?: (progress: any) => void): {|Promise|33|}<{|U|34|}>; <{|U|35|}>(success?: (value: number) => {|U|36|}, error?: (error: any) => {|U|37|}, progress?: (progress: any) => void): {|Promise|38|}<{|U|39|}>; }' is not assignable to type '<{|U|40|}>(success?: (value: string) => {|U|41|}, error?: (error: any) => {|U|42|}, progress?: (progress: any) => void) => {|IPromise|43|}<{|U|44|}>'. !!! error TS2345: Types of parameters 'onfulfilled' and 'success' are incompatible. !!! error TS2345: Types of parameters 'value' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 13 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1406:10 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:1406:24 +!!! annotated symbol 16 tests/cases/compiler/promisePermutations3.ts:4:10 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 18 tests/cases/compiler/promisePermutations3.ts:4:10 +!!! annotated symbol 19 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 20 tests/cases/compiler/promisePermutations3.ts:4:10 +!!! annotated symbol 21 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 22 tests/cases/compiler/promisePermutations3.ts:4:10 +!!! annotated symbol 23 tests/cases/compiler/promisePermutations3.ts:5:10 +!!! annotated symbol 24 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 25 tests/cases/compiler/promisePermutations3.ts:5:10 +!!! annotated symbol 26 tests/cases/compiler/promisePermutations3.ts:5:10 +!!! annotated symbol 27 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 28 tests/cases/compiler/promisePermutations3.ts:5:10 +!!! annotated symbol 29 tests/cases/compiler/promisePermutations3.ts:6:10 +!!! annotated symbol 30 tests/cases/compiler/promisePermutations3.ts:6:10 +!!! annotated symbol 31 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 32 tests/cases/compiler/promisePermutations3.ts:6:10 +!!! annotated symbol 33 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 34 tests/cases/compiler/promisePermutations3.ts:6:10 +!!! annotated symbol 35 tests/cases/compiler/promisePermutations3.ts:7:10 +!!! annotated symbol 36 tests/cases/compiler/promisePermutations3.ts:7:10 +!!! annotated symbol 37 tests/cases/compiler/promisePermutations3.ts:7:10 +!!! annotated symbol 38 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 39 tests/cases/compiler/promisePermutations3.ts:7:10 +!!! annotated symbol 40 tests/cases/compiler/promisePermutations3.ts:12:10 +!!! annotated symbol 41 tests/cases/compiler/promisePermutations3.ts:12:10 +!!! annotated symbol 42 tests/cases/compiler/promisePermutations3.ts:12:10 +!!! annotated symbol 43 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 44 tests/cases/compiler/promisePermutations3.ts:12:10 var r12 = testFunction12(x => x); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok @@ -338,7 +545,19 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok ~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. -!!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. +!!! error TS2345: Argument of type '{ <{|T|0|}>(x: {|T|1|}): {|IPromise|2|}<{|T|3|}>; <{|T|4|}>(x: {|T|5|}, y: {|T|6|}): {|Promise|7|}<{|T|8|}>; }' is not assignable to parameter of type '(value: (x: any) => any) => {|Promise|9|}'. +!!! error TS2345: Property 'catch' is missing in type '{|IPromise|10|}' but required in type '{|Promise|11|}'. !!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! annotated symbol 0 tests/cases/compiler/promisePermutations3.ts:44:34 +!!! annotated symbol 1 tests/cases/compiler/promisePermutations3.ts:44:34 +!!! annotated symbol 2 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 3 tests/cases/compiler/promisePermutations3.ts:44:34 +!!! annotated symbol 4 tests/cases/compiler/promisePermutations3.ts:45:34 +!!! annotated symbol 5 tests/cases/compiler/promisePermutations3.ts:45:34 +!!! annotated symbol 6 tests/cases/compiler/promisePermutations3.ts:45:34 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 8 tests/cases/compiler/promisePermutations3.ts:45:34 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 10 tests/cases/compiler/promisePermutations3.ts:11:11 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1399:11 var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/promiseTypeInference.errors.txt b/tests/baselines/reference/promiseTypeInference.errors.txt index 1996f37e5402c..06d33a75d52ba 100644 --- a/tests/baselines/reference/promiseTypeInference.errors.txt +++ b/tests/baselines/reference/promiseTypeInference.errors.txt @@ -19,12 +19,42 @@ tests/cases/compiler/promiseTypeInference.ts(10,39): error TS2322: Type 'IPromis var $$x = load("something").then(s => convert(s)); ~~~~~~~~~~ -!!! error TS2322: Type 'IPromise' is not assignable to type 'number | PromiseLike'. -!!! error TS2322: Type 'IPromise' is not assignable to type 'PromiseLike'. +!!! error TS2322: Type '{|IPromise|0|}' is not assignable to type 'number | {|PromiseLike|1|}'. +!!! error TS2322: Type '{|IPromise|2|}' is not assignable to type '{|PromiseLike|3|}'. !!! error TS2322: Types of property 'then' are incompatible. -!!! error TS2322: Type '(success?: (value: number) => IPromise) => IPromise' is not assignable to type '(onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. +!!! error TS2322: Type '<{|U|4|}>(success?: (value: number) => {|IPromise|5|}<{|U|6|}>) => {|IPromise|7|}<{|U|8|}>' is not assignable to type '<{|TResult1|9|} = number, {|TResult2|10|} = never>(onfulfilled?: (value: number) => {|TResult1|11|} | {|PromiseLike|12|}<{|TResult1|13|}>, onrejected?: (reason: any) => {|TResult2|14|} | {|PromiseLike|15|}<{|TResult2|16|}>) => {|PromiseLike|17|}<{|TResult1|18|} | {|TResult2|19|}>'. !!! error TS2322: Types of parameters 'success' and 'onfulfilled' are incompatible. -!!! error TS2322: Type 'TResult1 | PromiseLike' is not assignable to type 'IPromise'. -!!! error TS2322: Type 'TResult1' is not assignable to type 'IPromise'. +!!! error TS2322: Type '{|TResult1|20|} | {|PromiseLike|21|}<{|TResult1|22|}>' is not assignable to type '{|IPromise|23|}<{|TResult1|24|} | {|TResult2|25|}>'. +!!! error TS2322: Type '{|TResult1|26|}' is not assignable to type '{|IPromise|27|}<{|TResult1|28|} | {|TResult2|29|}>'. !!! related TS6502 /.ts/lib.es5.d.ts:1406:57: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/promiseTypeInference.ts:4:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 2 tests/cases/compiler/promiseTypeInference.ts:4:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 4 tests/cases/compiler/promiseTypeInference.ts:5:10 +!!! annotated symbol 5 tests/cases/compiler/promiseTypeInference.ts:4:11 +!!! annotated symbol 6 tests/cases/compiler/promiseTypeInference.ts:5:10 +!!! annotated symbol 7 tests/cases/compiler/promiseTypeInference.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/promiseTypeInference.ts:5:10 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 13 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 15 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 16 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 18 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 19 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 20 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 21 /.ts/lib.es5.d.ts:1386:11 +!!! annotated symbol 22 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 23 tests/cases/compiler/promiseTypeInference.ts:4:11 +!!! annotated symbol 24 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 25 /.ts/lib.es5.d.ts:1393:24 +!!! annotated symbol 26 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 27 tests/cases/compiler/promiseTypeInference.ts:4:11 +!!! annotated symbol 28 /.ts/lib.es5.d.ts:1393:10 +!!! annotated symbol 29 /.ts/lib.es5.d.ts:1393:24 \ No newline at end of file diff --git a/tests/baselines/reference/promisesWithConstraints.errors.txt b/tests/baselines/reference/promisesWithConstraints.errors.txt index e85c6764b8b14..f10a99e2c1beb 100644 --- a/tests/baselines/reference/promisesWithConstraints.errors.txt +++ b/tests/baselines/reference/promisesWithConstraints.errors.txt @@ -21,15 +21,27 @@ tests/cases/compiler/promisesWithConstraints.ts(20,1): error TS2322: Type 'CProm a = b; // ok b = a; // ok ~ -!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2322: Property 'y' is missing in type 'Foo' but required in type 'Bar'. +!!! error TS2322: Type '{|Promise|0|}<{|Foo|1|}>' is not assignable to type '{|Promise|2|}<{|Bar|3|}>'. +!!! error TS2322: Property 'y' is missing in type '{|Foo|4|}' but required in type '{|Bar|5|}'. !!! related TS2728 tests/cases/compiler/promisesWithConstraints.ts:10:20: 'y' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 1 tests/cases/compiler/promisesWithConstraints.ts:9:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 3 tests/cases/compiler/promisesWithConstraints.ts:10:11 +!!! annotated symbol 4 tests/cases/compiler/promisesWithConstraints.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/promisesWithConstraints.ts:10:11 var a2: CPromise; var b2: CPromise; a2 = b2; // ok b2 = a2; // was error ~~ -!!! error TS2322: Type 'CPromise' is not assignable to type 'CPromise'. -!!! error TS2322: Type 'Foo' is not assignable to type 'Bar'. +!!! error TS2322: Type '{|CPromise|0|}<{|Foo|1|}>' is not assignable to type '{|CPromise|2|}<{|Bar|3|}>'. +!!! error TS2322: Type '{|Foo|4|}' is not assignable to type '{|Bar|5|}'. +!!! annotated symbol 0 tests/cases/compiler/promisesWithConstraints.ts:5:11 +!!! annotated symbol 1 tests/cases/compiler/promisesWithConstraints.ts:9:11 +!!! annotated symbol 2 tests/cases/compiler/promisesWithConstraints.ts:5:11 +!!! annotated symbol 3 tests/cases/compiler/promisesWithConstraints.ts:10:11 +!!! annotated symbol 4 tests/cases/compiler/promisesWithConstraints.ts:9:11 +!!! annotated symbol 5 tests/cases/compiler/promisesWithConstraints.ts:10:11 \ No newline at end of file diff --git a/tests/baselines/reference/propertyAccess.errors.txt b/tests/baselines/reference/propertyAccess.errors.txt index a183ad79c1129..5c820fa7564c4 100644 --- a/tests/baselines/reference/propertyAccess.errors.txt +++ b/tests/baselines/reference/propertyAccess.errors.txt @@ -20,8 +20,10 @@ tests/cases/conformance/expressions/propertyAccess/propertyAccess.ts(149,5): err var numIndex: { [n: number]: string } = { 3: 'three', 'three': 'three' }; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ 3: string; 'three': string; }' is not assignable to type '{ [n: number]: string; }'. +!!! error TS2322: Type '{ {|3|0|}: string; {|'three'|1|}: string; }' is not assignable to type '{ [n: number]: string; }'. !!! error TS2322: Object literal may only specify known properties, and ''three'' does not exist in type '{ [n: number]: string; }'. +!!! annotated symbol 0 tests/cases/conformance/expressions/propertyAccess/propertyAccess.ts:11:43 +!!! annotated symbol 1 tests/cases/conformance/expressions/propertyAccess/propertyAccess.ts:11:55 var strIndex: { [n: string]: Compass } = { 'N': Compass.North, 'E': Compass.East }; var bothIndex: { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.errors.txt b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.errors.txt index c1052dff55401..ef75818400abc 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.errors.txt +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.errors.txt @@ -51,7 +51,8 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOn var a = x['foo'](); // should be string return a + x.notHere(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'string' is not assignable to type 'U'. +!!! error TS2322: Type 'string' is not assignable to type '{|U|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts:36:11 ~~~~~~~ !!! error TS2339: Property 'notHere' does not exist on type 'U'. }, diff --git a/tests/baselines/reference/propertyAssignment.errors.txt b/tests/baselines/reference/propertyAssignment.errors.txt index cb1b31ddb4d4c..5c3bcdbd56c0d 100644 --- a/tests/baselines/reference/propertyAssignment.errors.txt +++ b/tests/baselines/reference/propertyAssignment.errors.txt @@ -24,10 +24,12 @@ tests/cases/compiler/propertyAssignment.ts(14,1): error TS2322: Type '{ x: numbe foo1 = bar1; // should be an error ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type 'new () => any'. !!! error TS2322: Type '{ x: number; }' provides no match for the signature 'new (): any'. +!!! annotated symbol 0 tests/cases/compiler/propertyAssignment.ts:2:13 foo2 = bar2; foo3 = bar3; // should be an error ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. -!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. \ No newline at end of file +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type '() => void'. +!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. +!!! annotated symbol 0 tests/cases/compiler/propertyAssignment.ts:8:13 \ No newline at end of file diff --git a/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt b/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt index 76dfb503e5262..f09c543fd58a3 100644 --- a/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt +++ b/tests/baselines/reference/propertyParameterWithQuestionMark.errors.txt @@ -13,5 +13,7 @@ tests/cases/compiler/propertyParameterWithQuestionMark.ts(9,5): error TS2322: Ty v = v2; // Should succeed var v3: { x } = new C; // Should fail ~~ -!!! error TS2322: Type 'C' is not assignable to type '{ x: any; }'. -!!! error TS2322: Property 'x' is optional in type 'C' but required in type '{ x: any; }'. \ No newline at end of file +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{ {|x|1|}: any; }'. +!!! error TS2322: Property 'x' is optional in type 'C' but required in type '{ x: any; }'. +!!! annotated symbol 0 tests/cases/compiler/propertyParameterWithQuestionMark.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/propertyParameterWithQuestionMark.ts:9:11 \ No newline at end of file diff --git a/tests/baselines/reference/protectedMembers.errors.txt b/tests/baselines/reference/protectedMembers.errors.txt index 9171df2a485b6..5dead649d3130 100644 --- a/tests/baselines/reference/protectedMembers.errors.txt +++ b/tests/baselines/reference/protectedMembers.errors.txt @@ -135,12 +135,16 @@ tests/cases/compiler/protectedMembers.ts(111,7): error TS2415: Class 'B3' incorr var b1: B1; a1 = b1; // Error, B1 doesn't derive from A1 ~~ -!!! error TS2322: Type 'B1' is not assignable to type 'A1'. +!!! error TS2322: Type '{|B1|0|}' is not assignable to type '{|A1|1|}'. !!! error TS2322: Property 'x' is protected but type 'B1' is not a class derived from 'A1'. +!!! annotated symbol 0 tests/cases/compiler/protectedMembers.ts:92:7 +!!! annotated symbol 1 tests/cases/compiler/protectedMembers.ts:89:7 b1 = a1; // Error, x is protected in A1 but public in B1 ~~ -!!! error TS2322: Type 'A1' is not assignable to type 'B1'. +!!! error TS2322: Type '{|A1|0|}' is not assignable to type '{|B1|1|}'. !!! error TS2322: Property 'x' is protected in type 'A1' but public in type 'B1'. +!!! annotated symbol 0 tests/cases/compiler/protectedMembers.ts:89:7 +!!! annotated symbol 1 tests/cases/compiler/protectedMembers.ts:92:7 class A2 { protected x; @@ -155,8 +159,10 @@ tests/cases/compiler/protectedMembers.ts(111,7): error TS2415: Class 'B3' incorr // Error x is protected in B3 but public in A3 class B3 extends A3 { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Class '{|B3|0|}' incorrectly extends base class '{|A3|1|}'. !!! error TS2415: Property 'x' is protected in type 'B3' but public in type 'A3'. +!!! annotated symbol 0 tests/cases/compiler/protectedMembers.ts:111:7 +!!! annotated symbol 1 tests/cases/compiler/protectedMembers.ts:107:7 protected x; } diff --git a/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt b/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt index 3083338f573a4..44dcf972ba911 100644 --- a/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt +++ b/tests/baselines/reference/publicMemberImplementedAsPrivateInDerivedClass.errors.txt @@ -8,8 +8,10 @@ tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts(4,7): err } class Foo implements Qux { ~~~ -!!! error TS2420: Class 'Foo' incorrectly implements interface 'Qux'. +!!! error TS2420: Class '{|Foo|0|}' incorrectly implements interface '{|Qux|1|}'. !!! error TS2420: Property 'Bar' is private in type 'Foo' but not in type 'Qux'. +!!! annotated symbol 0 tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/publicMemberImplementedAsPrivateInDerivedClass.ts:1:11 private Bar: number; } \ No newline at end of file diff --git a/tests/baselines/reference/qualify.errors.txt b/tests/baselines/reference/qualify.errors.txt index 87d2ad62657cd..b4724bd01e4f3 100644 --- a/tests/baselines/reference/qualify.errors.txt +++ b/tests/baselines/reference/qualify.errors.txt @@ -33,7 +33,8 @@ tests/cases/compiler/qualify.ts(58,5): error TS2741: Property 'p' is missing in export module U { var z:I=3; ~ -!!! error TS2322: Type '3' is not assignable to type 'I'. +!!! error TS2322: Type '3' is not assignable to type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:17:22 export interface I2 { q; } @@ -44,7 +45,8 @@ tests/cases/compiler/qualify.ts(58,5): error TS2741: Property 'p' is missing in export module U2 { var z:T.U.I2=3; ~ -!!! error TS2322: Type '3' is not assignable to type 'I2'. +!!! error TS2322: Type '3' is not assignable to type '{|I2|0|}'. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:22:26 } } @@ -61,23 +63,32 @@ tests/cases/compiler/qualify.ts(58,5): error TS2741: Property 'p' is missing in var v1:I4; var v2:K1.I3=v1; ~~ -!!! error TS2741: Property 'zeep' is missing in type 'I4' but required in type 'I3'. +!!! error TS2741: Property 'zeep' is missing in type '{|I4|0|}' but required in type '{|I3|1|}'. !!! related TS2728 tests/cases/compiler/qualify.ts:37:13: 'zeep' is declared here. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:41:26 +!!! annotated symbol 1 tests/cases/compiler/qualify.ts:36:26 var v3:K1.I3[]=v1; ~~ !!! error TS2740: Type 'I4' is missing the following properties from type 'I3[]': length, pop, push, concat, and 16 more. var v4:()=>K1.I3=v1; ~~ -!!! error TS2322: Type 'I4' is not assignable to type '() => I3'. +!!! error TS2322: Type '{|I4|0|}' is not assignable to type '() => {|I3|1|}'. !!! error TS2322: Type 'I4' provides no match for the signature '(): I3'. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:41:26 +!!! annotated symbol 1 tests/cases/compiler/qualify.ts:36:26 var v5:(k:K1.I3)=>void=v1; ~~ -!!! error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. +!!! error TS2322: Type '{|I4|0|}' is not assignable to type '(k: {|I3|1|}) => void'. !!! error TS2322: Type 'I4' provides no match for the signature '(k: I3): void'. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:41:26 +!!! annotated symbol 1 tests/cases/compiler/qualify.ts:36:26 var v6:{k:K1.I3;}=v1; ~~ -!!! error TS2741: Property 'k' is missing in type 'I4' but required in type '{ k: I3; }'. +!!! error TS2741: Property 'k' is missing in type '{|I4|0|}' but required in type '{ {|k|1|}: {|I3|2|}; }'. !!! related TS2728 tests/cases/compiler/qualify.ts:49:17: 'k' is declared here. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:41:26 +!!! annotated symbol 1 tests/cases/compiler/qualify.ts:49:17 +!!! annotated symbol 2 tests/cases/compiler/qualify.ts:36:26 } } @@ -88,7 +99,10 @@ tests/cases/compiler/qualify.ts(58,5): error TS2741: Property 'p' is missing in var y:I; var x:T.I=y; ~ -!!! error TS2741: Property 'p' is missing in type 'I' but required in type 'T.I'. +!!! error TS2741: Property 'p' is missing in type '{|I|0|}' but required in type '{|T|1|}.{|I|2|}'. !!! related TS2728 tests/cases/compiler/qualify.ts:18:9: 'p' is declared here. +!!! annotated symbol 0 tests/cases/compiler/qualify.ts:53:11 +!!! annotated symbol 1 tests/cases/compiler/qualify.ts:16:8 +!!! annotated symbol 2 tests/cases/compiler/qualify.ts:17:22 \ No newline at end of file diff --git a/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.errors.txt b/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.errors.txt index 8c7e2f57edaa8..b996ddf3c653c 100644 --- a/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.errors.txt +++ b/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.errors.txt @@ -113,41 +113,842 @@ tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts(76,50): C, Omit, keyof Shared>> & TNeedsProps ~~~~~~~~~~~ -!!! error TS2344: Type 'GetProps' does not satisfy the constraint 'Shared>'. -!!! error TS2344: Type 'unknown' is not assignable to type 'Shared>'. -!!! error TS2344: Type 'Matching>' is not assignable to type 'Shared>'. -!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps[P] ? GetProps[P] : TInjectedProps[P] : GetProps[P]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[P] | (TInjectedProps[P] extends GetProps[P] ? GetProps[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[P]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[P]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[Extract>] extends GetProps[Extract>] ? GetProps[Extract>] : TInjectedProps[Extract>] : GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[Extract>] | (TInjectedProps[Extract>] extends GetProps[Extract>] ? GetProps[Extract>] : TInjectedProps[Extract>])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type '(Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]) | (Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]) | (Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>]) | GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>] | GetProps[keyof TInjectedProps & Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'TInjectedProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'keyof GetProps & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string] : GetProps[keyof GetProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[keyof GetProps & string] | (TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[keyof GetProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[keyof GetProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. -!!! error TS2344: Type 'GetProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps[string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'keyof GetProps & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string] : GetProps[keyof GetProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[Extract>] extends GetProps[Extract>] ? GetProps[Extract>] : TInjectedProps[Extract>] : GetProps[Extract>]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. -!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps[P] ? GetProps[P] : TInjectedProps[P] : GetProps[P]' is not assignable to type 'TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never'. +!!! error TS2344: Type '{|GetProps|0|}<{|C|1|}>' does not satisfy the constraint '{|Shared|2|}<{|TInjectedProps|3|}, {|GetProps|4|}<{|C|5|}>>'. +!!! error TS2344: Type 'unknown' is not assignable to type '{|Shared|6|}<{|TInjectedProps|7|}, {|GetProps|8|}<{|C|9|}>>'. +!!! error TS2344: Type '{|Matching|10|}<{|TInjectedProps|11|}, {|GetProps|12|}<{|C|13|}>>' is not assignable to type '{|Shared|14|}<{|TInjectedProps|15|}, {|GetProps|16|}<{|C|17|}>>'. +!!! error TS2344: Type '{|P|18|} extends keyof {|TInjectedProps|19|} ? {|TInjectedProps|20|}[{|P|21|}] extends {|GetProps|22|}<{|C|23|}>[{|P|24|}] ? {|GetProps|25|}<{|C|26|}>[{|P|27|}] : {|TInjectedProps|28|}[{|P|29|}] : {|GetProps|30|}<{|C|31|}>[{|P|32|}]' is not assignable to type '({|TInjectedProps|33|}[{|P|34|}] extends {|GetProps|35|}<{|C|36|}>[{|P|37|}] ? {|GetProps|38|}<{|C|39|}>[{|P|40|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|41|}<{|C|42|}>[{|P|43|}] | ({|TInjectedProps|44|}[{|P|45|}] extends {|GetProps|46|}<{|C|47|}>[{|P|48|}] ? {|GetProps|49|}<{|C|50|}>[{|P|51|}] : {|TInjectedProps|52|}[{|P|53|}])' is not assignable to type '({|TInjectedProps|54|}[{|P|55|}] extends {|GetProps|56|}<{|C|57|}>[{|P|58|}] ? {|GetProps|59|}<{|C|60|}>[{|P|61|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|62|}<{|C|63|}>[{|P|64|}]' is not assignable to type '({|TInjectedProps|65|}[{|P|66|}] extends {|GetProps|67|}<{|C|68|}>[{|P|69|}] ? {|GetProps|70|}<{|C|71|}>[{|P|72|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|73|}<{|C|74|}>[{|P|75|}]' is not assignable to type '{|TInjectedProps|76|}[{|P|77|}] extends {|GetProps|78|}<{|C|79|}>[{|P|80|}] ? {|GetProps|81|}<{|C|82|}>[{|P|83|}] : never'. +!!! error TS2344: Type '{|Extract|84|}> extends keyof {|TInjectedProps|88|} ? {|TInjectedProps|89|}[{|Extract|90|}>] extends {|GetProps|94|}<{|C|95|}>[{|Extract|96|}>] ? {|GetProps|100|}<{|C|101|}>[{|Extract|102|}>] : {|TInjectedProps|106|}[{|Extract|107|}>] : {|GetProps|111|}<{|C|112|}>[{|Extract|113|}>]' is not assignable to type '({|TInjectedProps|117|}[{|P|118|}] extends {|GetProps|119|}<{|C|120|}>[{|P|121|}] ? {|GetProps|122|}<{|C|123|}>[{|P|124|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|125|}<{|C|126|}>[{|Extract|127|}>] | ({|TInjectedProps|131|}[{|Extract|132|}>] extends {|GetProps|136|}<{|C|137|}>[{|Extract|138|}>] ? {|GetProps|142|}<{|C|143|}>[{|Extract|144|}>] : {|TInjectedProps|148|}[{|Extract|149|}>])' is not assignable to type '({|TInjectedProps|153|}[{|P|154|}] extends {|GetProps|155|}<{|C|156|}>[{|P|157|}] ? {|GetProps|158|}<{|C|159|}>[{|P|160|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|161|}<{|C|162|}>[{|Extract|163|}>]' is not assignable to type '({|TInjectedProps|167|}[{|P|168|}] extends {|GetProps|169|}<{|C|170|}>[{|P|171|}] ? {|GetProps|172|}<{|C|173|}>[{|P|174|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|175|}<{|C|176|}>[{|Extract|177|}>]' is not assignable to type '{|TInjectedProps|181|}[{|P|182|}] extends {|GetProps|183|}<{|C|184|}>[{|P|185|}] ? {|GetProps|186|}<{|C|187|}>[{|P|188|}] : never'. +!!! error TS2344: Type '({|Extract|189|}> extends keyof {|TInjectedProps|192|} ? {|TInjectedProps|193|}[keyof {|TInjectedProps|194|} & {|Extract|195|}>] extends {|GetProps|198|}<{|C|199|}>[keyof {|TInjectedProps|200|} & {|Extract|201|}>] ? {|GetProps|204|}<{|C|205|}>[keyof {|TInjectedProps|206|} & {|Extract|207|}>] : {|TInjectedProps|210|}[keyof {|TInjectedProps|211|} & {|Extract|212|}>] : {|GetProps|215|}<{|C|216|}>[{|Extract|217|}>]) | ({|Extract|220|}> extends keyof {|TInjectedProps|223|} ? {|TInjectedProps|224|}[keyof {|TInjectedProps|225|} & {|Extract|226|}>] extends {|GetProps|229|}<{|C|230|}>[keyof {|TInjectedProps|231|} & {|Extract|232|}>] ? {|GetProps|235|}<{|C|236|}>[keyof {|TInjectedProps|237|} & {|Extract|238|}>] : {|TInjectedProps|241|}[keyof {|TInjectedProps|242|} & {|Extract|243|}>] : {|GetProps|246|}<{|C|247|}>[{|Extract|248|}>]) | ({|Extract|251|}> extends keyof {|TInjectedProps|254|} ? {|TInjectedProps|255|}[keyof {|TInjectedProps|256|} & {|Extract|257|}>] extends {|GetProps|260|}<{|C|261|}>[keyof {|TInjectedProps|262|} & {|Extract|263|}>] ? {|GetProps|266|}<{|C|267|}>[keyof {|TInjectedProps|268|} & {|Extract|269|}>] : {|TInjectedProps|272|}[keyof {|TInjectedProps|273|} & {|Extract|274|}>] : {|GetProps|277|}<{|C|278|}>[{|Extract|279|}>])' is not assignable to type '({|TInjectedProps|282|}[{|P|283|}] extends {|GetProps|284|}<{|C|285|}>[{|P|286|}] ? {|GetProps|287|}<{|C|288|}>[{|P|289|}] : never) | undefined'. +!!! error TS2344: Type '{|Extract|290|}> extends keyof {|TInjectedProps|293|} ? {|TInjectedProps|294|}[keyof {|TInjectedProps|295|} & {|Extract|296|}>] extends {|GetProps|299|}<{|C|300|}>[keyof {|TInjectedProps|301|} & {|Extract|302|}>] ? {|GetProps|305|}<{|C|306|}>[keyof {|TInjectedProps|307|} & {|Extract|308|}>] : {|TInjectedProps|311|}[keyof {|TInjectedProps|312|} & {|Extract|313|}>] : {|GetProps|316|}<{|C|317|}>[{|Extract|318|}>]' is not assignable to type '({|TInjectedProps|321|}[{|P|322|}] extends {|GetProps|323|}<{|C|324|}>[{|P|325|}] ? {|GetProps|326|}<{|C|327|}>[{|P|328|}] : never) | undefined'. +!!! error TS2344: Type '({|TInjectedProps|329|}[keyof {|TInjectedProps|330|} & {|Extract|331|}>] extends {|GetProps|334|}<{|C|335|}>[keyof {|TInjectedProps|336|} & {|Extract|337|}>] ? {|GetProps|340|}<{|C|341|}>[keyof {|TInjectedProps|342|} & {|Extract|343|}>] : {|TInjectedProps|346|}[keyof {|TInjectedProps|347|} & {|Extract|348|}>]) | {|GetProps|351|}<{|C|352|}>[{|Extract|353|}>]' is not assignable to type '({|TInjectedProps|356|}[{|P|357|}] extends {|GetProps|358|}<{|C|359|}>[{|P|360|}] ? {|GetProps|361|}<{|C|362|}>[{|P|363|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|364|}[keyof {|TInjectedProps|365|} & {|Extract|366|}>] extends {|GetProps|369|}<{|C|370|}>[keyof {|TInjectedProps|371|} & {|Extract|372|}>] ? {|GetProps|375|}<{|C|376|}>[keyof {|TInjectedProps|377|} & {|Extract|378|}>] : {|TInjectedProps|381|}[keyof {|TInjectedProps|382|} & {|Extract|383|}>]' is not assignable to type '({|TInjectedProps|386|}[{|P|387|}] extends {|GetProps|388|}<{|C|389|}>[{|P|390|}] ? {|GetProps|391|}<{|C|392|}>[{|P|393|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|394|}[keyof {|TInjectedProps|395|} & {|Extract|396|}>] | {|GetProps|399|}<{|C|400|}>[keyof {|TInjectedProps|401|} & {|Extract|402|}>]' is not assignable to type '({|TInjectedProps|405|}[{|P|406|}] extends {|GetProps|407|}<{|C|408|}>[{|P|409|}] ? {|GetProps|410|}<{|C|411|}>[{|P|412|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|413|}[keyof {|TInjectedProps|414|} & {|Extract|415|}>]' is not assignable to type '({|TInjectedProps|418|}[{|P|419|}] extends {|GetProps|420|}<{|C|421|}>[{|P|422|}] ? {|GetProps|423|}<{|C|424|}>[{|P|425|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|426|}[string]' is not assignable to type '({|TInjectedProps|427|}[{|P|428|}] extends {|GetProps|429|}<{|C|430|}>[{|P|431|}] ? {|GetProps|432|}<{|C|433|}>[{|P|434|}] : never) | undefined'. +!!! error TS2344: Type '{|TInjectedProps|435|}[string]' is not assignable to type '{|TInjectedProps|436|}[{|P|437|}] extends {|GetProps|438|}<{|C|439|}>[{|P|440|}] ? {|GetProps|441|}<{|C|442|}>[{|P|443|}] : never'. +!!! error TS2344: Type '{|TInjectedProps|444|}[keyof {|TInjectedProps|445|} & {|Extract|446|}>]' is not assignable to type '{|TInjectedProps|449|}[{|P|450|}] extends {|GetProps|451|}<{|C|452|}>[{|P|453|}] ? {|GetProps|454|}<{|C|455|}>[{|P|456|}] : never'. +!!! error TS2344: Type '{|TInjectedProps|457|}[string]' is not assignable to type '{|TInjectedProps|458|}[{|P|459|}] extends {|GetProps|460|}<{|C|461|}>[{|P|462|}] ? {|GetProps|463|}<{|C|464|}>[{|P|465|}] : never'. +!!! error TS2344: Type '{|TInjectedProps|466|}[keyof {|TInjectedProps|467|} & {|Extract|468|}>] extends {|GetProps|471|}<{|C|472|}>[keyof {|TInjectedProps|473|} & {|Extract|474|}>] ? {|GetProps|477|}<{|C|478|}>[keyof {|TInjectedProps|479|} & {|Extract|480|}>] : {|TInjectedProps|483|}[keyof {|TInjectedProps|484|} & {|Extract|485|}>]' is not assignable to type '{|TInjectedProps|488|}[{|P|489|}] extends {|GetProps|490|}<{|C|491|}>[{|P|492|}] ? {|GetProps|493|}<{|C|494|}>[{|P|495|}] : never'. +!!! error TS2344: Type 'keyof {|GetProps|496|}<{|C|497|}> & string extends keyof {|TInjectedProps|498|} ? {|TInjectedProps|499|}[keyof {|TInjectedProps|500|} & keyof {|GetProps|501|}<{|C|502|}> & string] extends {|GetProps|503|}<{|C|504|}>[keyof {|TInjectedProps|505|} & keyof {|GetProps|506|}<{|C|507|}> & string] ? {|GetProps|508|}<{|C|509|}>[keyof {|TInjectedProps|510|} & keyof {|GetProps|511|}<{|C|512|}> & string] : {|TInjectedProps|513|}[keyof {|TInjectedProps|514|} & keyof {|GetProps|515|}<{|C|516|}> & string] : {|GetProps|517|}<{|C|518|}>[keyof {|GetProps|519|}<{|C|520|}> & string]' is not assignable to type '({|TInjectedProps|521|}[{|P|522|}] extends {|GetProps|523|}<{|C|524|}>[{|P|525|}] ? {|GetProps|526|}<{|C|527|}>[{|P|528|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|529|}<{|C|530|}>[keyof {|GetProps|531|}<{|C|532|}> & string] | ({|TInjectedProps|533|}[keyof {|TInjectedProps|534|} & keyof {|GetProps|535|}<{|C|536|}> & string] extends {|GetProps|537|}<{|C|538|}>[keyof {|TInjectedProps|539|} & keyof {|GetProps|540|}<{|C|541|}> & string] ? {|GetProps|542|}<{|C|543|}>[keyof {|TInjectedProps|544|} & keyof {|GetProps|545|}<{|C|546|}> & string] : {|TInjectedProps|547|}[keyof {|TInjectedProps|548|} & keyof {|GetProps|549|}<{|C|550|}> & string])' is not assignable to type '({|TInjectedProps|551|}[{|P|552|}] extends {|GetProps|553|}<{|C|554|}>[{|P|555|}] ? {|GetProps|556|}<{|C|557|}>[{|P|558|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|559|}<{|C|560|}>[keyof {|GetProps|561|}<{|C|562|}> & string]' is not assignable to type '({|TInjectedProps|563|}[{|P|564|}] extends {|GetProps|565|}<{|C|566|}>[{|P|567|}] ? {|GetProps|568|}<{|C|569|}>[{|P|570|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|571|}<{|C|572|}>[keyof {|GetProps|573|}<{|C|574|}> & string]' is not assignable to type '{|TInjectedProps|575|}[{|P|576|}] extends {|GetProps|577|}<{|C|578|}>[{|P|579|}] ? {|GetProps|580|}<{|C|581|}>[{|P|582|}] : never'. +!!! error TS2344: Type 'string extends keyof {|TInjectedProps|583|} ? {|TInjectedProps|584|}[keyof {|TInjectedProps|585|} & string] extends {|GetProps|586|}<{|C|587|}>[keyof {|TInjectedProps|588|} & string] ? {|GetProps|589|}<{|C|590|}>[keyof {|TInjectedProps|591|} & string] : {|TInjectedProps|592|}[keyof {|TInjectedProps|593|} & string] : {|GetProps|594|}<{|C|595|}>[string]' is not assignable to type '({|TInjectedProps|596|}[{|P|597|}] extends {|GetProps|598|}<{|C|599|}>[{|P|600|}] ? {|GetProps|601|}<{|C|602|}>[{|P|603|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|604|}<{|C|605|}>[string] | ({|TInjectedProps|606|}[keyof {|TInjectedProps|607|} & string] extends {|GetProps|608|}<{|C|609|}>[keyof {|TInjectedProps|610|} & string] ? {|GetProps|611|}<{|C|612|}>[keyof {|TInjectedProps|613|} & string] : {|TInjectedProps|614|}[keyof {|TInjectedProps|615|} & string])' is not assignable to type '({|TInjectedProps|616|}[{|P|617|}] extends {|GetProps|618|}<{|C|619|}>[{|P|620|}] ? {|GetProps|621|}<{|C|622|}>[{|P|623|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|624|}<{|C|625|}>[string]' is not assignable to type '({|TInjectedProps|626|}[{|P|627|}] extends {|GetProps|628|}<{|C|629|}>[{|P|630|}] ? {|GetProps|631|}<{|C|632|}>[{|P|633|}] : never) | undefined'. +!!! error TS2344: Type '{|GetProps|634|}<{|C|635|}>[string]' is not assignable to type '{|TInjectedProps|636|}[{|P|637|}] extends {|GetProps|638|}<{|C|639|}>[{|P|640|}] ? {|GetProps|641|}<{|C|642|}>[{|P|643|}] : never'. +!!! error TS2344: Type 'string extends keyof {|TInjectedProps|644|} ? {|TInjectedProps|645|}[keyof {|TInjectedProps|646|} & string] extends {|GetProps|647|}<{|C|648|}>[keyof {|TInjectedProps|649|} & string] ? {|GetProps|650|}<{|C|651|}>[keyof {|TInjectedProps|652|} & string] : {|TInjectedProps|653|}[keyof {|TInjectedProps|654|} & string] : {|GetProps|655|}<{|C|656|}>[string]' is not assignable to type '{|TInjectedProps|657|}[{|P|658|}] extends {|GetProps|659|}<{|C|660|}>[{|P|661|}] ? {|GetProps|662|}<{|C|663|}>[{|P|664|}] : never'. +!!! error TS2344: Type 'keyof {|GetProps|665|}<{|C|666|}> & string extends keyof {|TInjectedProps|667|} ? {|TInjectedProps|668|}[keyof {|TInjectedProps|669|} & keyof {|GetProps|670|}<{|C|671|}> & string] extends {|GetProps|672|}<{|C|673|}>[keyof {|TInjectedProps|674|} & keyof {|GetProps|675|}<{|C|676|}> & string] ? {|GetProps|677|}<{|C|678|}>[keyof {|TInjectedProps|679|} & keyof {|GetProps|680|}<{|C|681|}> & string] : {|TInjectedProps|682|}[keyof {|TInjectedProps|683|} & keyof {|GetProps|684|}<{|C|685|}> & string] : {|GetProps|686|}<{|C|687|}>[keyof {|GetProps|688|}<{|C|689|}> & string]' is not assignable to type '{|TInjectedProps|690|}[{|P|691|}] extends {|GetProps|692|}<{|C|693|}>[{|P|694|}] ? {|GetProps|695|}<{|C|696|}>[{|P|697|}] : never'. +!!! error TS2344: Type '{|Extract|698|}> extends keyof {|TInjectedProps|701|} ? {|TInjectedProps|702|}[keyof {|TInjectedProps|703|} & {|Extract|704|}>] extends {|GetProps|707|}<{|C|708|}>[keyof {|TInjectedProps|709|} & {|Extract|710|}>] ? {|GetProps|713|}<{|C|714|}>[keyof {|TInjectedProps|715|} & {|Extract|716|}>] : {|TInjectedProps|719|}[keyof {|TInjectedProps|720|} & {|Extract|721|}>] : {|GetProps|724|}<{|C|725|}>[{|Extract|726|}>]' is not assignable to type '{|TInjectedProps|729|}[{|P|730|}] extends {|GetProps|731|}<{|C|732|}>[{|P|733|}] ? {|GetProps|734|}<{|C|735|}>[{|P|736|}] : never'. +!!! error TS2344: Type '{|Extract|737|}> extends keyof {|TInjectedProps|741|} ? {|TInjectedProps|742|}[{|Extract|743|}>] extends {|GetProps|747|}<{|C|748|}>[{|Extract|749|}>] ? {|GetProps|753|}<{|C|754|}>[{|Extract|755|}>] : {|TInjectedProps|759|}[{|Extract|760|}>] : {|GetProps|764|}<{|C|765|}>[{|Extract|766|}>]' is not assignable to type '{|TInjectedProps|770|}[{|P|771|}] extends {|GetProps|772|}<{|C|773|}>[{|P|774|}] ? {|GetProps|775|}<{|C|776|}>[{|P|777|}] : never'. +!!! error TS2344: Type '{|P|778|} extends keyof {|TInjectedProps|779|} ? {|TInjectedProps|780|}[{|P|781|}] extends {|GetProps|782|}<{|C|783|}>[{|P|784|}] ? {|GetProps|785|}<{|C|786|}>[{|P|787|}] : {|TInjectedProps|788|}[{|P|789|}] : {|GetProps|790|}<{|C|791|}>[{|P|792|}]' is not assignable to type '{|TInjectedProps|793|}[{|P|794|}] extends {|GetProps|795|}<{|C|796|}>[{|P|797|}] ? {|GetProps|798|}<{|C|799|}>[{|P|800|}] : never'. +!!! annotated symbol 0 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 1 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 2 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:39:6 +!!! annotated symbol 3 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 4 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 5 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 6 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:39:6 +!!! annotated symbol 7 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 8 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 9 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 10 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:60:6 +!!! annotated symbol 11 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 12 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 13 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 14 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:39:6 +!!! annotated symbol 15 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 16 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 17 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 18 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 19 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 20 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 21 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 22 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 23 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 24 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 25 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 26 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 27 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 28 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 29 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 30 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 31 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 32 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 33 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 34 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 35 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 36 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 37 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 38 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 39 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 40 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 41 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 42 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 43 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 44 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 45 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 46 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 47 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 48 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 49 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 50 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 51 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 52 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 53 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 54 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 55 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 56 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 57 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 58 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 59 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 60 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 61 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 62 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 63 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 64 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 65 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 66 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 67 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 68 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 69 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 70 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 71 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 72 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 73 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 74 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 75 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 76 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 77 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 78 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 79 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 80 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 81 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 82 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 83 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 84 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 85 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 86 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 87 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 88 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 89 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 90 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 91 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 92 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 93 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 94 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 95 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 96 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 97 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 98 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 99 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 100 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 101 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 102 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 103 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 104 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 105 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 106 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 107 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 108 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 109 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 110 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 111 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 112 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 113 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 114 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 115 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 116 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 117 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 118 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 119 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 120 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 121 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 122 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 123 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 124 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 125 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 126 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 127 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 128 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 129 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 130 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 131 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 132 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 133 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 134 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 135 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 136 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 137 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 138 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 139 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 140 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 141 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 142 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 143 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 144 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 145 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 146 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 147 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 148 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 149 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 150 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 151 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 152 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 153 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 154 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 155 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 156 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 157 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 158 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 159 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 160 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 161 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 162 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 163 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 164 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 165 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 166 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 167 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 168 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 169 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 170 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 171 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 172 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 173 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 174 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 175 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 176 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 177 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 178 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 179 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 180 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 181 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 182 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 183 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 184 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 185 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 186 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 187 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 188 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 189 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 190 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 191 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 192 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 193 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 194 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 195 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 196 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 197 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 198 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 199 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 200 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 201 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 202 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 203 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 204 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 205 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 206 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 207 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 208 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 209 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 210 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 211 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 212 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 213 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 214 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 215 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 216 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 217 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 218 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 219 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 220 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 221 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 222 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 223 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 224 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 225 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 226 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 227 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 228 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 229 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 230 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 231 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 232 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 233 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 234 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 235 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 236 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 237 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 238 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 239 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 240 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 241 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 242 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 243 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 244 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 245 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 246 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 247 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 248 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 249 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 250 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 251 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 252 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 253 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 254 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 255 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 256 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 257 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 258 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 259 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 260 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 261 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 262 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 263 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 264 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 265 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 266 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 267 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 268 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 269 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 270 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 271 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 272 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 273 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 274 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 275 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 276 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 277 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 278 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 279 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 280 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 281 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 282 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 283 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 284 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 285 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 286 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 287 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 288 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 289 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 290 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 291 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 292 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 293 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 294 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 295 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 296 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 297 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 298 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 299 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 300 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 301 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 302 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 303 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 304 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 305 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 306 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 307 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 308 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 309 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 310 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 311 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 312 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 313 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 314 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 315 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 316 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 317 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 318 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 319 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 320 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 321 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 322 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 323 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 324 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 325 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 326 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 327 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 328 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 329 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 330 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 331 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 332 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 333 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 334 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 335 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 336 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 337 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 338 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 339 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 340 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 341 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 342 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 343 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 344 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 345 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 346 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 347 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 348 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 349 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 350 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 351 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 352 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 353 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 354 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 355 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 356 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 357 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 358 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 359 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 360 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 361 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 362 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 363 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 364 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 365 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 366 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 367 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 368 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 369 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 370 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 371 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 372 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 373 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 374 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 375 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 376 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 377 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 378 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 379 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 380 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 381 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 382 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 383 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 384 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 385 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 386 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 387 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 388 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 389 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 390 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 391 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 392 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 393 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 394 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 395 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 396 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 397 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 398 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 399 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 400 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 401 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 402 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 403 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 404 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 405 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 406 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 407 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 408 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 409 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 410 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 411 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 412 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 413 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 414 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 415 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 416 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 417 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 418 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 419 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 420 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 421 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 422 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 423 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 424 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 425 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 426 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 427 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 428 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 429 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 430 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 431 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 432 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 433 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 434 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 435 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 436 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 437 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 438 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 439 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 440 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 441 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 442 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 443 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 444 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 445 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 446 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 447 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 448 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 449 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 450 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 451 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 452 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 453 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 454 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 455 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 456 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 457 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 458 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 459 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 460 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 461 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 462 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 463 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 464 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 465 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 466 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 467 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 468 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 469 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 470 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 471 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 472 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 473 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 474 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 475 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 476 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 477 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 478 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 479 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 480 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 481 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 482 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 483 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 484 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 485 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 486 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 487 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 488 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 489 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 490 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 491 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 492 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 493 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 494 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 495 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 496 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 497 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 498 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 499 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 500 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 501 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 502 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 503 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 504 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 505 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 506 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 507 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 508 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 509 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 510 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 511 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 512 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 513 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 514 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 515 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 516 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 517 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 518 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 519 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 520 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 521 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 522 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 523 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 524 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 525 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 526 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 527 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 528 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 529 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 530 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 531 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 532 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 533 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 534 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 535 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 536 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 537 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 538 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 539 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 540 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 541 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 542 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 543 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 544 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 545 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 546 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 547 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 548 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 549 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 550 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 551 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 552 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 553 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 554 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 555 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 556 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 557 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 558 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 559 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 560 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 561 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 562 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 563 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 564 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 565 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 566 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 567 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 568 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 569 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 570 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 571 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 572 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 573 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 574 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 575 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 576 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 577 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 578 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 579 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 580 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 581 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 582 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 583 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 584 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 585 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 586 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 587 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 588 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 589 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 590 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 591 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 592 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 593 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 594 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 595 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 596 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 597 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 598 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 599 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 600 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 601 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 602 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 603 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 604 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 605 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 606 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 607 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 608 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 609 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 610 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 611 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 612 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 613 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 614 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 615 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 616 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 617 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 618 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 619 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 620 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 621 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 622 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 623 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 624 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 625 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 626 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 627 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 628 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 629 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 630 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 631 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 632 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 633 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 634 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 635 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 636 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 637 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 638 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 639 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 640 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 641 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 642 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 643 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 644 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 645 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 646 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 647 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 648 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 649 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 650 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 651 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 652 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 653 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 654 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 655 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 656 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 657 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 658 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 659 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 660 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 661 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 662 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 663 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 664 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 665 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 666 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 667 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 668 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 669 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 670 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 671 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 672 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 673 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 674 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 675 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 676 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 677 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 678 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 679 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 680 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 681 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 682 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 683 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 684 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 685 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 686 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 687 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 688 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 689 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 690 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 691 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 692 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 693 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 694 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 695 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 696 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 697 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 698 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 699 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 700 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 701 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 702 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 703 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 704 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 705 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 706 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 707 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 708 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 709 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 710 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 711 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 712 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 713 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 714 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 715 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 716 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 717 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 718 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 719 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 720 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 721 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 722 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 723 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 724 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 725 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 726 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 727 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 728 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 729 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 730 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 731 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 732 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 733 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 734 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 735 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 736 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 737 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 738 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 739 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 740 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 741 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 742 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 743 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 744 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 745 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 746 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 747 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 748 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 749 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 750 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 751 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 752 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 753 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 754 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 755 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 756 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 757 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 758 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 759 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 760 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 761 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 762 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 763 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 764 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 765 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 766 /.ts/lib.es5.d.ts:1464:6 +!!! annotated symbol 767 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 768 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 769 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 770 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 771 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 772 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 773 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 774 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 775 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 776 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 777 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 778 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 779 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 780 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 781 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 782 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 783 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 784 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 785 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 786 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 787 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 788 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 789 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 790 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 791 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 792 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 793 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:70:42 +!!! annotated symbol 794 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 795 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 796 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 797 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 +!!! annotated symbol 798 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:52:6 +!!! annotated symbol 799 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:71:3 +!!! annotated symbol 800 tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts:43:4 >; declare const connect: { diff --git a/tests/baselines/reference/readonlyConstructorAssignment.errors.txt b/tests/baselines/reference/readonlyConstructorAssignment.errors.txt index ecd22168d7204..6f00e79df19f0 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.errors.txt +++ b/tests/baselines/reference/readonlyConstructorAssignment.errors.txt @@ -40,8 +40,10 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/re // Fails, can't redeclare readonly property class E extends D { ~ -!!! error TS2415: Class 'E' incorrectly extends base class 'D'. +!!! error TS2415: Class '{|E|0|}' incorrectly extends base class '{|D|1|}'. !!! error TS2415: Property 'x' is private in type 'D' but not in type 'E'. +!!! annotated symbol 0 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts:33:7 +!!! annotated symbol 1 tests/cases/conformance/classes/constructorDeclarations/constructorParameters/readonlyConstructorAssignment.ts:26:7 constructor(readonly x: number) { super(x); this.x = 1; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt index f64b02d9eda15..88015ed668baf 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt @@ -108,9 +108,13 @@ tests/cases/compiler/recursiveClassReferenceTest.ts(95,21): error TS2345: Argume public getInitialState(): IState { return new State(self); ~~~~ -!!! error TS2345: Argument of type 'Window' is not assignable to parameter of type 'IMode'. -!!! error TS2345: Property 'getInitialState' is missing in type 'Window' but required in type 'IMode'. +!!! error TS2345: Argument of type '{|Window|0|}' is not assignable to parameter of type '{|IMode|1|}'. +!!! error TS2345: Property 'getInitialState' is missing in type '{|Window|2|}' but required in type '{|IMode|3|}'. !!! related TS2728 tests/cases/compiler/recursiveClassReferenceTest.ts:66:19: 'getInitialState' is declared here. +!!! annotated symbol 0 tests/cases/compiler/recursiveClassReferenceTest.ts:71:11 +!!! annotated symbol 1 tests/cases/compiler/recursiveClassReferenceTest.ts:66:11 +!!! annotated symbol 2 tests/cases/compiler/recursiveClassReferenceTest.ts:71:11 +!!! annotated symbol 3 tests/cases/compiler/recursiveClassReferenceTest.ts:66:11 } diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index c58b98b394932..8798304676856 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -17,15 +17,19 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of ==== tests/cases/compiler/recursiveFunctionTypes.ts (13 errors) ==== function fn(): typeof fn { return 1; } ~~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type '() => typeof fn'. +!!! error TS2322: Type '1' is not assignable to type '() => typeof {|fn|0|}'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:1:10 var x: number = fn; // error ~ -!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'. +!!! error TS2322: Type '() => typeof {|fn|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:1:10 var y: () => number = fn; // ok ~ -!!! error TS2322: Type '() => typeof fn' is not assignable to type '() => number'. -!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'. +!!! error TS2322: Type '() => typeof {|fn|0|}' is not assignable to type '() => number'. +!!! error TS2322: Type '() => typeof {|fn|1|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:1:10 +!!! annotated symbol 1 tests/cases/compiler/recursiveFunctionTypes.ts:1:10 var f: () => typeof g; var g: () => typeof f; @@ -44,14 +48,17 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of var a: number = f3; // error ~ -!!! error TS2322: Type '() => I' is not assignable to type 'number'. +!!! error TS2322: Type '() => {|I|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:14:11 +!!! annotated symbol 1 tests/cases/compiler/recursiveFunctionTypes.ts:15:10 class C { static g(t: typeof C.g){ } } C.g(3); // error ~ -!!! error TS2345: Argument of type '3' is not assignable to parameter of type '(t: typeof g) => void'. +!!! error TS2345: Argument of type '3' is not assignable to parameter of type '(t: typeof {|g|0|}) => void'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:20:13 var f4: () => typeof f4; f4 = 3; // error @@ -72,7 +79,9 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of !!! error TS2554: Expected 0-1 arguments, but got 2. f6(""); // ok (function takes an any param) ~~ -!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{ (): typeof f6; (a: typeof f6): () => number; }'. +!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{ (): typeof {|f6|0|}; (a: typeof {|f6|1|}): () => number; }'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:29:10 +!!! annotated symbol 1 tests/cases/compiler/recursiveFunctionTypes.ts:29:10 f6(); // ok declare function f7(): typeof f7; @@ -85,5 +94,9 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of !!! error TS2554: Expected 0-1 arguments, but got 2. f7(""); // ok (function takes an any param) ~~ -!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. +!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{ (): typeof {|f7|0|}; (a: typeof {|f7|1|}): () => number; (a: number): number; (a?: typeof {|f7|2|}): typeof {|f7|3|}; }'. +!!! annotated symbol 0 tests/cases/compiler/recursiveFunctionTypes.ts:37:18 +!!! annotated symbol 1 tests/cases/compiler/recursiveFunctionTypes.ts:37:18 +!!! annotated symbol 2 tests/cases/compiler/recursiveFunctionTypes.ts:37:18 +!!! annotated symbol 3 tests/cases/compiler/recursiveFunctionTypes.ts:37:18 f7(); // ok \ No newline at end of file diff --git a/tests/baselines/reference/recursiveInheritance3.errors.txt b/tests/baselines/reference/recursiveInheritance3.errors.txt index 78cf6db082439..eecf357533699 100644 --- a/tests/baselines/reference/recursiveInheritance3.errors.txt +++ b/tests/baselines/reference/recursiveInheritance3.errors.txt @@ -5,9 +5,13 @@ tests/cases/compiler/recursiveInheritance3.ts(1,7): error TS2420: Class 'C' inco ==== tests/cases/compiler/recursiveInheritance3.ts (1 errors) ==== class C implements I { ~ -!!! error TS2420: Class 'C' incorrectly implements interface 'I'. -!!! error TS2420: Property 'other' is missing in type 'C' but required in type 'I'. +!!! error TS2420: Class '{|C|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property 'other' is missing in type '{|C|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/compiler/recursiveInheritance3.ts:7:5: 'other' is declared here. +!!! annotated symbol 0 tests/cases/compiler/recursiveInheritance3.ts:1:7 +!!! annotated symbol 1 tests/cases/compiler/recursiveInheritance3.ts:6:11 +!!! annotated symbol 2 tests/cases/compiler/recursiveInheritance3.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/recursiveInheritance3.ts:6:11 public foo(x: any) { return x; } private x = 1; } diff --git a/tests/baselines/reference/recursiveIntersectionTypes.errors.txt b/tests/baselines/reference/recursiveIntersectionTypes.errors.txt index 71383cc7ef012..b4fcc202f11a1 100644 --- a/tests/baselines/reference/recursiveIntersectionTypes.errors.txt +++ b/tests/baselines/reference/recursiveIntersectionTypes.errors.txt @@ -23,7 +23,14 @@ tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts(19,1): entityList = productList; productList = entityList; // Error ~~~~~~~~~~~ -!!! error TS2322: Type 'LinkedList' is not assignable to type 'LinkedList'. -!!! error TS2322: Property 'price' is missing in type 'LinkedList' but required in type 'Product'. +!!! error TS2322: Type '{|LinkedList|0|}<{|Entity|1|}>' is not assignable to type '{|LinkedList|2|}<{|Product|3|}>'. +!!! error TS2322: Property 'price' is missing in type '{|LinkedList|4|}<{|Entity|5|}>' but required in type '{|Product|6|}'. !!! related TS2728 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:8:5: 'price' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:1:6 +!!! annotated symbol 1 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:3:11 +!!! annotated symbol 2 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:1:6 +!!! annotated symbol 3 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:7:11 +!!! annotated symbol 4 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:1:6 +!!! annotated symbol 5 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:3:11 +!!! annotated symbol 6 tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts:7:11 \ No newline at end of file diff --git a/tests/baselines/reference/recursiveTypeComparison.errors.txt b/tests/baselines/reference/recursiveTypeComparison.errors.txt index f647763b2e275..6c9a3894ca62f 100644 --- a/tests/baselines/reference/recursiveTypeComparison.errors.txt +++ b/tests/baselines/reference/recursiveTypeComparison.errors.txt @@ -20,8 +20,12 @@ tests/cases/compiler/recursiveTypeComparison.ts(14,5): error TS2322: Type 'Obser var p: Observable<{}>; var stuck: Property = p; ~~~~~ -!!! error TS2322: Type 'Observable<{}>' is not assignable to type 'Property'. +!!! error TS2322: Type '{|Observable|0|}<{}>' is not assignable to type '{|Property|1|}'. !!! error TS2322: Types of property 'needThisOne' are incompatible. -!!! error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable'. +!!! error TS2322: Type '{|Observable|2|}<{}>' is not assignable to type '{|Observable|3|}'. !!! error TS2322: Type '{}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/recursiveTypeComparison.ts:3:11 +!!! annotated symbol 1 tests/cases/compiler/recursiveTypeComparison.ts:11:11 +!!! annotated symbol 2 tests/cases/compiler/recursiveTypeComparison.ts:3:11 +!!! annotated symbol 3 tests/cases/compiler/recursiveTypeComparison.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/recursiveTypeRelations.errors.txt b/tests/baselines/reference/recursiveTypeRelations.errors.txt index e39ca75dab97d..c9567bd579173 100644 --- a/tests/baselines/reference/recursiveTypeRelations.errors.txt +++ b/tests/baselines/reference/recursiveTypeRelations.errors.txt @@ -39,9 +39,11 @@ tests/cases/compiler/recursiveTypeRelations.ts(27,61): error TS2304: Cannot find ~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'ClassNameObject'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(obj: any, key: keyof S) => any' is not assignable to parameter of type '(previousValue: any, currentValue: string, currentIndex: number, array: string[]) => any'. +!!! error TS2345: Argument of type '(obj: any, key: keyof {|S|0|}) => any' is not assignable to parameter of type '(previousValue: any, currentValue: string, currentIndex: number, array: string[]) => any'. !!! error TS2345: Types of parameters 'key' and 'currentValue' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type 'keyof S'. +!!! error TS2345: Type 'string' is not assignable to type 'keyof {|S|1|}'. +!!! annotated symbol 0 tests/cases/compiler/recursiveTypeRelations.ts:18:21 +!!! annotated symbol 1 tests/cases/compiler/recursiveTypeRelations.ts:18:21 ~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'ClassNameObject'. const exportedClassName = styles[key]; diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index c632915e72fd9..e0d9482e1e46e 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -4,5 +4,6 @@ tests/cases/compiler/redefineArray.ts(1,1): error TS2741: Property 'isArray' is ==== tests/cases/compiler/redefineArray.ts (1 errors) ==== Array = function (n:number, s:string) {return n;}; ~~~~~ -!!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type 'ArrayConstructor'. -!!! related TS2728 /.ts/lib.es5.d.ts:1364:5: 'isArray' is declared here. \ No newline at end of file +!!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type '{|ArrayConstructor|0|}'. +!!! related TS2728 /.ts/lib.es5.d.ts:1364:5: 'isArray' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1357:11 \ No newline at end of file diff --git a/tests/baselines/reference/requireOfJsonFileInJsFile.errors.txt b/tests/baselines/reference/requireOfJsonFileInJsFile.errors.txt index 136b416c52947..0ae636d174dd4 100644 --- a/tests/baselines/reference/requireOfJsonFileInJsFile.errors.txt +++ b/tests/baselines/reference/requireOfJsonFileInJsFile.errors.txt @@ -13,8 +13,10 @@ /** @type {{ b: number }} */ const json1 = require("./json.json"); // No error (bad) ~~~~~ -!!! error TS2741: Property 'b' is missing in type '{ "a": number; }' but required in type '{ b: number; }'. +!!! error TS2741: Property 'b' is missing in type '{ {|"a"|0|}: number; }' but required in type '{ {|b|1|}: number; }'. !!! related TS2728 /user.js:4:14: 'b' is declared here. +!!! annotated symbol 0 /json.json:1:3 +!!! annotated symbol 1 /user.js:4:14 json1.b; // No error (OK since that's the type annotation) const js0 = require("./js.js"); @@ -25,8 +27,10 @@ /** @type {{ b: number }} */ const js1 = require("./js.js"); // Error (good) ~~~ -!!! error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: number; }'. +!!! error TS2741: Property 'b' is missing in type '{ {|a|0|}: number; }' but required in type '{ {|b|1|}: number; }'. !!! related TS2728 /user.js:11:14: 'b' is declared here. +!!! annotated symbol 0 /js.js:1:20 +!!! annotated symbol 1 /user.js:11:14 js1.b; ==== /json.json (0 errors) ==== { "a": 0 } diff --git a/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt index 83871b2909688..011a06f25ee2c 100644 --- a/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt +++ b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt @@ -19,12 +19,24 @@ tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(22,6): error TS export let B = b; A = b; // Should Error ~ -!!! error TS2741: Property 'a' is missing in type 'Required<{ b?: 1; x: 1; }>' but required in type 'Required<{ a?: 1; x: 1; }>'. +!!! error TS2741: Property 'a' is missing in type '{|Required|0|}<{ {|b|1|}?: 1; {|x|2|}: 1; }>' but required in type '{|Required|3|}<{ {|a|4|}?: 1; {|x|5|}: 1; }>'. !!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:1:21: 'a' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 1 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:2:21 +!!! annotated symbol 2 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:2:28 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 4 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:1:21 +!!! annotated symbol 5 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:1:28 B = a; // Should Error ~ -!!! error TS2741: Property 'b' is missing in type 'Required<{ a?: 1; x: 1; }>' but required in type 'Required<{ b?: 1; x: 1; }>'. +!!! error TS2741: Property 'b' is missing in type '{|Required|0|}<{ {|a|1|}?: 1; {|x|2|}: 1; }>' but required in type '{|Required|3|}<{ {|b|4|}?: 1; {|x|5|}: 1; }>'. !!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:2:21: 'b' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 1 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:1:21 +!!! annotated symbol 2 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:1:28 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 4 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:2:21 +!!! annotated symbol 5 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:2:28 a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. ~ @@ -42,16 +54,40 @@ tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(22,6): error TS export let BB = bb; AA = bb; // Should Error ~~ -!!! error TS2322: Type 'Foo<{ b?: 1; x: 1; }>' is not assignable to type 'Foo<{ a?: 1; x: 1; }>'. +!!! error TS2322: Type '{|Foo|0|}<{ {|b|1|}?: 1; {|x|2|}: 1; }>' is not assignable to type '{|Foo|3|}<{ {|a|4|}?: 1; {|x|5|}: 1; }>'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Property 'a' is missing in type 'Required<{ b?: 1; x: 1; }>' but required in type 'Required<{ a?: 1; x: 1; }>'. +!!! error TS2322: Property 'a' is missing in type '{|Required|6|}<{ {|b|7|}?: 1; {|x|8|}: 1; }>' but required in type '{|Required|9|}<{ {|a|10|}?: 1; {|x|11|}: 1; }>'. !!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:17: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:17 +!!! annotated symbol 2 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:24 +!!! annotated symbol 3 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:17 +!!! annotated symbol 5 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:24 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 7 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:17 +!!! annotated symbol 8 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:24 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 10 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:17 +!!! annotated symbol 11 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:24 BB = aa; // Should Error ~~ -!!! error TS2322: Type 'Foo<{ a?: 1; x: 1; }>' is not assignable to type 'Foo<{ b?: 1; x: 1; }>'. +!!! error TS2322: Type '{|Foo|0|}<{ {|a|1|}?: 1; {|x|2|}: 1; }>' is not assignable to type '{|Foo|3|}<{ {|b|4|}?: 1; {|x|5|}: 1; }>'. !!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Property 'b' is missing in type 'Required<{ a?: 1; x: 1; }>' but required in type 'Required<{ b?: 1; x: 1; }>'. +!!! error TS2322: Property 'b' is missing in type '{|Required|6|}<{ {|a|7|}?: 1; {|x|8|}: 1; }>' but required in type '{|Required|9|}<{ {|b|10|}?: 1; {|x|11|}: 1; }>'. !!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:17: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:11:11 +!!! annotated symbol 1 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:17 +!!! annotated symbol 2 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:24 +!!! annotated symbol 3 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:11:11 +!!! annotated symbol 4 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:17 +!!! annotated symbol 5 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:24 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 7 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:17 +!!! annotated symbol 8 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:24 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:1431:6 +!!! annotated symbol 10 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:17 +!!! annotated symbol 11 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:24 aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. ~ diff --git a/tests/baselines/reference/restTuplesFromContextualTypes.errors.txt b/tests/baselines/reference/restTuplesFromContextualTypes.errors.txt index 5f2c299735b0b..453295cf3d3dc 100644 --- a/tests/baselines/reference/restTuplesFromContextualTypes.errors.txt +++ b/tests/baselines/reference/restTuplesFromContextualTypes.errors.txt @@ -62,10 +62,18 @@ tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts(56,7): error f((a, ...x) => {}); f((a, b, ...x) => {}); ~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a: number, b: T[0], ...x: T[number][]) => void' is not assignable to parameter of type '(x: number, ...args: T) => void'. +!!! error TS2345: Argument of type '(a: number, b: {|T|0|}[0], ...x: {|T|1|}[number][]) => void' is not assignable to parameter of type '(x: number, ...args: {|T|2|}) => void'. !!! error TS2345: Types of parameters 'b' and 'args' are incompatible. -!!! error TS2345: Type 'T' is not assignable to type '[T[0], ...T[number][]]'. -!!! error TS2345: Property '0' is missing in type 'any[]' but required in type '[T[0], ...T[number][]]'. +!!! error TS2345: Type '{|T|3|}' is not assignable to type '[{|T|4|}[0], ...{|T|5|}[number][]]'. +!!! error TS2345: Property '0' is missing in type 'any[]' but required in type '[{|T|6|}[0], ...{|T|7|}[number][]]'. +!!! annotated symbol 0 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 1 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 2 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 3 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 4 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 5 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 6 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 +!!! annotated symbol 7 tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts:49:13 } declare function f5(f: (...args: T) => U): (...args: T) => U; diff --git a/tests/baselines/reference/restTypeRetainsMappyness.errors.txt b/tests/baselines/reference/restTypeRetainsMappyness.errors.txt index 26cc5db846d5e..6f44d7223fedc 100644 --- a/tests/baselines/reference/restTypeRetainsMappyness.errors.txt +++ b/tests/baselines/reference/restTypeRetainsMappyness.errors.txt @@ -10,6 +10,10 @@ tests/cases/compiler/restTypeRetainsMappyness.ts(7,8): error TS2345: Argument of const arr: Foo = {} as any fn(...arr) // Error: Argument of type 'any[]' is not assignable to parameter of type 'Foo' ~~~~~~ -!!! error TS2345: Argument of type 'Foo[number][]' is not assignable to parameter of type 'Foo'. +!!! error TS2345: Argument of type '{|Foo|0|}<{|T|1|}>[number][]' is not assignable to parameter of type '{|Foo|2|}<{|T|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/restTypeRetainsMappyness.ts:1:6 +!!! annotated symbol 1 tests/cases/compiler/restTypeRetainsMappyness.ts:5:15 +!!! annotated symbol 2 tests/cases/compiler/restTypeRetainsMappyness.ts:1:6 +!!! annotated symbol 3 tests/cases/compiler/restTypeRetainsMappyness.ts:5:15 } \ No newline at end of file diff --git a/tests/baselines/reference/returnInConstructor1.errors.txt b/tests/baselines/reference/returnInConstructor1.errors.txt index 4bb776dc4a5f8..4295f8c368939 100644 --- a/tests/baselines/reference/returnInConstructor1.errors.txt +++ b/tests/baselines/reference/returnInConstructor1.errors.txt @@ -23,7 +23,8 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of constructor() { return 1; // error ~~~~~~~~~ -!!! error TS2322: Type '1' is not assignable to type 'B'. +!!! error TS2322: Type '1' is not assignable to type '{|B|0|}'. +!!! annotated symbol 0 tests/cases/compiler/returnInConstructor1.ts:8:7 ~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } @@ -41,7 +42,8 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of constructor() { return "test"; // error ~~~~~~~~~~~~~~ -!!! error TS2322: Type '"test"' is not assignable to type 'D'. +!!! error TS2322: Type '"test"' is not assignable to type '{|D|0|}'. +!!! annotated symbol 0 tests/cases/compiler/returnInConstructor1.ts:22:7 ~~~~~~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } @@ -80,9 +82,11 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of super(); return new G(); //error ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'G' is not assignable to type 'H'. +!!! error TS2322: Type '{|G|0|}' is not assignable to type '{|H|1|}'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '() => void' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/returnInConstructor1.ts:43:7 +!!! annotated symbol 1 tests/cases/compiler/returnInConstructor1.ts:52:7 ~~~~~~~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } diff --git a/tests/baselines/reference/scopeTests.errors.txt b/tests/baselines/reference/scopeTests.errors.txt index ce24301efc2bf..1592e964e7e23 100644 --- a/tests/baselines/reference/scopeTests.errors.txt +++ b/tests/baselines/reference/scopeTests.errors.txt @@ -6,8 +6,10 @@ tests/cases/compiler/scopeTests.ts(2,7): error TS2415: Class 'D' incorrectly ext class C { private v; public p; static s; } class D extends C { ~ -!!! error TS2415: Class 'D' incorrectly extends base class 'C'. +!!! error TS2415: Class '{|D|0|}' incorrectly extends base class '{|C|1|}'. !!! error TS2415: Property 'v' is private in type 'C' but not in type 'D'. +!!! annotated symbol 0 tests/cases/compiler/scopeTests.ts:2:7 +!!! annotated symbol 1 tests/cases/compiler/scopeTests.ts:1:7 public v: number; public p: number constructor() { diff --git a/tests/baselines/reference/shadowPrivateMembers.errors.txt b/tests/baselines/reference/shadowPrivateMembers.errors.txt index 2196224b7c43e..84be9af84c686 100644 --- a/tests/baselines/reference/shadowPrivateMembers.errors.txt +++ b/tests/baselines/reference/shadowPrivateMembers.errors.txt @@ -6,6 +6,8 @@ tests/cases/compiler/shadowPrivateMembers.ts(2,7): error TS2415: Class 'derived' class base { private n() {} } class derived extends base { private n() {} } ~~~~~~~ -!!! error TS2415: Class 'derived' incorrectly extends base class 'base'. +!!! error TS2415: Class '{|derived|0|}' incorrectly extends base class '{|base|1|}'. !!! error TS2415: Types have separate declarations of a private property 'n'. +!!! annotated symbol 0 tests/cases/compiler/shadowPrivateMembers.ts:2:7 +!!! annotated symbol 1 tests/cases/compiler/shadowPrivateMembers.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt index c22071d4b758f..354a81e1add33 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt @@ -127,9 +127,11 @@ tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(111,14): err ~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. ~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type '{ {|x|1|}: string; }'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts:85:26 +!!! annotated symbol 1 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts:84:24 ~ !!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6500 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts:84:24: The expected type comes from property 'x' which is declared here on type '{ x: string; }' diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt index 48ce3922c475b..8e5417c41c08c 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt @@ -127,9 +127,11 @@ tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(111,14): ~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. ~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type '{ {|x|1|}: string; }'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts:85:26 +!!! annotated symbol 1 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts:84:24 ~ !!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6500 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts:84:24: The expected type comes from property 'x' which is declared here on type '{ x: string; }' diff --git a/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.errors.txt b/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.errors.txt index b138f3dbe0d3d..0ed0762f05081 100644 --- a/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.errors.txt +++ b/tests/baselines/reference/spellingSuggestionLeadingUnderscores01.errors.txt @@ -22,8 +22,10 @@ tests/cases/compiler/spellingSuggestionLeadingUnderscores01.ts(14,5): error TS23 b = { ___foo: 100, ~~~~~~~~~~~ -!!! error TS2322: Type '{ ___foo: number; }' is not assignable to type '{ __foo: number; }'. +!!! error TS2322: Type '{ {|___foo|0|}: number; }' is not assignable to type '{ {|__foo|1|}: number; }'. !!! error TS2322: Object literal may only specify known properties, but '___foo' does not exist in type '{ __foo: number; }'. Did you mean to write '__foo'? +!!! annotated symbol 0 tests/cases/compiler/spellingSuggestionLeadingUnderscores01.ts:14:5 +!!! annotated symbol 1 tests/cases/compiler/spellingSuggestionLeadingUnderscores01.ts:10:5 } \ No newline at end of file diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt index f8847c51a4f11..a16c9b128ce90 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt @@ -18,24 +18,32 @@ tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment. var a: A = new B(); a = new C(); // error prop is missing ~ -!!! error TS2741: Property 'prop' is missing in type 'C' but required in type 'A'. +!!! error TS2741: Property 'prop' is missing in type '{|C|0|}' but required in type '{|A|1|}'. !!! related TS2728 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:2:5: 'prop' is declared here. +!!! annotated symbol 0 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:1:11 a = B; // error prop is missing ~ -!!! error TS2741: Property 'prop' is missing in type 'typeof B' but required in type 'A'. +!!! error TS2741: Property 'prop' is missing in type 'typeof {|B|0|}' but required in type '{|A|1|}'. !!! related TS2728 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:2:5: 'prop' is declared here. !!! related TS6213 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:13:5: Did you mean to use 'new' with this expression? +!!! annotated symbol 0 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:1:11 a = C; var b: B = new C(); // error prop is missing ~ -!!! error TS2741: Property 'prop' is missing in type 'C' but required in type 'B'. +!!! error TS2741: Property 'prop' is missing in type '{|C|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:5:12: 'prop' is declared here. +!!! annotated symbol 0 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:7:7 +!!! annotated symbol 1 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:4:7 b = B; // error prop is missing ~ -!!! error TS2741: Property 'prop' is missing in type 'typeof B' but required in type 'B'. +!!! error TS2741: Property 'prop' is missing in type 'typeof {|B|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:5:12: 'prop' is declared here. !!! related TS6213 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:17:5: Did you mean to use 'new' with this expression? +!!! annotated symbol 0 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:4:7 +!!! annotated symbol 1 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:4:7 b = C; b = a; diff --git a/tests/baselines/reference/strictBindCallApply1.errors.txt b/tests/baselines/reference/strictBindCallApply1.errors.txt index 7b13d5e3181c7..3a55e4360aa1a 100644 --- a/tests/baselines/reference/strictBindCallApply1.errors.txt +++ b/tests/baselines/reference/strictBindCallApply1.errors.txt @@ -90,7 +90,8 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: !!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. let f14 = c.foo.bind(undefined); // Error ~~~~~~~~~ -!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/functions/strictBindCallApply1.ts:26:7 let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded let f16 = c.generic.bind(c); // typeof C.prototype.generic @@ -107,7 +108,8 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: !!! error TS2554: Expected 3 arguments, but got 4. let c14 = c.foo.call(undefined, 10, "hello"); // Error ~~~~~~~~~ -!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/functions/strictBindCallApply1.ts:26:7 let a10 = c.foo.apply(c, [10, "hello"]); let a11 = c.foo.apply(c, [10]); // Error @@ -121,7 +123,8 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: !!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. let a14 = c.foo.apply(undefined, [10, "hello"]); // Error ~~~~~~~~~ -!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{|C|0|}'. +!!! annotated symbol 0 tests/cases/conformance/functions/strictBindCallApply1.ts:26:7 let f20 = C.bind(undefined); let f21 = C.bind(undefined, 10); diff --git a/tests/baselines/reference/strictFunctionTypesErrors.errors.txt b/tests/baselines/reference/strictFunctionTypesErrors.errors.txt index 3ff04c44fb75b..d1be524d102c5 100644 --- a/tests/baselines/reference/strictFunctionTypesErrors.errors.txt +++ b/tests/baselines/reference/strictFunctionTypesErrors.errors.txt @@ -98,29 +98,45 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c f1 = f2; // Ok f1 = f3; // Error ~~ -!!! error TS2322: Type '(x: string) => Object' is not assignable to type '(x: Object) => Object'. +!!! error TS2322: Type '(x: string) => {|Object|0|}' is not assignable to type '(x: {|Object|1|}) => {|Object|2|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Object|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 f1 = f4; // Error ~~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: Object) => Object'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: {|Object|0|}) => {|Object|1|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Object|2|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 f2 = f1; // Error ~~ -!!! error TS2322: Type '(x: Object) => Object' is not assignable to type '(x: Object) => string'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '(x: {|Object|0|}) => {|Object|1|}' is not assignable to type '(x: {|Object|2|}) => string'. +!!! error TS2322: Type '{|Object|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 f2 = f3; // Error ~~ -!!! error TS2322: Type '(x: string) => Object' is not assignable to type '(x: Object) => string'. +!!! error TS2322: Type '(x: string) => {|Object|0|}' is not assignable to type '(x: {|Object|1|}) => string'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Object|2|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 f2 = f4; // Error ~~ -!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: Object) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: {|Object|0|}) => string'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Object|1|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 f3 = f1; // Ok f3 = f2; // Ok @@ -128,13 +144,18 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c f4 = f1; // Error ~~ -!!! error TS2322: Type '(x: Object) => Object' is not assignable to type '(x: string) => string'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '(x: {|Object|0|}) => {|Object|1|}' is not assignable to type '(x: string) => string'. +!!! error TS2322: Type '{|Object|2|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 f4 = f2; // Ok f4 = f3; // Error ~~ -!!! error TS2322: Type '(x: string) => Object' is not assignable to type '(x: string) => string'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '(x: string) => {|Object|0|}' is not assignable to type '(x: string) => string'. +!!! error TS2322: Type '{|Object|1|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 type Func = (x: T) => U; @@ -146,25 +167,51 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c g1 = g2; // Ok g1 = g3; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}' is not assignable to type '{|Func|2|}<{|Object|3|}, {|Object|4|}>'. +!!! error TS2322: Type '{|Object|5|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 g1 = g4; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}' is not assignable to type '{|Func|1|}<{|Object|2|}, {|Object|3|}>'. +!!! error TS2322: Type '{|Object|4|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 g2 = g1; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}<{|Object|1|}, {|Object|2|}>' is not assignable to type '{|Func|3|}<{|Object|4|}, string>'. +!!! error TS2322: Type '{|Object|5|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 g2 = g3; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}' is not assignable to type '{|Func|2|}<{|Object|3|}, string>'. +!!! error TS2322: Type '{|Object|4|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 g2 = g4; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}' is not assignable to type '{|Func|1|}<{|Object|2|}, string>'. +!!! error TS2322: Type '{|Object|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 g3 = g1; // Ok g3 = g2; // Ok @@ -172,13 +219,22 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c g4 = g1; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}<{|Object|1|}, {|Object|2|}>' is not assignable to type '{|Func|3|}'. +!!! error TS2322: Type '{|Object|4|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 g4 = g2; // Ok g4 = g3; // Error ~~ -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}' is not assignable to type '{|Func|2|}'. +!!! error TS2322: Type '{|Object|3|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 declare let h1: Func, Object>; declare let h2: Func, string>; @@ -191,37 +247,95 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c h2 = h1; // Error ~~ -!!! error TS2322: Type 'Func, Object>' is not assignable to type 'Func, string>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}<{|Object|2|}, void>, {|Object|3|}>' is not assignable to type '{|Func|4|}<{|Func|5|}<{|Object|6|}, void>, string>'. +!!! error TS2322: Type '{|Object|7|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:120:11 h2 = h3; // Error ~~ -!!! error TS2322: Type 'Func, Object>' is not assignable to type 'Func, string>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}, {|Object|2|}>' is not assignable to type '{|Func|3|}<{|Func|4|}<{|Object|5|}, void>, string>'. +!!! error TS2322: Type '{|Object|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 h2 = h4; // Ok h3 = h1; // Error ~~ -!!! error TS2322: Type 'Func, Object>' is not assignable to type 'Func, Object>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}<{|Object|2|}, void>, {|Object|3|}>' is not assignable to type '{|Func|4|}<{|Func|5|}, {|Object|6|}>'. +!!! error TS2322: Type '{|Func|7|}' is not assignable to type '{|Func|8|}<{|Object|9|}, void>'. +!!! error TS2322: Type '{|Object|10|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 7 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 8 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:120:11 h3 = h2; // Error ~~ -!!! error TS2322: Type 'Func, string>' is not assignable to type 'Func, Object>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}<{|Object|2|}, void>, string>' is not assignable to type '{|Func|3|}<{|Func|4|}, {|Object|5|}>'. +!!! error TS2322: Type '{|Func|6|}' is not assignable to type '{|Func|7|}<{|Object|8|}, void>'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 6 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 7 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:120:11 h3 = h4; // Ok h4 = h1; // Error ~~ -!!! error TS2322: Type 'Func, Object>' is not assignable to type 'Func, string>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}<{|Object|2|}, void>, {|Object|3|}>' is not assignable to type '{|Func|4|}<{|Func|5|}, string>'. +!!! error TS2322: Type '{|Func|6|}' is not assignable to type '{|Func|7|}<{|Object|8|}, void>'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 7 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:120:11 h4 = h2; // Error ~~ -!!! error TS2322: Type 'Func, string>' is not assignable to type 'Func, string>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}<{|Object|2|}, void>, string>' is not assignable to type '{|Func|3|}<{|Func|4|}, string>'. +!!! error TS2322: Type '{|Func|5|}' is not assignable to type '{|Func|6|}<{|Object|7|}, void>'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:120:11 h4 = h3; // Error ~~ -!!! error TS2322: Type 'Func, Object>' is not assignable to type 'Func, string>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}<{|Func|1|}, {|Object|2|}>' is not assignable to type '{|Func|3|}<{|Func|4|}, string>'. +!!! error TS2322: Type '{|Object|5|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 declare let i1: Func>; declare let i2: Func>; @@ -230,36 +344,91 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c i1 = i2; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. +!!! error TS2322: Type '{|Func|0|}<{|Object|1|}, {|Func|2|}>' is not assignable to type '{|Func|3|}<{|Object|4|}, {|Func|5|}<{|Object|6|}, void>>'. +!!! error TS2322: Type '{|Func|7|}' is not assignable to type '{|Func|8|}<{|Object|9|}, void>'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 7 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 8 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 9 /.ts/lib.es5.d.ts:120:11 i1 = i3; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}>' is not assignable to type '{|Func|3|}<{|Object|4|}, {|Func|5|}<{|Object|6|}, void>>'. +!!! error TS2322: Type '{|Object|7|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:120:11 i1 = i4; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}>' is not assignable to type '{|Func|2|}<{|Object|3|}, {|Func|4|}<{|Object|5|}, void>>'. +!!! error TS2322: Type '{|Object|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 i2 = i1; // Ok i2 = i3; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}>' is not assignable to type '{|Func|3|}<{|Object|4|}, {|Func|5|}>'. +!!! error TS2322: Type '{|Object|6|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 i2 = i4; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Func|0|}>' is not assignable to type '{|Func|2|}<{|Object|3|}, {|Func|4|}>'. +!!! error TS2322: Type '{|Object|5|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 i3 = i1; // Ok i3 = i2; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. +!!! error TS2322: Type '{|Func|0|}<{|Object|1|}, {|Func|2|}>' is not assignable to type '{|Func|3|}>'. +!!! error TS2322: Type '{|Func|6|}' is not assignable to type '{|Func|7|}<{|Object|8|}, void>'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 6 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 7 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:120:11 i3 = i4; // Error ~~ -!!! error TS2322: Type 'Func>' is not assignable to type 'Func>'. -!!! error TS2322: Type 'Func' is not assignable to type 'Func'. +!!! error TS2322: Type '{|Func|0|}>' is not assignable to type '{|Func|2|}>'. +!!! error TS2322: Type '{|Func|5|}' is not assignable to type '{|Func|6|}<{|Object|7|}, void>'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 4 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 6 tests/cases/compiler/strictFunctionTypesErrors.ts:25:6 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:120:11 i4 = i1; // Ok i4 = i2; // Ok @@ -288,9 +457,15 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c animalComparer2 = dogComparer2; // Error ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Comparer2' is not assignable to type 'Comparer2'. -!!! error TS2322: Property 'dog' is missing in type 'Animal' but required in type 'Dog'. +!!! error TS2322: Type '{|Comparer2|0|}<{|Dog|1|}>' is not assignable to type '{|Comparer2|2|}<{|Animal|3|}>'. +!!! error TS2322: Property 'dog' is missing in type '{|Animal|4|}' but required in type '{|Dog|5|}'. !!! related TS2728 tests/cases/compiler/strictFunctionTypesErrors.ts:91:32: 'dog' is declared here. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:104:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:104:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 dogComparer2 = animalComparer2; // Ok // Crate is invariant in --strictFunctionTypes mode @@ -307,16 +482,30 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c animalCrate = dogCrate; // Error ~~~~~~~~~~~ -!!! error TS2322: Type 'Crate' is not assignable to type 'Crate'. +!!! error TS2322: Type '{|Crate|0|}<{|Dog|1|}>' is not assignable to type '{|Crate|2|}<{|Animal|3|}>'. !!! error TS2322: Types of property 'onSetItem' are incompatible. -!!! error TS2322: Type '(item: Dog) => void' is not assignable to type '(item: Animal) => void'. +!!! error TS2322: Type '(item: {|Dog|4|}) => void' is not assignable to type '(item: {|Animal|5|}) => void'. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Type '{|Animal|6|}' is not assignable to type '{|Dog|7|}'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:116:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:116:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 6 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 7 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 dogCrate = animalCrate; // Error ~~~~~~~~ -!!! error TS2322: Type 'Crate' is not assignable to type 'Crate'. +!!! error TS2322: Type '{|Crate|0|}<{|Animal|1|}>' is not assignable to type '{|Crate|2|}<{|Dog|3|}>'. !!! error TS2322: Types of property 'item' are incompatible. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Type '{|Animal|4|}' is not assignable to type '{|Dog|5|}'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:116:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:116:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 // Verify that callback parameters are strictly checked @@ -324,15 +513,27 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c declare let fc2: (f: (x: Dog) => Dog) => void; fc1 = fc2; // Error ~~~ -!!! error TS2322: Type '(f: (x: Dog) => Dog) => void' is not assignable to type '(f: (x: Animal) => Animal) => void'. +!!! error TS2322: Type '(f: (x: {|Dog|0|}) => {|Dog|1|}) => void' is not assignable to type '(f: (x: {|Animal|2|}) => {|Animal|3|}) => void'. !!! error TS2322: Types of parameters 'f' and 'f' are incompatible. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Type '{|Animal|4|}' is not assignable to type '{|Dog|5|}'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 fc2 = fc1; // Error ~~~ -!!! error TS2322: Type '(f: (x: Animal) => Animal) => void' is not assignable to type '(f: (x: Dog) => Dog) => void'. +!!! error TS2322: Type '(f: (x: {|Animal|0|}) => {|Animal|1|}) => void' is not assignable to type '(f: (x: {|Dog|2|}) => {|Dog|3|}) => void'. !!! error TS2322: Types of parameters 'f' and 'f' are incompatible. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Type '{|Animal|4|}' is not assignable to type '{|Dog|5|}'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 // Verify that callback parameters aren't loosely checked when types // originate in method declarations @@ -347,10 +548,16 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c f1 = f2; f2 = f1; // Error ~~ -!!! error TS2322: Type '(cb: (x: Animal) => Animal) => void' is not assignable to type '(cb: (x: Dog) => Animal) => void'. +!!! error TS2322: Type '(cb: (x: {|Animal|0|}) => {|Animal|1|}) => void' is not assignable to type '(cb: (x: {|Dog|2|}) => {|Animal|3|}) => void'. !!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Type '{|Animal|4|}' is not assignable to type '{|Dog|5|}'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 } namespace n2 { @@ -360,8 +567,14 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c f1 = f2; f2 = f1; // Error ~~ -!!! error TS2322: Type '(cb: (x: Animal) => Animal) => void' is not assignable to type '(cb: (x: Dog) => Animal) => void'. +!!! error TS2322: Type '(cb: (x: {|Animal|0|}) => {|Animal|1|}) => void' is not assignable to type '(cb: (x: {|Dog|2|}) => {|Animal|3|}) => void'. !!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Type '{|Animal|4|}' is not assignable to type '{|Dog|5|}'. +!!! annotated symbol 0 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 1 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 2 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 +!!! annotated symbol 3 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 4 tests/cases/compiler/strictFunctionTypesErrors.ts:90:11 +!!! annotated symbol 5 tests/cases/compiler/strictFunctionTypesErrors.ts:91:11 } \ No newline at end of file diff --git a/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt b/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt index 5c4fb98067678..815efcff7a59a 100644 --- a/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt +++ b/tests/baselines/reference/stringEnumLiteralTypes3.errors.txt @@ -27,14 +27,22 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T a = a; a = b; ~ -!!! error TS2322: Type 'YesNo' is not assignable to type 'Choice.Yes'. -!!! error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|YesNo|0|}' is not assignable to type '{|Choice|1|}.Yes'. +!!! error TS2322: Type '{|Choice|2|}.No' is not assignable to type '{|Choice|3|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:4:6 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 2 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 3 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 a = c; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 a = d; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 } function f2(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { @@ -42,10 +50,14 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T b = b; b = c; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'YesNo'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:4:6 b = d; ~ -!!! error TS2322: Type 'Choice' is not assignable to type 'YesNo'. +!!! error TS2322: Type '{|Choice|0|}' is not assignable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:4:6 } function f3(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { @@ -65,14 +77,20 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T function f5(a: Yes, b: YesNo, c: UnknownYesNo, d: Choice) { a = Choice.Unknown; ~ -!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}.Unknown' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 a = Choice.Yes; a = Choice.No; ~ -!!! error TS2322: Type 'Choice.No' is not assignable to type 'Choice.Yes'. +!!! error TS2322: Type '{|Choice|0|}.No' is not assignable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 b = Choice.Unknown; ~ -!!! error TS2322: Type 'Choice.Unknown' is not assignable to type 'YesNo'. +!!! error TS2322: Type '{|Choice|0|}.Unknown' is not assignable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:4:6 b = Choice.Yes; b = Choice.No; c = Choice.Unknown; @@ -127,11 +145,15 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T switch (x) { case Choice.Unknown: return x; ~~~~~~~~~~~~~~ -!!! error TS2678: Type 'Choice.Unknown' is not comparable to type 'Choice.Yes'. +!!! error TS2678: Type '{|Choice|0|}.Unknown' is not comparable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 case Choice.Yes: return x; case Choice.No: return x; ~~~~~~~~~ -!!! error TS2678: Type 'Choice.No' is not comparable to type 'Choice.Yes'. +!!! error TS2678: Type '{|Choice|0|}.No' is not comparable to type '{|Choice|1|}.Yes'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 } return x; } @@ -140,7 +162,9 @@ tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts(96,14): error T switch (x) { case Choice.Unknown: return x; ~~~~~~~~~~~~~~ -!!! error TS2678: Type 'Choice.Unknown' is not comparable to type 'YesNo'. +!!! error TS2678: Type '{|Choice|0|}.Unknown' is not comparable to type '{|YesNo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:1:12 +!!! annotated symbol 1 tests/cases/conformance/types/literal/stringEnumLiteralTypes3.ts:4:6 case Choice.Yes: return x; case Choice.No: return x; } diff --git a/tests/baselines/reference/stringIndexerAssignments1.errors.txt b/tests/baselines/reference/stringIndexerAssignments1.errors.txt index ac99b239779af..e1243a82f5a56 100644 --- a/tests/baselines/reference/stringIndexerAssignments1.errors.txt +++ b/tests/baselines/reference/stringIndexerAssignments1.errors.txt @@ -10,7 +10,10 @@ tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2322: Type '{ on x = a; x = b; // error ~ -!!! error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [index: string]: string; one: string; }'. +!!! error TS2322: Type '{ {|one|0|}: number; {|two|1|}: string; }' is not assignable to type '{ [index: string]: string; {|one|2|}: string; }'. !!! error TS2322: Types of property 'one' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/stringIndexerAssignments1.ts:3:10 +!!! annotated symbol 1 tests/cases/compiler/stringIndexerAssignments1.ts:3:23 +!!! annotated symbol 2 tests/cases/compiler/stringIndexerAssignments1.ts:1:35 \ No newline at end of file diff --git a/tests/baselines/reference/stringIndexerAssignments2.errors.txt b/tests/baselines/reference/stringIndexerAssignments2.errors.txt index 256a9820a0c44..7b39bebee520c 100644 --- a/tests/baselines/reference/stringIndexerAssignments2.errors.txt +++ b/tests/baselines/reference/stringIndexerAssignments2.errors.txt @@ -26,10 +26,14 @@ tests/cases/compiler/stringIndexerAssignments2.ts(20,1): error TS2322: Type 'C3' x = a; ~ -!!! error TS2322: Type 'C2' is not assignable to type 'C1'. +!!! error TS2322: Type '{|C2|0|}' is not assignable to type '{|C1|1|}'. !!! error TS2322: Index signature is missing in type 'C2'. +!!! annotated symbol 0 tests/cases/compiler/stringIndexerAssignments2.ts:6:7 +!!! annotated symbol 1 tests/cases/compiler/stringIndexerAssignments2.ts:1:7 x = b; ~ -!!! error TS2322: Type 'C3' is not assignable to type 'C1'. +!!! error TS2322: Type '{|C3|0|}' is not assignable to type '{|C1|1|}'. !!! error TS2322: Types of property 'one' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/stringIndexerAssignments2.ts:10:7 +!!! annotated symbol 1 tests/cases/compiler/stringIndexerAssignments2.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt index 00fc13f186eec..c4d6436eb7bd2 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt @@ -186,8 +186,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon !!! related TS6501 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts:78:10: The expected type comes from this index signature. f: null, ~ -!!! error TS2322: Type 'MyString' is not assignable to type 'string'. +!!! error TS2322: Type '{|MyString|0|}' is not assignable to type 'string'. !!! related TS6501 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts:78:10: The expected type comes from this index signature. +!!! annotated symbol 0 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts:3:11 get X() { ~ diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt index 8923b04d51fc7..2ec45a6452026 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt @@ -59,12 +59,16 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon var b: { [x: string]: A } = { a: A, ~ -!!! error TS2741: Property 'foo' is missing in type 'typeof A' but required in type 'A'. +!!! error TS2741: Property 'foo' is missing in type 'typeof {|A|0|}' but required in type '{|A|1|}'. !!! related TS2728 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:4:5: 'foo' is declared here. !!! related TS6213 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:37:8: Did you mean to use 'new' with this expression? +!!! annotated symbol 0 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:3:7 b: B ~ -!!! error TS2741: Property 'foo' is missing in type 'typeof B' but required in type 'A'. +!!! error TS2741: Property 'foo' is missing in type 'typeof {|B|0|}' but required in type '{|A|1|}'. !!! related TS2728 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:4:5: 'foo' is declared here. !!! related TS6213 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:38:8: Did you mean to use 'new' with this expression? +!!! annotated symbol 0 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:7:7 +!!! annotated symbol 1 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:3:7 } \ No newline at end of file diff --git a/tests/baselines/reference/subtypesOfTypeParameter.errors.txt b/tests/baselines/reference/subtypesOfTypeParameter.errors.txt index 0ec8951fe9391..c7557fe5f68cb 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameter.errors.txt @@ -14,8 +14,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf foo: U; // error ~~~ !!! error TS2416: Property 'foo' in type 'D1' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts:7:13 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts:7:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts:7:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts:7:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts:7:10 } function f1(x: T, y: U) { diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt index 5fe0186e04a1b..83acbac6e1f6a 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.errors.txt @@ -74,8 +74,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D3' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:17:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:17:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:17:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:17:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:17:10 } class D4 extends C3 { @@ -111,10 +116,20 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D8' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. -!!! error TS2416: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '{|V|5|}' is not assignable to type '{|T|6|}'. +!!! error TS2416: '{|V|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:23 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:23 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:36 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:10 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:36 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:10 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:48:10 } class D9 extends C3 { @@ -136,8 +151,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D11' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. -!!! error TS2416: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|V|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:65:37 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:65:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:65:37 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:65:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:65:11 } class D12 extends C3 { @@ -147,8 +167,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D12' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'V' is not assignable to type 'U'. -!!! error TS2416: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2416: '{|V|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:70:37 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:70:24 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:70:37 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:70:24 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:70:24 } class D13 extends C3 { @@ -193,12 +218,30 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D19' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. -!!! error TS2416: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2416: Type 'Date' is not assignable to type 'T'. -!!! error TS2416: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2416: Type '{|V|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2416: '{|V|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! error TS2416: Type '{|Date|12|}' is not assignable to type '{|T|13|}'. +!!! error TS2416: '{|Date|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{|Date|17|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:24 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:37 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:37 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:110:11 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:729:11 } class D20 extends C3 { @@ -225,10 +268,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D23' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. -!!! error TS2416: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2416: Type 'Date' is not assignable to type 'T'. -!!! error TS2416: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|V|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2416: Type '{|Date|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2416: '{|Date|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:37 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:37 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:11 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:11 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:132:11 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 } class D24 extends C3 { @@ -238,10 +293,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D24' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'V' is not assignable to type 'U'. -!!! error TS2416: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2416: Type 'Date' is not assignable to type 'U'. -!!! error TS2416: 'Date' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2416: '{|V|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2416: Type '{|Date|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2416: '{|Date|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:37 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:24 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:37 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:24 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:24 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:24 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:24 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:137:24 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 } class D25 extends C3 { @@ -263,8 +330,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'Date' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D27' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'Date' is not assignable to type 'T'. -!!! error TS2416: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2416: Type '{|Date|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|Date|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:154:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:154:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:154:11 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 } class D28 extends C3 { @@ -274,8 +347,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'Date' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D28' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'Date' is not assignable to type 'U'. -!!! error TS2416: 'Date' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2416: Type '{|Date|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2416: '{|Date|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:159:24 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:159:24 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:159:24 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 } class D29 extends C3 { @@ -285,6 +364,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'Date' is not assignable to string index type 'V'. ~~~ !!! error TS2416: Property 'foo' in type 'D29' is not assignable to the same property in base type 'C3'. -!!! error TS2416: Type 'Date' is not assignable to type 'V'. -!!! error TS2416: 'Date' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2416: Type '{|Date|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2416: '{|Date|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:164:37 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:164:37 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints.ts:164:37 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 } \ No newline at end of file diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt index 03656c08c4ef2..06fab6731b351 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.errors.txt @@ -73,7 +73,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'Foo'. ~~~ !!! error TS2416: Property 'foo' in type 'D3' is not assignable to the same property in base type 'B1'. -!!! error TS2416: Type 'V' is not assignable to type 'Foo'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|Foo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:45:40 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 } class D4 extends B1 { @@ -88,10 +90,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D5' is not assignable to the same property in base type 'B1'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'T'. -!!! error TS2416: 'Foo' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Foo'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Foo|5|}'. +!!! error TS2416: Type '{|Foo|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2416: '{|Foo|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Foo|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:25 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:10 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:25 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:10 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:10 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:10 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:10 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:55:10 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 } class D6 extends B1 { @@ -101,7 +115,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D6' is not assignable to the same property in base type 'B1'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:60:40 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:60:10 } class D7 extends B1 { @@ -111,10 +127,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D7' is not assignable to the same property in base type 'B1'. -!!! error TS2416: Type 'T' is not assignable to type 'U'. -!!! error TS2416: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'U'. -!!! error TS2416: 'Foo' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Foo'. +!!! error TS2416: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2416: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Foo|5|}'. +!!! error TS2416: Type '{|Foo|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2416: '{|Foo|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|Foo|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:10 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:25 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:10 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:25 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:25 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:25 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:25 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:65:25 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:3:7 } class D8 extends B1 { @@ -129,5 +157,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D9' is not assignable to the same property in base type 'B1'. -!!! error TS2416: Type 'V' is not assignable to type 'U'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:75:40 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints4.ts:75:25 } \ No newline at end of file diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt index 700076db4d190..6f993a40f3e84 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.errors.txt @@ -133,8 +133,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D2' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: Type 'Foo' is not assignable to type 'T'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: Type '{|Foo|2|}<{|T|3|}>' is not assignable to type '{|T|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:66:32 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:66:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:66:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:66:14 } class D3, U extends Foo, V extends Foo> extends Base { @@ -144,8 +149,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D3' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. -!!! error TS2416: Type 'Foo' is not assignable to type 'T'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2416: Type '{|Foo|2|}<{|V|3|}>' is not assignable to type '{|T|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:71:50 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:71:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:71:50 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:71:14 } class D4, U extends Foo, V extends Foo> extends Base { @@ -155,8 +165,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D4' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'T' is not assignable to type 'U'. -!!! error TS2416: Type 'Foo' is not assignable to type 'U'. +!!! error TS2416: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2416: Type '{|Foo|2|}<{|U|3|}>' is not assignable to type '{|U|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:76:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:76:32 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:76:32 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:76:32 } class D5, U extends Foo, V extends Foo> extends Base { @@ -171,8 +186,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D6' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'V' is not assignable to type 'U'. -!!! error TS2416: Type 'Foo' is not assignable to type 'U'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2416: Type '{|Foo|2|}<{|V|3|}>' is not assignable to type '{|U|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:86:50 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:86:32 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:86:50 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:86:32 } class D7, U extends Foo, V extends Foo> extends Base { @@ -182,8 +202,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'V'. ~~~ !!! error TS2416: Property 'foo' in type 'D7' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'T' is not assignable to type 'V'. -!!! error TS2416: Type 'Foo' is not assignable to type 'V'. +!!! error TS2416: Type '{|T|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2416: Type '{|Foo|2|}<{|U|3|}>' is not assignable to type '{|V|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:91:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:91:50 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:91:32 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:91:50 } class D8, U extends Foo, V extends Foo> extends Base { @@ -193,8 +218,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'V'. ~~~ !!! error TS2416: Property 'foo' in type 'D8' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type 'U' is not assignable to type 'V'. -!!! error TS2416: Type 'Foo' is not assignable to type 'V'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2416: Type '{|Foo|2|}<{|T|3|}>' is not assignable to type '{|V|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:96:32 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:96:50 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:96:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:96:50 } class D9, U extends Foo, V extends Foo> extends Base { @@ -214,10 +244,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf foo: T ~~~ !!! error TS2416: Property 'foo' in type 'D1' is not assignable to the same property in base type 'Base2'. -!!! error TS2416: Type 'T' is not assignable to type 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2416: Type 'U' is not assignable to type 'T'. -!!! error TS2416: Type 'Foo' is not assignable to type 'T'. +!!! error TS2416: Type '{|T|0|}' is not assignable to type '{|Foo|1|}<{|T|2|}>'. +!!! error TS2416: Type '{|Foo|3|}<{|U|4|}>' is not assignable to type '{|Foo|5|}<{|T|6|}>'. +!!! error TS2416: Type '{|U|7|}' is not assignable to type '{|T|8|}'. +!!! error TS2416: Type '{|Foo|9|}<{|T|10|}>' is not assignable to type '{|T|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:32 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:32 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:113:14 } class D2, U extends Foo, V extends Foo> extends Base2 { @@ -234,10 +276,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'T'. ~~~ !!! error TS2416: Property 'foo' in type 'D3' is not assignable to the same property in base type 'Base2'. -!!! error TS2416: Type 'V' is not assignable to type 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2416: Type 'V' is not assignable to type 'T'. -!!! error TS2416: Type 'Foo' is not assignable to type 'T'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|Foo|1|}<{|T|2|}>'. +!!! error TS2416: Type '{|Foo|3|}<{|V|4|}>' is not assignable to type '{|Foo|5|}<{|T|6|}>'. +!!! error TS2416: Type '{|V|7|}' is not assignable to type '{|T|8|}'. +!!! error TS2416: Type '{|Foo|9|}<{|V|10|}>' is not assignable to type '{|T|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:50 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:50 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:50 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:50 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:123:14 } class D4, U extends Foo, V extends Foo> extends Base2 { @@ -252,10 +306,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf foo: U ~~~ !!! error TS2416: Property 'foo' in type 'D5' is not assignable to the same property in base type 'Base2'. -!!! error TS2416: Type 'U' is not assignable to type 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2416: Type 'T' is not assignable to type 'U'. -!!! error TS2416: Type 'Foo' is not assignable to type 'U'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|Foo|1|}<{|U|2|}>'. +!!! error TS2416: Type '{|Foo|3|}<{|T|4|}>' is not assignable to type '{|Foo|5|}<{|U|6|}>'. +!!! error TS2416: Type '{|T|7|}' is not assignable to type '{|U|8|}'. +!!! error TS2416: Type '{|Foo|9|}<{|U|10|}>' is not assignable to type '{|U|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:32 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:32 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:32 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:32 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:32 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:133:32 } class D6, U extends Foo, V extends Foo> extends Base2 { @@ -265,10 +331,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'V' is not assignable to string index type 'U'. ~~~ !!! error TS2416: Property 'foo' in type 'D6' is not assignable to the same property in base type 'Base2'. -!!! error TS2416: Type 'V' is not assignable to type 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2416: Type 'V' is not assignable to type 'U'. -!!! error TS2416: Type 'Foo' is not assignable to type 'U'. +!!! error TS2416: Type '{|V|0|}' is not assignable to type '{|Foo|1|}<{|U|2|}>'. +!!! error TS2416: Type '{|Foo|3|}<{|V|4|}>' is not assignable to type '{|Foo|5|}<{|U|6|}>'. +!!! error TS2416: Type '{|V|7|}' is not assignable to type '{|U|8|}'. +!!! error TS2416: Type '{|Foo|9|}<{|V|10|}>' is not assignable to type '{|U|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:50 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:32 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:50 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:32 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:50 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:32 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:50 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:138:32 } class D7, U extends Foo, V extends Foo> extends Base2 { @@ -278,10 +356,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'T' is not assignable to string index type 'V'. ~~~ !!! error TS2416: Property 'foo' in type 'D7' is not assignable to the same property in base type 'Base2'. -!!! error TS2416: Type 'T' is not assignable to type 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2416: Type 'U' is not assignable to type 'V'. -!!! error TS2416: Type 'Foo' is not assignable to type 'V'. +!!! error TS2416: Type '{|T|0|}' is not assignable to type '{|Foo|1|}<{|V|2|}>'. +!!! error TS2416: Type '{|Foo|3|}<{|U|4|}>' is not assignable to type '{|Foo|5|}<{|V|6|}>'. +!!! error TS2416: Type '{|U|7|}' is not assignable to type '{|V|8|}'. +!!! error TS2416: Type '{|Foo|9|}<{|T|10|}>' is not assignable to type '{|V|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:50 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:32 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:50 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:32 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:50 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:143:50 } class D8, U extends Foo, V extends Foo> extends Base2 { @@ -291,10 +381,22 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf !!! error TS2411: Property 'foo' of type 'U' is not assignable to string index type 'V'. ~~~ !!! error TS2416: Property 'foo' in type 'D8' is not assignable to the same property in base type 'Base2'. -!!! error TS2416: Type 'U' is not assignable to type 'Foo'. -!!! error TS2416: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2416: Type 'T' is not assignable to type 'V'. -!!! error TS2416: Type 'Foo' is not assignable to type 'V'. +!!! error TS2416: Type '{|U|0|}' is not assignable to type '{|Foo|1|}<{|V|2|}>'. +!!! error TS2416: Type '{|Foo|3|}<{|T|4|}>' is not assignable to type '{|Foo|5|}<{|V|6|}>'. +!!! error TS2416: Type '{|T|7|}' is not assignable to type '{|V|8|}'. +!!! error TS2416: Type '{|Foo|9|}<{|U|10|}>' is not assignable to type '{|V|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:32 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:50 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:50 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:50 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:3:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:32 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts:148:50 } class D9, U extends Foo, V extends Foo> extends Base2 { diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt index b5d23da2241eb..2729fe68da989 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithOptionalParameters.errors.txt @@ -27,9 +27,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type '(x: number) => number' is not assignable to type '() => number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts:19:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts:3:11 a: (x: number) => number; // error, too many required params } @@ -61,9 +63,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. !!! error TS2430: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts:49:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts:3:11 a3: (x: number, y: number) => number; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt index 3d0e04bbfa795..ae1038d2908fa 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithRestParameters.errors.txt @@ -75,11 +75,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I1C extends Base { ~~~ -!!! error TS2430: Interface 'I1C' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I1C|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'. !!! error TS2430: Types of parameters 'args' and 'args' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:18:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a: (...args: string[]) => number; // error, type mismatch } @@ -97,11 +99,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3B extends Base { ~~~ -!!! error TS2430: Interface 'I3B' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I3B|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'. !!! error TS2430: Types of parameters 'x' and 'args' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:34:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a: (x?: string) => number; // error, incompatible type } @@ -129,11 +133,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I6C extends Base { ~~~ -!!! error TS2430: Interface 'I6C' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I6C|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. !!! error TS2430: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'args' and 'z' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:60:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a2: (x: number, ...args: string[]) => number; // error } @@ -165,41 +171,49 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10B extends Base { ~~~~ -!!! error TS2430: Interface 'I10B' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10B|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. !!! error TS2430: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'y' and 'y' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:90:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a3: (x: number, y?: number, z?: number) => number; // error } interface I10C extends Base { ~~~~ -!!! error TS2430: Interface 'I10C' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10C|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. !!! error TS2430: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'z' and 'y' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:94:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a3: (x: number, ...z: number[]) => number; // error } interface I10D extends Base { ~~~~ -!!! error TS2430: Interface 'I10D' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10D|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. !!! error TS2430: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:98:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a3: (x: string, y?: string, z?: string) => number; // error, incompatible types } interface I10E extends Base { ~~~~ -!!! error TS2430: Interface 'I10E' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10E|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. !!! error TS2430: Type '(x: number, ...z: string[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'z' and 'z' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:102:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a3: (x: number, ...z: string[]) => number; // error } @@ -209,11 +223,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I12 extends Base { ~~~ -!!! error TS2430: Interface 'I12' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I12|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a4' are incompatible. !!! error TS2430: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'y' and 'y' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:110:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a4: (x?: number, y?: number) => number; // error, type mismatch } @@ -223,11 +239,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I14 extends Base { ~~~ -!!! error TS2430: Interface 'I14' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I14|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a4' are incompatible. !!! error TS2430: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'y' and 'y' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:118:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a4: (x: number, y?: number) => number; // error, second param has type mismatch } @@ -237,21 +255,25 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I16 extends Base { ~~~ -!!! error TS2430: Interface 'I16' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I16|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a4' are incompatible. !!! error TS2430: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'args' and 'z' are incompatible. !!! error TS2430: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:126:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a4: (x: number, ...args: string[]) => number; // error, rest param has type mismatch } interface I17 extends Base { ~~~ -!!! error TS2430: Interface 'I17' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I17|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a4' are incompatible. !!! error TS2430: Type '(...args: number[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. !!! error TS2430: Types of parameters 'args' and 'y' are incompatible. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:130:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithRestParameters.ts:3:11 a4: (...args: number[]) => number; // error } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt index 7dfb078170a6d..0775133cdaeb7 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesWithSpecializedSignatures.errors.txt @@ -81,10 +81,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I2 extends Base2 { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I2|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type '(x: string) => string' is not assignable to type '{ (x: "a"): number; (x: string): number; }'. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:70:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:60:15 // N's a: (x: string) => string; // error because base returns non-void; } @@ -92,11 +94,21 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => string' is not assignable to type '(x: T) => T'. -!!! error TS2430: Type 'string' is not assignable to type 'T'. -!!! error TS2430: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '<{|T|2|}>(x: {|T|3|}) => string' is not assignable to type '<{|T|4|}>(x: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type 'string' is not assignable to type '{|T|7|}'. +!!! error TS2430: 'string' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:76:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:60:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:78:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:78:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:66:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:66:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:66:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:66:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:66:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts:66:14 // N's a2: (x: T) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.errors.txt b/tests/baselines/reference/subtypingWithConstructSignatures6.errors.txt index 2f314864f9886..6e7caaf606028 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.errors.txt +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.errors.txt @@ -75,84 +75,213 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I extends A { ~ -!!! error TS2430: Interface 'I' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => T[]'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}[]' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => {|T|7|}[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:13 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:12:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:12:13 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:12:13 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:12:13 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:13 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:12:13 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:13 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:24:13 a: new (x: T) => T[]; } interface I2 extends A { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => string[]'. +!!! error TS2430: Type 'new (x: {|T|3|}) => string[]' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}) => string[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:28:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:28:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:28:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:13:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:13:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:13:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:28:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:13:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:28:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:28:14 a2: new (x: T) => string[]; } interface I3 extends A { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new (x: T) => void'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => void'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:14:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:14:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:14:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:14:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:32:14 a3: new (x: T) => T; } interface I4 extends A { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I4|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type 'new (x: T, y: U) => string' is not assignable to type 'new (x: T, y: U) => string'. +!!! error TS2430: Type 'new <{|U|3|}>(x: {|T|4|}, y: {|U|5|}) => string' is not assignable to type 'new <{|T|6|}, {|U|7|}>(x: {|T|8|}, y: {|U|9|}) => string'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:37:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:36:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:37:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:15:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:15:17 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:15:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:15:17 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:15:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:36:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:15:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:36:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:36:14 a4: new (x: T, y: U) => string; } interface I5 extends A { ~~ -!!! error TS2430: Interface 'I5' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I5|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type 'new (x: (arg: T) => U) => T' is not assignable to type 'new (x: (arg: T) => U) => T'. +!!! error TS2430: Type 'new <{|U|3|}>(x: (arg: {|T|4|}) => {|U|5|}) => {|T|6|}' is not assignable to type 'new <{|T|7|}, {|U|8|}>(x: (arg: {|T|9|}) => {|U|10|}) => {|T|11|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Types of parameters 'arg' and 'arg' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|12|}' is not assignable to type '{|T|13|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:40:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:41:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:40:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:41:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:40:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:17 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:17 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:40:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:14 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:40:14 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:14 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:16:14 a5: new (x: (arg: T) => U) => T; } interface I7 extends A { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I7|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a11' are incompatible. -!!! error TS2430: Type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base'. +!!! error TS2430: Type 'new <{|U|3|}>(x: { {|foo|4|}: {|T|5|}; }, y: { {|foo|6|}: {|U|7|}; {|bar|8|}: {|U|9|}; }) => {|Base|10|}' is not assignable to type 'new <{|T|11|}>(x: { {|foo|12|}: {|T|13|}; }, y: { {|foo|14|}: {|T|15|}; {|bar|16|}: {|T|17|}; }) => {|Base|18|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ foo: T; }' is not assignable to type '{ foo: T; }'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: Type '{ {|foo|19|}: {|T|20|}; }' is not assignable to type '{ {|foo|21|}: {|T|22|}; }'. Two different types with this name exist, but they are unrelated. !!! error TS2430: Types of property 'foo' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|23|}' is not assignable to type '{|T|24|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|25|}' is assignable to the constraint of type '{|T|26|}', but '{|T|27|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:23 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:38 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:46 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:5:7 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:23 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:38 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:46 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:5:7 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:23 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:45:23 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:14 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:14 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:18:15 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:14 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:44:14 a11: new (x: { foo: T }, y: { foo: U; bar: U }) => Base; } interface I9 extends A { ~~ -!!! error TS2430: Interface 'I9' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|I9|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}'. !!! error TS2430: Types of property 'a16' are incompatible. -!!! error TS2430: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: T; b: T; }) => T[]'. +!!! error TS2430: Type 'new (x: { {|a|3|}: {|T|4|}; {|b|5|}: {|T|6|}; }) => {|T|7|}[]' is not assignable to type 'new <{|T|8|} extends {|Base|9|}>(x: { {|a|10|}: {|T|11|}; {|b|12|}: {|T|13|}; }) => {|T|14|}[]'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type '{ a: T; b: T; }' is not assignable to type '{ a: T; b: T; }'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: Type '{ {|a|15|}: {|T|16|}; {|b|17|}: {|T|18|}; }' is not assignable to type '{ {|a|19|}: {|T|20|}; {|b|21|}: {|T|22|}; }'. Two different types with this name exist, but they are unrelated. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2430: Type 'Base' is not assignable to type 'T'. -!!! error TS2430: 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|23|}' is not assignable to type '{|T|24|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|25|}' is assignable to the constraint of type '{|T|26|}', but '{|T|27|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|Base|28|}' is not assignable to type '{|T|29|}'. +!!! error TS2430: '{|Base|30|}' is assignable to the constraint of type '{|T|31|}', but '{|T|32|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:10:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:49:20 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:49:26 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:5:7 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:36 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:42 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:36 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 17 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:42 +!!! annotated symbol 18 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 19 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:49:20 +!!! annotated symbol 20 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 21 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:49:26 +!!! annotated symbol 22 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 23 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 24 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 25 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:20:15 +!!! annotated symbol 26 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 27 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 28 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:5:7 +!!! annotated symbol 29 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 30 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:5:7 +!!! annotated symbol 31 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 +!!! annotated symbol 32 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures6.ts:48:14 a16: new (x: { a: T; b: T }) => T[]; } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt index e041b1cdce0e4..a53520bf1c5f9 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithOptionalParameters.errors.txt @@ -27,9 +27,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'new (x: number) => number' is not assignable to type 'new () => number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts:19:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts:3:11 a: new (x: number) => number; // error, too many required params } @@ -61,9 +63,11 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10|0|}' incorrectly extends interface '{|Base|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. !!! error TS2430: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts:49:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithOptionalParameters.ts:3:11 a3: new (x: number, y: number) => number; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt index 8f4a219407ab3..4de383a7632f4 100644 --- a/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/subtypingWithConstructSignaturesWithSpecializedSignatures.errors.txt @@ -81,10 +81,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I2 extends Base2 { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I2|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a' are incompatible. !!! error TS2430: Type 'new (x: string) => string' is not assignable to type '{ new (x: "a"): number; new (x: string): number; }'. !!! error TS2430: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:70:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:60:15 // N's a: new (x: string) => string; // error because base returns non-void; } @@ -92,11 +94,21 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW // S's interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => string' is not assignable to type 'new (x: T) => T'. -!!! error TS2430: Type 'string' is not assignable to type 'T'. -!!! error TS2430: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new <{|T|2|}>(x: {|T|3|}) => string' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type 'string' is not assignable to type '{|T|7|}'. +!!! error TS2430: 'string' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:76:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:60:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:78:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:78:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:66:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:66:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:66:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:66:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:66:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts:66:18 // N's a2: new (x: T) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt index 36380fc97f4f0..67e14b40851ca 100644 --- a/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -130,9 +130,16 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|Base|2|}<{|T|3|}>'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2430: Type '(x: {|T|4|}) => {|T|5|}' is not assignable to type '() => {|T|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:20:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:4:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:20:18 a: (x: T) => T; // error, too many required params } @@ -164,9 +171,18 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10|0|}<{|T|1|}>' incorrectly extends interface '{|Base|2|}<{|T|3|}>'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Type '(x: {|T|4|}, y: {|T|5|}) => {|T|6|}' is not assignable to type '(x: {|T|7|}) => {|T|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:4:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:50:19 a3: (x: T, y: T) => T; // error, too many required params } @@ -218,191 +234,420 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I1 extends Base2 { ~~ -!!! error TS2430: Interface 'I1' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I1|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '() => T' is not assignable to type '() => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '() => {|T|3|}' is not assignable to type '<{|T|4|}>() => {|T|5|}'. +!!! error TS2430: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:100:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 a: () => T; } interface I2 extends Base2 { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '(x?: T) => T' is not assignable to type '() => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '(x?: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>() => {|T|6|}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:104:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 a: (x?: T) => T; } interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>() => {|T|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:108:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:108:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:108:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:108:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:93:13 a: (x: T) => T; } interface I4 extends Base2 { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I4|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '() => T' is not assignable to type '(x?: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '() => {|T|3|}' is not assignable to type '<{|T|4|}>(x?: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:113:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 a2: () => T; } interface I5 extends Base2 { ~~ -!!! error TS2430: Interface 'I5' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I5|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x?: T) => T' is not assignable to type '(x?: T) => T'. +!!! error TS2430: Type '(x?: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x?: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:117:18 a2: (x?: T) => T } interface I6 extends Base2 { ~~ -!!! error TS2430: Interface 'I6' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I6|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '(x?: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x?: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:94:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:121:18 a2: (x: T) => T; } interface I7 extends Base2 { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I7|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '() => T' is not assignable to type '(x: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '() => {|T|3|}' is not assignable to type '<{|T|4|}>(x: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:126:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 a3: () => T; } interface I8 extends Base2 { ~~ -!!! error TS2430: Interface 'I8' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I8|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '(x?: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Type '(x?: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:130:18 a3: (x?: T) => T; } interface I9 extends Base2 { ~~ -!!! error TS2430: Interface 'I9' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I9|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:134:18 a3: (x: T) => T; } interface I10 extends Base2 { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I10|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type '<{|T|6|}>(x: {|T|7|}) => {|T|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:138:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:95:14 a3: (x: T, y: T) => T; } interface I11 extends Base2 { ~~~ -!!! error TS2430: Interface 'I11' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I11|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type '() => T' is not assignable to type '(x: T, y?: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '() => {|T|3|}' is not assignable to type '<{|T|4|}>(x: {|T|5|}, y?: {|T|6|}) => {|T|7|}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:143:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 a4: () => T; } interface I12 extends Base2 { ~~~ -!!! error TS2430: Interface 'I12' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I12|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2430: Type '(x?: {|T|3|}, y?: {|T|4|}) => {|T|5|}' is not assignable to type '<{|T|6|}>(x: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:147:19 a4: (x?: T, y?: T) => T; } interface I13 extends Base2 { ~~~ -!!! error TS2430: Interface 'I13' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I13|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x: {|T|6|}, y?: {|T|7|}) => {|T|8|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|9|}' is not assignable to type '{|T|10|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|11|}' is assignable to the constraint of type '{|T|12|}', but '{|T|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:151:19 a4: (x: T) => T; } interface I14 extends Base2 { ~~~ -!!! error TS2430: Interface 'I14' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I14|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T, y?: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type '<{|T|6|}>(x: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:96:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:155:19 a4: (x: T, y: T) => T; } interface I15 extends Base2 { ~~~ -!!! error TS2430: Interface 'I15' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I15|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type '() => T' is not assignable to type '(x?: T, y?: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '() => {|T|3|}' is not assignable to type '<{|T|4|}>(x?: {|T|5|}, y?: {|T|6|}) => {|T|7|}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:160:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 a5: () => T; } interface I16 extends Base2 { ~~~ -!!! error TS2430: Interface 'I16' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I16|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2430: Type '(x?: {|T|3|}, y?: {|T|4|}) => {|T|5|}' is not assignable to type '<{|T|6|}>(x?: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:164:19 a5: (x?: T, y?: T) => T; } interface I17 extends Base2 { ~~~ -!!! error TS2430: Interface 'I17' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I17|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>(x?: {|T|6|}, y?: {|T|7|}) => {|T|8|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|9|}' is not assignable to type '{|T|10|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|11|}' is assignable to the constraint of type '{|T|12|}', but '{|T|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:168:19 a5: (x: T) => T; } interface I18 extends Base2 { ~~~ -!!! error TS2430: Interface 'I18' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I18|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +!!! error TS2430: Type '(x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type '<{|T|6|}>(x?: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:97:14 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:172:19 a5: (x: T, y: T) => T; } } @@ -428,9 +673,16 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2430: Type '<{|T|2|}>(x: {|T|3|}) => {|T|4|}' is not assignable to type '<{|T|5|}>() => {|T|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:196:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:179:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:197:13 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:197:13 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:197:13 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:180:13 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:180:13 a: (x: T) => T; // error, not identical and contextual signature instatiation can't make inference from T to T } @@ -462,9 +714,18 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base2 { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I10|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type '(x: T, y: T) => T' is not assignable to type '(x: T) => T'. +!!! error TS2430: Type '<{|T|2|}>(x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type '<{|T|6|}>(x: {|T|7|}) => {|T|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:226:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:179:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:227:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:227:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:227:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:227:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:182:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:182:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts:182:14 a3: (x: T, y: T) => T; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt index 427c7c1f19e8f..a54ce9ac0163e 100644 --- a/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/subtypingWithGenericConstructSignaturesWithOptionalParameters.errors.txt @@ -130,9 +130,16 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|Base|2|}<{|T|3|}>'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new () => T'. +!!! error TS2430: Type 'new (x: {|T|4|}) => {|T|5|}' is not assignable to type 'new () => {|T|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:20:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:4:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:20:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:20:18 a: new (x: T) => T; // error, too many required params } @@ -164,9 +171,18 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'. +!!! error TS2430: Interface '{|I10|0|}<{|T|1|}>' incorrectly extends interface '{|Base|2|}<{|T|3|}>'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Type 'new (x: {|T|4|}, y: {|T|5|}) => {|T|6|}' is not assignable to type 'new (x: {|T|7|}) => {|T|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:4:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:50:19 a3: new (x: T, y: T) => T; // error, too many required params } @@ -218,191 +234,420 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I1 extends Base2 { ~~ -!!! error TS2430: Interface 'I1' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I1|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new () => T' is not assignable to type 'new () => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new () => {|T|3|}' is not assignable to type 'new <{|T|4|}>() => {|T|5|}'. +!!! error TS2430: Type '{|T|6|}' is not assignable to type '{|T|7|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:100:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:100:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 a: new () => T; } interface I2 extends Base2 { ~~ -!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I2|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x?: T) => T' is not assignable to type 'new () => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new (x?: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>() => {|T|6|}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:104:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:104:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 a: new (x?: T) => T; } interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new () => T'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>() => {|T|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:108:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:108:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:108:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:108:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:93:17 a: new (x: T) => T; } interface I4 extends Base2 { ~~ -!!! error TS2430: Interface 'I4' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I4|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new () => T' is not assignable to type 'new (x?: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new () => {|T|3|}' is not assignable to type 'new <{|T|4|}>(x?: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:113:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:113:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 a2: new () => T; } interface I5 extends Base2 { ~~ -!!! error TS2430: Interface 'I5' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I5|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x?: T) => T' is not assignable to type 'new (x?: T) => T'. +!!! error TS2430: Type 'new (x?: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x?: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:117:18 a2: new (x?: T) => T } interface I6 extends Base2 { ~~ -!!! error TS2430: Interface 'I6' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I6|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a2' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new (x?: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x?: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:94:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:121:18 a2: new (x: T) => T; } interface I7 extends Base2 { ~~ -!!! error TS2430: Interface 'I7' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I7|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new () => T' is not assignable to type 'new (x: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new () => {|T|3|}' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}) => {|T|6|}'. +!!! error TS2430: Type '{|T|7|}' is not assignable to type '{|T|8|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:126:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:126:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 a3: new () => T; } interface I8 extends Base2 { ~~ -!!! error TS2430: Interface 'I8' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I8|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x?: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Type 'new (x?: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:130:18 a3: new (x?: T) => T; } interface I9 extends Base2 { ~~ -!!! error TS2430: Interface 'I9' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I9|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}) => {|T|7|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:134:18 a3: new (x: T) => T; } interface I10 extends Base2 { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I10|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type 'new <{|T|6|}>(x: {|T|7|}) => {|T|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:138:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:138:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:95:18 a3: new (x: T, y: T) => T; } interface I11 extends Base2 { ~~~ -!!! error TS2430: Interface 'I11' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I11|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type 'new () => T' is not assignable to type 'new (x: T, y?: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new () => {|T|3|}' is not assignable to type 'new <{|T|4|}>(x: {|T|5|}, y?: {|T|6|}) => {|T|7|}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:143:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:143:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 a4: new () => T; } interface I12 extends Base2 { ~~~ -!!! error TS2430: Interface 'I12' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I12|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type 'new (x?: T, y?: T) => T' is not assignable to type 'new (x: T, y?: T) => T'. +!!! error TS2430: Type 'new (x?: {|T|3|}, y?: {|T|4|}) => {|T|5|}' is not assignable to type 'new <{|T|6|}>(x: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:147:19 a4: new (x?: T, y?: T) => T; } interface I13 extends Base2 { ~~~ -!!! error TS2430: Interface 'I13' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I13|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new (x: T, y?: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x: {|T|6|}, y?: {|T|7|}) => {|T|8|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|9|}' is not assignable to type '{|T|10|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|11|}' is assignable to the constraint of type '{|T|12|}', but '{|T|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:19 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:151:19 a4: new (x: T) => T; } interface I14 extends Base2 { ~~~ -!!! error TS2430: Interface 'I14' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I14|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a4' are incompatible. -!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T, y?: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type 'new <{|T|6|}>(x: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:96:18 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:155:19 a4: new (x: T, y: T) => T; } interface I15 extends Base2 { ~~~ -!!! error TS2430: Interface 'I15' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I15|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type 'new () => T' is not assignable to type 'new (x?: T, y?: T) => T'. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type 'new () => {|T|3|}' is not assignable to type 'new <{|T|4|}>(x?: {|T|5|}, y?: {|T|6|}) => {|T|7|}'. +!!! error TS2430: Type '{|T|8|}' is not assignable to type '{|T|9|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|10|}' is assignable to the constraint of type '{|T|11|}', but '{|T|12|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:160:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:160:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 a5: new () => T; } interface I16 extends Base2 { ~~~ -!!! error TS2430: Interface 'I16' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I16|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type 'new (x?: T, y?: T) => T' is not assignable to type 'new (x?: T, y?: T) => T'. +!!! error TS2430: Type 'new (x?: {|T|3|}, y?: {|T|4|}) => {|T|5|}' is not assignable to type 'new <{|T|6|}>(x?: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:164:19 a5: new (x?: T, y?: T) => T; } interface I17 extends Base2 { ~~~ -!!! error TS2430: Interface 'I17' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I17|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new (x?: T, y?: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>(x?: {|T|6|}, y?: {|T|7|}) => {|T|8|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|9|}' is not assignable to type '{|T|10|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|11|}' is assignable to the constraint of type '{|T|12|}', but '{|T|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:19 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:168:19 a5: new (x: T) => T; } interface I18 extends Base2 { ~~~ -!!! error TS2430: Interface 'I18' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I18|0|}<{|T|1|}>' incorrectly extends interface '{|Base2|2|}'. !!! error TS2430: Types of property 'a5' are incompatible. -!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x?: T, y?: T) => T'. +!!! error TS2430: Type 'new (x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type 'new <{|T|6|}>(x?: {|T|7|}, y?: {|T|8|}) => {|T|9|}'. !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. -!!! error TS2430: 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2430: Type '{|T|10|}' is not assignable to type '{|T|11|}'. Two different types with this name exist, but they are unrelated. +!!! error TS2430: '{|T|12|}' is assignable to the constraint of type '{|T|13|}', but '{|T|14|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:92:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 12 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:97:18 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 +!!! annotated symbol 14 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:172:19 a5: new (x: T, y: T) => T; } } @@ -428,9 +673,16 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I3 extends Base2 { ~~ -!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I3|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a' are incompatible. -!!! error TS2430: Type 'new (x: T) => T' is not assignable to type 'new () => T'. +!!! error TS2430: Type 'new <{|T|2|}>(x: {|T|3|}) => {|T|4|}' is not assignable to type 'new <{|T|5|}>() => {|T|6|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:196:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:179:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:197:17 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:197:17 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:197:17 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:180:17 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:180:17 a: new (x: T) => T; // error, not identical and contextual signature instatiation can't make inference from T to T } @@ -462,9 +714,18 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface I10 extends Base2 { ~~~ -!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base2'. +!!! error TS2430: Interface '{|I10|0|}' incorrectly extends interface '{|Base2|1|}'. !!! error TS2430: Types of property 'a3' are incompatible. -!!! error TS2430: Type 'new (x: T, y: T) => T' is not assignable to type 'new (x: T) => T'. +!!! error TS2430: Type 'new <{|T|2|}>(x: {|T|3|}, y: {|T|4|}) => {|T|5|}' is not assignable to type 'new <{|T|6|}>(x: {|T|7|}) => {|T|8|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:226:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:179:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:227:18 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:227:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:227:18 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:227:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:182:18 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:182:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts:182:18 a3: new (x: T, y: T) => T; // error, too many required params } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt index 0c79c352a4c85..ceaa5ec1bdc2f 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer.errors.txt @@ -42,19 +42,39 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B3|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived' is not assignable to type 'T'. -!!! error TS2415: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2415: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Base|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:32:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:32:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:32:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:3:11 [x: number]: Derived; // error, BUG? } class B4 extends A { ~~ -!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B4|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2415: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2415: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Base|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:36:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:36:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:36:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:36:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts:3:11 [x: number]: Derived2; // error, BUG? } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt index 4915510dec768..d3b51accd0fa6 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer2.errors.txt @@ -28,10 +28,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:11:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:7:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:4:11 [x: number]: Base; // error } @@ -46,7 +50,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~~~~ -!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Type '{|Base|0|}' does not satisfy the constraint '{|Derived|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:4:11 [x: number]: Derived; // error } @@ -56,27 +62,53 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A { ~~ -!!! error TS2430: Interface 'B3' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B3|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}<{|T|3|}>'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'T'. +!!! error TS2430: Type '{|Base|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:32:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:32:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:32:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:32:18 [x: number]: Base; // error } interface B4 extends A { ~~ -!!! error TS2430: Interface 'B4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B4|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}<{|T|3|}>'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'Derived' is not assignable to type 'T'. -!!! error TS2430: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2430: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2430: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:36:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:36:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:36:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:36:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:36:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:36:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:4:11 [x: number]: Derived; // error } interface B5 extends A { ~~ -!!! error TS2430: Interface 'B5' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B5|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}<{|T|3|}>'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2430: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived2'. +!!! error TS2430: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2430: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived2|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:40:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:40:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:40:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:40:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:40:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:40:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts:5:11 [x: number]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt index ee132ac7483bb..e16e1fdac8917 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.errors.txt @@ -28,10 +28,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2415: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:4:11 [x: number]: Base; // error } @@ -46,7 +50,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~~~~ -!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Type '{|Base|0|}' does not satisfy the constraint '{|Derived|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:4:11 [x: number]: Derived; // error } @@ -56,27 +62,53 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B3|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Base' is not assignable to type 'T'. +!!! error TS2415: Type '{|Base|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:32:14 [x: number]: Base; // error } class B4 extends A { ~~ -!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B4|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived' is not assignable to type 'T'. -!!! error TS2415: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2415: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:36:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:36:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:36:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:36:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:4:11 [x: number]: Derived; // error } class B5 extends A { ~~ -!!! error TS2415: Class 'B5' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B5|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2415: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived2'. +!!! error TS2415: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived2|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:40:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:40:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:40:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:40:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:40:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts:5:11 [x: number]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt index 7fd7aec543824..c974a904e8862 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.errors.txt @@ -24,9 +24,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'string' is not assignable to type 'Derived'. +!!! error TS2415: Type 'string' is not assignable to type '{|Derived|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:4:11 [x: number]: string; // error } @@ -37,21 +40,34 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}<{|Base|2|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Type 'string' is not assignable to type '{|Base|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:20:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:16:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:3:11 ~~~~ -!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. -!!! error TS2344: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2344: Type '{|Base|0|}' does not satisfy the constraint '{|Derived|1|}'. +!!! error TS2344: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:4:11 [x: number]: string; // error } class B3 extends A { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B3|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'string' is not assignable to type 'T'. +!!! error TS2415: Type 'string' is not assignable to type '{|T|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:24:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:16:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:24:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts:24:14 [x: number]: string; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt b/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt index fb4d430a09a00..8bddeb30038cd 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt +++ b/tests/baselines/reference/subtypingWithNumericIndexer5.errors.txt @@ -28,11 +28,17 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B implements A { ~ -!!! error TS2420: Class 'B' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|B|0|}' incorrectly implements interface '{|A|1|}'. !!! error TS2420: Index signatures are incompatible. -!!! error TS2420: Type 'Base' is not assignable to type 'Derived'. -!!! error TS2420: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2420: Type '{|Base|2|}' is not assignable to type '{|Derived|3|}'. +!!! error TS2420: Property 'bar' is missing in type '{|Base|4|}' but required in type '{|Derived|5|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:7:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:4:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:4:11 [x: string]: Base; // error } @@ -55,27 +61,53 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 implements A { ~~ -!!! error TS2420: Class 'B3' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|B3|0|}<{|T|1|}>' incorrectly implements interface '{|A|2|}<{|T|3|}>'. !!! error TS2420: Index signatures are incompatible. -!!! error TS2420: Type 'Base' is not assignable to type 'T'. +!!! error TS2420: Type '{|Base|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:32:14 [x: string]: Base; // error } class B4 implements A { ~~ -!!! error TS2420: Class 'B4' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|B4|0|}<{|T|1|}>' incorrectly implements interface '{|A|2|}<{|T|3|}>'. !!! error TS2420: Index signatures are incompatible. -!!! error TS2420: Type 'Derived' is not assignable to type 'T'. -!!! error TS2420: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2420: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2420: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:36:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:36:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:36:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:36:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:4:11 [x: string]: Derived; // error } class B5 implements A { ~~ -!!! error TS2420: Class 'B5' incorrectly implements interface 'A'. +!!! error TS2420: Class '{|B5|0|}<{|T|1|}>' incorrectly implements interface '{|A|2|}<{|T|3|}>'. !!! error TS2420: Index signatures are incompatible. -!!! error TS2420: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2420: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived2'. +!!! error TS2420: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2420: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived2|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:40:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:40:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:40:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:40:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:40:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts:5:11 [x: string]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt index 1e2f7bc9114f1..1b9372a6aa453 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers.errors.txt @@ -29,7 +29,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW bar: string; // error ~~~ !!! error TS2416: Property 'bar' in type 'B' is not assignable to the same property in base type 'A'. -!!! error TS2416: Type 'string' is not assignable to type 'Base'. +!!! error TS2416: Type 'string' is not assignable to type '{|Base|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts:1:7 } class A2 { @@ -42,7 +43,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW 2: string; // error ~ !!! error TS2416: Property '2' in type 'B2' is not assignable to the same property in base type 'A2'. -!!! error TS2416: Type 'string' is not assignable to type 'Base'. +!!! error TS2416: Type 'string' is not assignable to type '{|Base|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts:1:7 } class A3 { @@ -55,7 +57,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW '2.0': string; // error ~~~~~ !!! error TS2416: Property ''2.0'' in type 'B3' is not assignable to the same property in base type 'A3'. -!!! error TS2416: Type 'string' is not assignable to type 'Base'. +!!! error TS2416: Type 'string' is not assignable to type '{|Base|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts:1:7 } module TwoLevels { @@ -69,7 +72,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW bar: string; // error ~~~ !!! error TS2416: Property 'bar' in type 'B' is not assignable to the same property in base type 'A'. -!!! error TS2416: Type 'string' is not assignable to type 'Base'. +!!! error TS2416: Type 'string' is not assignable to type '{|Base|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts:1:7 } class A2 { @@ -82,7 +86,8 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW 2: string; // error ~ !!! error TS2416: Property '2' in type 'B2' is not assignable to the same property in base type 'A2'. -!!! error TS2416: Type 'string' is not assignable to type 'Base'. +!!! error TS2416: Type 'string' is not assignable to type '{|Base|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts:1:7 } class A3 { @@ -95,6 +100,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW '2.0': string; // error ~~~~~ !!! error TS2416: Property ''2.0'' in type 'B3' is not assignable to the same property in base type 'A3'. -!!! error TS2416: Type 'string' is not assignable to type 'Base'. +!!! error TS2416: Type 'string' is not assignable to type '{|Base|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts:1:7 } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt index cdcc54c5ee9cb..ba528fae15eda 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers2.errors.txt @@ -37,9 +37,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'bar' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:17:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:12:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:1:11 foo: Derived; // ok bar: string; // error } @@ -51,9 +54,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Interface '{|B2|0|}' incorrectly extends interface '{|A2|1|}'. !!! error TS2430: Types of property '2.0' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:27:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:22:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:1:11 1: Derived; // ok 2: string; // error } @@ -65,9 +71,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Interface '{|B3|0|}' incorrectly extends interface '{|A3|1|}'. !!! error TS2430: Types of property ''2.0'' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:37:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:32:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:1:11 '1': Derived; // ok '2.0': string; // error } @@ -82,9 +91,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'bar' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:50:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:45:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:1:11 foo?: Derived; // ok bar?: string; // error } @@ -96,9 +108,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Interface '{|B2|0|}' incorrectly extends interface '{|A2|1|}'. !!! error TS2430: Types of property '2.0' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:60:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:55:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:1:11 1?: Derived; // ok 2?: string; // error } @@ -110,9 +125,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Interface '{|B3|0|}' incorrectly extends interface '{|A3|1|}'. !!! error TS2430: Types of property ''2.0'' are incompatible. -!!! error TS2430: Type 'string' is not assignable to type 'Base'. +!!! error TS2430: Type 'string' is not assignable to type '{|Base|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:70:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:65:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts:1:11 '1'?: Derived; // ok '2.0'?: string; // error } diff --git a/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt index 5b7c17e2c7df9..d70c2df74cdbb 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers3.errors.txt @@ -37,10 +37,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'bar' are incompatible. -!!! error TS2430: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:6:5: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:17:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:12:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:5:11 foo: Derived; // ok bar: Base; // error } @@ -52,9 +56,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Interface '{|B2|0|}' incorrectly extends interface '{|A2|1|}'. !!! error TS2430: Types of property '2.0' are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Type '{|Base|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:27:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:22:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:5:11 1: Derived; // ok 2: Base; // error } @@ -66,9 +74,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Interface '{|B3|0|}' incorrectly extends interface '{|A3|1|}'. !!! error TS2430: Types of property ''2.0'' are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Type '{|Base|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:37:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:32:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:5:11 '1': Derived; // ok '2.0': Base; // error } @@ -82,9 +94,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Types of property 'bar' are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Type '{|Base|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:49:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:44:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:5:11 foo?: Derived; // ok bar?: Base; // error } @@ -96,9 +112,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B2 extends A2 { ~~ -!!! error TS2430: Interface 'B2' incorrectly extends interface 'A2'. +!!! error TS2430: Interface '{|B2|0|}' incorrectly extends interface '{|A2|1|}'. !!! error TS2430: Types of property '2.0' are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Type '{|Base|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:59:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:54:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:5:11 1?: Derived; // ok 2?: Base; // error } @@ -110,9 +130,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A3 { ~~ -!!! error TS2430: Interface 'B3' incorrectly extends interface 'A3'. +!!! error TS2430: Interface '{|B3|0|}' incorrectly extends interface '{|A3|1|}'. !!! error TS2430: Types of property ''2.0'' are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'Derived'. +!!! error TS2430: Type '{|Base|2|}' is not assignable to type '{|Derived|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:69:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:64:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:1:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts:5:11 '1'?: Derived; // ok '2.0'?: Base; // error } diff --git a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt index adfbc821af083..b341047f0e7e8 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt @@ -27,9 +27,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B implements A { ~ -!!! error TS2420: Class 'B' incorrectly implements interface 'A'. -!!! error TS2420: Property 'foo' is missing in type 'B' but required in type 'A'. +!!! error TS2420: Class '{|B|0|}' incorrectly implements interface '{|A|1|}'. +!!! error TS2420: Property 'foo' is missing in type '{|B|2|}' but required in type '{|A|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:13:9: 'foo' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:16:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:12:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:16:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:12:15 fooo: Derived; // error } @@ -39,9 +43,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 implements A2 { ~~ -!!! error TS2420: Class 'B2' incorrectly implements interface 'A2'. -!!! error TS2420: Property '1' is missing in type 'B2' but required in type 'A2'. +!!! error TS2420: Class '{|B2|0|}' incorrectly implements interface '{|A2|1|}'. +!!! error TS2420: Property '1' is missing in type '{|B2|2|}' but required in type '{|A2|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:21:9: '1' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:20:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:24:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:20:15 2: Derived; // error } @@ -51,9 +59,13 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 implements A3 { ~~ -!!! error TS2420: Class 'B3' incorrectly implements interface 'A3'. -!!! error TS2420: Property ''1'' is missing in type 'B3' but required in type 'A3'. +!!! error TS2420: Class '{|B3|0|}' incorrectly implements interface '{|A3|1|}'. +!!! error TS2420: Property ''1'' is missing in type '{|B3|2|}' but required in type '{|A3|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:29:9: ''1'' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:28:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:32:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts:28:15 '1.0': Derived; // error } } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt index 50646f64eae0c..5360f09e5106e 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.errors.txt @@ -23,8 +23,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Property 'foo' is private in type 'B' but not in type 'A'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts:15:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts:11:7 private foo: Derived; // error } @@ -34,8 +36,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Class '{|B2|0|}' incorrectly extends base class '{|A2|1|}'. !!! error TS2415: Property '1' is private in type 'B2' but not in type 'A2'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts:23:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts:19:7 private 1: Derived; // error } @@ -45,7 +49,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Class '{|B3|0|}' incorrectly extends base class '{|A3|1|}'. !!! error TS2415: Property ''1'' is private in type 'B3' but not in type 'A3'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts:31:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility.ts:27:7 private '1': Derived; // error } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt index 083e96eaf5f0e..c9f7f64723bf7 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.errors.txt @@ -30,8 +30,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Property 'foo' is private in type 'A' but not in type 'B'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:16:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:12:11 public foo: Derived; // error } @@ -41,8 +43,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Class '{|B2|0|}' incorrectly extends base class '{|A2|1|}'. !!! error TS2415: Property '1' is private in type 'A2' but not in type 'B2'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:20:11 public 1: Derived; // error } @@ -52,8 +56,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Class '{|B3|0|}' incorrectly extends base class '{|A3|1|}'. !!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:28:11 public '1': Derived; // error } } @@ -65,8 +71,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Property 'foo' is private in type 'A' but not in type 'B'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:42:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:38:11 foo: Derived; // error } @@ -76,8 +84,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 extends A2 { ~~ -!!! error TS2415: Class 'B2' incorrectly extends base class 'A2'. +!!! error TS2415: Class '{|B2|0|}' incorrectly extends base class '{|A2|1|}'. !!! error TS2415: Property '1' is private in type 'A2' but not in type 'B2'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:50:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:46:11 1: Derived; // error } @@ -87,8 +97,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A3 { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A3'. +!!! error TS2415: Class '{|B3|0|}' incorrectly extends base class '{|A3|1|}'. !!! error TS2415: Property ''1'' is private in type 'A3' but not in type 'B3'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:58:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts:54:11 '1': Derived; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt index 89d5ef7915c46..d911788ba0033 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembersOptionality2.errors.txt @@ -18,8 +18,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface S extends T { ~ -!!! error TS2430: Interface 'S' incorrectly extends interface 'T'. +!!! error TS2430: Interface '{|S|0|}' incorrectly extends interface '{|T|1|}'. !!! error TS2430: Property 'Foo' is optional in type 'S' but required in type 'T'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts:10:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts:6:11 Foo?: Derived // error } @@ -29,8 +31,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface S2 extends T2 { ~~ -!!! error TS2430: Interface 'S2' incorrectly extends interface 'T2'. +!!! error TS2430: Interface '{|S2|0|}' incorrectly extends interface '{|T2|1|}'. !!! error TS2430: Property '1' is optional in type 'S2' but required in type 'T2'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts:18:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts:14:11 1?: Derived; // error } @@ -40,8 +44,10 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface S3 extends T3 { ~~ -!!! error TS2430: Interface 'S3' incorrectly extends interface 'T3'. +!!! error TS2430: Interface '{|S3|0|}' incorrectly extends interface '{|T3|1|}'. !!! error TS2430: Property ''1'' is optional in type 'S3' but required in type 'T3'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts:26:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality2.ts:22:11 '1'?: Derived; // error } diff --git a/tests/baselines/reference/subtypingWithStringIndexer.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer.errors.txt index 80a1a6acfc043..5967adc259e94 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer.errors.txt @@ -42,19 +42,39 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B3|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived' is not assignable to type 'T'. -!!! error TS2415: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2415: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Base|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:32:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:32:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:32:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:3:11 [x: string]: Derived; // error } class B4 extends A { ~~ -!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B4|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2415: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. +!!! error TS2415: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Base|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:36:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:36:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:36:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:36:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts:3:11 [x: string]: Derived2; // error } } diff --git a/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt index 214a17258c9dd..c309e67abcb4e 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer2.errors.txt @@ -28,10 +28,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~ -!!! error TS2430: Interface 'B' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B|0|}' incorrectly extends interface '{|A|1|}'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2430: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:11:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:7:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:4:11 [x: string]: Base; // error } @@ -46,7 +50,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B extends A { ~~~~ -!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Type '{|Base|0|}' does not satisfy the constraint '{|Derived|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:4:11 [x: string]: Derived; // error } @@ -56,27 +62,53 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW interface B3 extends A { ~~ -!!! error TS2430: Interface 'B3' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B3|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}<{|T|3|}>'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'Base' is not assignable to type 'T'. +!!! error TS2430: Type '{|Base|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:32:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:32:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:32:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:32:18 [x: string]: Base; // error } interface B4 extends A { ~~ -!!! error TS2430: Interface 'B4' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B4|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}<{|T|3|}>'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'Derived' is not assignable to type 'T'. -!!! error TS2430: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2430: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2430: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:36:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:36:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:36:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:36:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:36:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:36:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:4:11 [x: string]: Derived; // error } interface B5 extends A { ~~ -!!! error TS2430: Interface 'B5' incorrectly extends interface 'A'. +!!! error TS2430: Interface '{|B5|0|}<{|T|1|}>' incorrectly extends interface '{|A|2|}<{|T|3|}>'. !!! error TS2430: Index signatures are incompatible. -!!! error TS2430: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2430: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived2'. +!!! error TS2430: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2430: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived2|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:40:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:40:18 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:20:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:40:18 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:40:18 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:40:18 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:40:18 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts:5:11 [x: string]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt index 8016421c07f29..4e5223f0b9059 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer3.errors.txt @@ -28,10 +28,14 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2415: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:4:11 [x: string]: Base; // error } @@ -46,7 +50,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~~~~ -!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. +!!! error TS2344: Type '{|Base|0|}' does not satisfy the constraint '{|Derived|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:4:11 [x: string]: Derived; // error } @@ -56,27 +62,53 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 extends A { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B3|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Base' is not assignable to type 'T'. +!!! error TS2415: Type '{|Base|4|}' is not assignable to type '{|T|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:32:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:32:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:32:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:3:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:32:14 [x: string]: Base; // error } class B4 extends A { ~~ -!!! error TS2415: Class 'B4' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B4|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived' is not assignable to type 'T'. -!!! error TS2415: 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. +!!! error TS2415: Type '{|Derived|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:36:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:36:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:36:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:4:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:36:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:4:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:36:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:36:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:4:11 [x: string]: Derived; // error } class B5 extends A { ~~ -!!! error TS2415: Class 'B5' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B5|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'Derived2' is not assignable to type 'T'. -!!! error TS2415: 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived2'. +!!! error TS2415: Type '{|Derived2|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2415: '{|Derived2|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{|Derived2|9|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:40:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:40:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:20:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:40:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:5:11 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:40:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:5:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:40:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:40:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts:5:11 [x: string]: Derived2; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt b/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt index bf7af9ca166d6..61b952cb7ee3e 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt +++ b/tests/baselines/reference/subtypingWithStringIndexer4.errors.txt @@ -24,9 +24,12 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'string' is not assignable to type 'Derived'. +!!! error TS2415: Type 'string' is not assignable to type '{|Derived|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:11:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:7:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:4:11 [x: string]: string; // error } @@ -37,21 +40,34 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B extends A { ~ -!!! error TS2415: Class 'B' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B|0|}' incorrectly extends base class '{|A|1|}<{|Base|2|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'string' is not assignable to type 'Base'. +!!! error TS2415: Type 'string' is not assignable to type '{|Base|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:20:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:16:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:3:11 ~~~~ -!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'. -!!! error TS2344: Property 'bar' is missing in type 'Base' but required in type 'Derived'. +!!! error TS2344: Type '{|Base|0|}' does not satisfy the constraint '{|Derived|1|}'. +!!! error TS2344: Property 'bar' is missing in type '{|Base|2|}' but required in type '{|Derived|3|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:4:34: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:3:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:4:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:3:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:4:11 [x: string]: string; // error } class B3 extends A { ~~ -!!! error TS2415: Class 'B3' incorrectly extends base class 'A'. +!!! error TS2415: Class '{|B3|0|}<{|T|1|}>' incorrectly extends base class '{|A|2|}<{|T|3|}>'. !!! error TS2415: Index signatures are incompatible. -!!! error TS2415: Type 'string' is not assignable to type 'T'. +!!! error TS2415: Type 'string' is not assignable to type '{|T|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:24:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:24:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:16:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:24:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts:24:14 [x: string]: string; // error } } \ No newline at end of file diff --git a/tests/baselines/reference/switchAssignmentCompat.errors.txt b/tests/baselines/reference/switchAssignmentCompat.errors.txt index 747a1035b6846..69a4e74a57d2e 100644 --- a/tests/baselines/reference/switchAssignmentCompat.errors.txt +++ b/tests/baselines/reference/switchAssignmentCompat.errors.txt @@ -7,6 +7,7 @@ tests/cases/compiler/switchAssignmentCompat.ts(4,10): error TS2678: Type 'typeof switch (0) { case Foo: break; // Error expected ~~~ -!!! error TS2678: Type 'typeof Foo' is not comparable to type 'number'. +!!! error TS2678: Type 'typeof {|Foo|0|}' is not comparable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/switchAssignmentCompat.ts:1:7 } \ No newline at end of file diff --git a/tests/baselines/reference/switchCaseCircularRefeference.errors.txt b/tests/baselines/reference/switchCaseCircularRefeference.errors.txt index bc576f8e723b8..182540ef24e25 100644 --- a/tests/baselines/reference/switchCaseCircularRefeference.errors.txt +++ b/tests/baselines/reference/switchCaseCircularRefeference.errors.txt @@ -9,8 +9,14 @@ tests/cases/compiler/switchCaseCircularRefeference.ts(5,10): error TS2678: Type switch (x.a) { case x: ~ -!!! error TS2678: Type '{ a: "A"; b: any; } | { a: "C"; e: any; }' is not comparable to type 'string'. -!!! error TS2678: Type '{ a: "C"; e: any; }' is not comparable to type 'string'. +!!! error TS2678: Type '{ {|a|0|}: "A"; {|b|1|}: any; } | { {|a|2|}: "C"; {|e|3|}: any; }' is not comparable to type 'string'. +!!! error TS2678: Type '{ {|a|4|}: "C"; {|e|5|}: any; }' is not comparable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/switchCaseCircularRefeference.ts:3:16 +!!! annotated symbol 1 tests/cases/compiler/switchCaseCircularRefeference.ts:3:24 +!!! annotated symbol 2 tests/cases/compiler/switchCaseCircularRefeference.ts:3:30 +!!! annotated symbol 3 tests/cases/compiler/switchCaseCircularRefeference.ts:3:38 +!!! annotated symbol 4 tests/cases/compiler/switchCaseCircularRefeference.ts:3:30 +!!! annotated symbol 5 tests/cases/compiler/switchCaseCircularRefeference.ts:3:38 break; } } \ No newline at end of file diff --git a/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt b/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt index 7a5fd12182e4e..6154de1ae96a1 100644 --- a/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt +++ b/tests/baselines/reference/switchCasesExpressionTypeMismatch.errors.txt @@ -10,7 +10,8 @@ tests/cases/compiler/switchCasesExpressionTypeMismatch.ts(7,10): error TS2678: T switch (0) { case Foo: break; // Error ~~~ -!!! error TS2678: Type 'typeof Foo' is not comparable to type 'number'. +!!! error TS2678: Type 'typeof {|Foo|0|}' is not comparable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/switchCasesExpressionTypeMismatch.ts:1:7 case "sss": break; // Error ~~~~~ !!! error TS2678: Type '"sss"' is not comparable to type '0'. diff --git a/tests/baselines/reference/switchStatements.errors.txt b/tests/baselines/reference/switchStatements.errors.txt index 81e24aa69a823..d65fe94e611e5 100644 --- a/tests/baselines/reference/switchStatements.errors.txt +++ b/tests/baselines/reference/switchStatements.errors.txt @@ -39,8 +39,11 @@ tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,20): case new D(): case { id: 12, name: '' }: ~~~~~~~~ -!!! error TS2678: Type '{ id: number; name: string; }' is not comparable to type 'C'. +!!! error TS2678: Type '{ {|id|0|}: number; {|name|1|}: string; }' is not comparable to type '{|C|2|}'. !!! error TS2678: Object literal may only specify known properties, and 'name' does not exist in type 'C'. +!!! annotated symbol 0 tests/cases/conformance/statements/switchStatements/switchStatements.ts:35:12 +!!! annotated symbol 1 tests/cases/conformance/statements/switchStatements/switchStatements.ts:35:20 +!!! annotated symbol 2 tests/cases/conformance/statements/switchStatements/switchStatements.ts:30:7 case new C(): } diff --git a/tests/baselines/reference/symbolProperty10.errors.txt b/tests/baselines/reference/symbolProperty10.errors.txt index 6bce8624d9a32..0f05942f8a707 100644 --- a/tests/baselines/reference/symbolProperty10.errors.txt +++ b/tests/baselines/reference/symbolProperty10.errors.txt @@ -15,7 +15,12 @@ tests/cases/conformance/es6/Symbols/symbolProperty10.ts(10,5): error TS2322: Typ i = new C; var c: C = i; ~ -!!! error TS2322: Type 'I' is not assignable to type 'C'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2322: Property 'y' is missing in type '{ x: any; }' but required in type '{ x: any; y: any; }'. -!!! related TS2728 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:2:29: 'y' is declared here. \ No newline at end of file +!!! error TS2322: Property 'y' is missing in type '{ {|x|2|}: any; }' but required in type '{ {|x|3|}: any; {|y|4|}: any; }'. +!!! related TS2728 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:2:29: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:5:27 +!!! annotated symbol 3 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:2:26 +!!! annotated symbol 4 tests/cases/conformance/es6/Symbols/symbolProperty10.ts:2:29 \ No newline at end of file diff --git a/tests/baselines/reference/symbolProperty12.errors.txt b/tests/baselines/reference/symbolProperty12.errors.txt index 5ec8d6452035f..78af9b83237ef 100644 --- a/tests/baselines/reference/symbolProperty12.errors.txt +++ b/tests/baselines/reference/symbolProperty12.errors.txt @@ -15,9 +15,13 @@ tests/cases/conformance/es6/Symbols/symbolProperty12.ts(10,5): error TS2322: Typ var i: I; i = new C; ~ -!!! error TS2322: Type 'C' is not assignable to type 'I'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|I|1|}'. !!! error TS2322: Property '[Symbol.iterator]' is private in type 'C' but not in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty12.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/es6/Symbols/symbolProperty12.ts:4:11 var c: C = i; ~ -!!! error TS2322: Type 'I' is not assignable to type 'C'. -!!! error TS2322: Property '[Symbol.iterator]' is private in type 'C' but not in type 'I'. \ No newline at end of file +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|C|1|}'. +!!! error TS2322: Property '[Symbol.iterator]' is private in type 'C' but not in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty12.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/es6/Symbols/symbolProperty12.ts:1:7 \ No newline at end of file diff --git a/tests/baselines/reference/symbolProperty21.errors.txt b/tests/baselines/reference/symbolProperty21.errors.txt index 766af0659e8a9..a1728768c8269 100644 --- a/tests/baselines/reference/symbolProperty21.errors.txt +++ b/tests/baselines/reference/symbolProperty21.errors.txt @@ -14,7 +14,11 @@ tests/cases/conformance/es6/Symbols/symbolProperty21.ts(10,5): error TS2345: Arg [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: true; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Argument of type '{ {|[Symbol.isConcatSpreadable]|0|}: string; {|[Symbol.toPrimitive]|1|}: number; {|[Symbol.unscopables]|2|}: true; }' is not assignable to parameter of type '{|I|3|}'. !!! error TS2345: Object literal may only specify known properties, and '[Symbol.toPrimitive]' does not exist in type 'I'. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty21.ts:9:5 +!!! annotated symbol 1 tests/cases/conformance/es6/Symbols/symbolProperty21.ts:10:5 +!!! annotated symbol 2 tests/cases/conformance/es6/Symbols/symbolProperty21.ts:11:5 +!!! annotated symbol 3 tests/cases/conformance/es6/Symbols/symbolProperty21.ts:1:11 [Symbol.unscopables]: true }); \ No newline at end of file diff --git a/tests/baselines/reference/symbolProperty25.errors.txt b/tests/baselines/reference/symbolProperty25.errors.txt index a671db0e154ac..13a7d4f87ff39 100644 --- a/tests/baselines/reference/symbolProperty25.errors.txt +++ b/tests/baselines/reference/symbolProperty25.errors.txt @@ -9,9 +9,13 @@ tests/cases/conformance/es6/Symbols/symbolProperty25.ts(5,7): error TS2420: Clas class C implements I { ~ -!!! error TS2420: Class 'C' incorrectly implements interface 'I'. -!!! error TS2420: Property '[Symbol.toPrimitive]' is missing in type 'C' but required in type 'I'. +!!! error TS2420: Class '{|C|0|}' incorrectly implements interface '{|I|1|}'. +!!! error TS2420: Property '[Symbol.toPrimitive]' is missing in type '{|C|2|}' but required in type '{|I|3|}'. !!! related TS2728 tests/cases/conformance/es6/Symbols/symbolProperty25.ts:2:5: '[Symbol.toPrimitive]' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty25.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/es6/Symbols/symbolProperty25.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/es6/Symbols/symbolProperty25.ts:5:7 +!!! annotated symbol 3 tests/cases/conformance/es6/Symbols/symbolProperty25.ts:1:11 [Symbol.toStringTag]() { return ""; } diff --git a/tests/baselines/reference/symbolProperty52.errors.txt b/tests/baselines/reference/symbolProperty52.errors.txt index 5374f282c8461..0e4f7fedb50ce 100644 --- a/tests/baselines/reference/symbolProperty52.errors.txt +++ b/tests/baselines/reference/symbolProperty52.errors.txt @@ -12,8 +12,9 @@ tests/cases/conformance/es6/Symbols/symbolProperty52.ts(7,12): error TS2339: Pro obj = {}; ~~~ -!!! error TS2741: Property '[Symbol.nonsense]' is missing in type '{}' but required in type '{ [Symbol.nonsense]: number; }'. +!!! error TS2741: Property '[Symbol.nonsense]' is missing in type '{}' but required in type '{ {|[Symbol.nonsense]|0|}: number; }'. !!! related TS2728 tests/cases/conformance/es6/Symbols/symbolProperty52.ts:2:5: '[Symbol.nonsense]' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty52.ts:2:5 obj[Symbol.nonsense]; ~~~~~~~~ diff --git a/tests/baselines/reference/symbolProperty9.errors.txt b/tests/baselines/reference/symbolProperty9.errors.txt index ba1d513104164..9210c682c47ad 100644 --- a/tests/baselines/reference/symbolProperty9.errors.txt +++ b/tests/baselines/reference/symbolProperty9.errors.txt @@ -15,7 +15,12 @@ tests/cases/conformance/es6/Symbols/symbolProperty9.ts(10,5): error TS2322: Type i = new C; var c: C = i; ~ -!!! error TS2322: Type 'I' is not assignable to type 'C'. +!!! error TS2322: Type '{|I|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2322: Property 'y' is missing in type '{ x: any; }' but required in type '{ x: any; y: any; }'. -!!! related TS2728 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:2:29: 'y' is declared here. \ No newline at end of file +!!! error TS2322: Property 'y' is missing in type '{ {|x|2|}: any; }' but required in type '{ {|x|3|}: any; {|y|4|}: any; }'. +!!! related TS2728 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:2:29: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:4:11 +!!! annotated symbol 1 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:5:26 +!!! annotated symbol 3 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:2:26 +!!! annotated symbol 4 tests/cases/conformance/es6/Symbols/symbolProperty9.ts:2:29 \ No newline at end of file diff --git a/tests/baselines/reference/symbolType15.errors.txt b/tests/baselines/reference/symbolType15.errors.txt index 205a2a999d0d4..950040a8b3653 100644 --- a/tests/baselines/reference/symbolType15.errors.txt +++ b/tests/baselines/reference/symbolType15.errors.txt @@ -9,5 +9,7 @@ tests/cases/conformance/es6/Symbols/symbolType15.ts(5,1): error TS2322: Type 'Sy symObj = sym; sym = symObj; ~~~ -!!! error TS2322: Type 'Symbol' is not assignable to type 'symbol'. -!!! error TS2322: 'symbol' is a primitive, but 'Symbol' is a wrapper object. Prefer using 'symbol' when possible. \ No newline at end of file +!!! error TS2322: Type '{|Symbol|0|}' is not assignable to type 'symbol'. +!!! error TS2322: 'symbol' is a primitive, but '{|Symbol|1|}' is a wrapper object. Prefer using 'symbol' when possible. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:97:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:97:11 \ No newline at end of file diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 40a3321fe61a6..bb3872fdcc1a2 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -20,21 +20,27 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio var a = foo([]); // number ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type '{|TemplateStringsArray|1|}'. !!! related TS2728 /.ts/lib.es5.d.ts:605:14: 'raw' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:604:11 var b = foo([], 1); // string ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var c = foo([], 1, 2); // boolean ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var d = foo([], 1, true); // boolean (with error) ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var e = foo([], 1, "2"); // {} ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var f = foo([], 1, 2, 3); // any (with error) ~ !!! error TS2554: Expected 1-3 arguments, but got 4. diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index eb7d2f510a8c7..385281916cf86 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -20,21 +20,27 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio var a = foo([]); // number ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type '{|TemplateStringsArray|1|}'. !!! related TS2728 /.ts/lib.es5.d.ts:605:14: 'raw' is declared here. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:604:11 var b = foo([], 1); // string ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var c = foo([], 1, 2); // boolean ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var d = foo([], 1, true); // boolean (with error) ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var e = foo([], 1, "2"); // {} ~~ -!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 var f = foo([], 1, 2, 3); // any (with error) ~ !!! error TS2554: Expected 1-3 arguments, but got 4. diff --git a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt index 4b300fef8c96d..00d60601e8a33 100644 --- a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt @@ -11,7 +11,8 @@ tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(7,3): error TS2 f({}, 10, 10); ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. !!! error TS2345: Type '{}' is missing the following properties from type 'TemplateStringsArray': raw, length, concat, join, and 10 more. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 f `abcdef${ 1234 }${ 5678 }ghijkl`; \ No newline at end of file diff --git a/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.errors.txt index 989483bda62d1..da1fcbb00c437 100644 --- a/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeNotDefinedES5Mode.errors.txt @@ -8,7 +8,8 @@ tests/cases/compiler/templateStringsArrayTypeNotDefinedES5Mode.ts(4,3): error TS f({}, 10, 10); ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. !!! error TS2345: Type '{}' is missing the following properties from type 'TemplateStringsArray': raw, length, concat, join, and 10 more. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 f `abcdef${ 1234 }${ 5678 }ghijkl`; \ No newline at end of file diff --git a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt index 666df6d35cb5f..2ee0ee5e3a2d5 100644 --- a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt @@ -11,7 +11,8 @@ tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(7,3): error T f({}, 10, 10); ~~ -!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{|TemplateStringsArray|0|}'. !!! error TS2345: Type '{}' is missing the following properties from type 'TemplateStringsArray': raw, length, concat, join, and 16 more. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:604:11 f `abcdef${ 1234 }${ 5678 }ghijkl`; \ No newline at end of file diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt b/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt index 0cf86610f80ac..08d2dc86de0cc 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt @@ -150,11 +150,13 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e let implExplicitStructural = impl.explicitStructural; implExplicitStructural(); // error, no 'a' in 'void' ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type '{ a: number; }'. +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type '{ {|a|0|}: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:32:31 let implExplicitInterface = impl.explicitInterface; implExplicitInterface(); // error, no 'a' in 'void' ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'I'. +!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:28:11 function explicitStructural(this: { y: number }, x: number): number { return x + this.y; } @@ -170,16 +172,34 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e } let ok: {y: number, f: (this: { y: number }, x: number) => number} = { y: 12, explicitStructural }; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ y: number; explicitStructural: (this: { y: number; }, x: number) => number; }' is not assignable to type '{ y: number; f: (this: { y: number; }, x: number) => number; }'. +!!! error TS2322: Type '{ {|y|0|}: number; {|explicitStructural|1|}: (this: { {|y|2|}: number; }, x: number) => number; }' is not assignable to type '{ {|y|3|}: number; {|f|4|}: (this: { {|y|5|}: number; }, x: number) => number; }'. !!! error TS2322: Object literal may only specify known properties, and 'explicitStructural' does not exist in type '{ y: number; f: (this: { y: number; }, x: number) => number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:61:72 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:61:79 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:52:37 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:61:10 +!!! annotated symbol 4 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:61:21 +!!! annotated symbol 5 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:61:33 let wrongPropertyType: {y: string, f: (this: { y: number }, x: number) => number} = { y: 'foo', explicitStructural }; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ y: string; explicitStructural: (this: { y: number; }, x: number) => number; }' is not assignable to type '{ y: string; f: (this: { y: number; }, x: number) => number; }'. +!!! error TS2322: Type '{ {|y|0|}: string; {|explicitStructural|1|}: (this: { {|y|2|}: number; }, x: number) => number; }' is not assignable to type '{ {|y|3|}: string; {|f|4|}: (this: { {|y|5|}: number; }, x: number) => number; }'. !!! error TS2322: Object literal may only specify known properties, and 'explicitStructural' does not exist in type '{ y: string; f: (this: { y: number; }, x: number) => number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:87 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:97 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:52:37 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:25 +!!! annotated symbol 4 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:36 +!!! annotated symbol 5 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:48 let wrongPropertyName: {wrongName: number, f: (this: { y: number }, x: number) => number} = { wrongName: 12, explicitStructural }; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ wrongName: number; explicitStructural: (this: { y: number; }, x: number) => number; }' is not assignable to type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }'. +!!! error TS2322: Type '{ {|wrongName|0|}: number; {|explicitStructural|1|}: (this: { {|y|2|}: number; }, x: number) => number; }' is not assignable to type '{ {|wrongName|3|}: number; {|f|4|}: (this: { {|y|5|}: number; }, x: number) => number; }'. !!! error TS2322: Object literal may only specify known properties, and 'explicitStructural' does not exist in type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:95 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:110 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:52:37 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:25 +!!! annotated symbol 4 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:44 +!!! annotated symbol 5 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:56 ok.f(); // not enough arguments ~~~~~~ @@ -193,14 +213,26 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e !!! error TS2554: Expected 1 arguments, but got 2. wrongPropertyType.f(13); ~~~~~~~~~~~~~~~~~ -!!! error TS2684: The 'this' context of type '{ y: string; f: (this: { y: number; }, x: number) => number; }' is not assignable to method's 'this' of type '{ y: number; }'. +!!! error TS2684: The 'this' context of type '{ {|y|0|}: string; {|f|1|}: (this: { {|y|2|}: number; }, x: number) => number; }' is not assignable to method's 'this' of type '{ {|y|3|}: number; }'. !!! error TS2684: Types of property 'y' are incompatible. !!! error TS2684: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:25 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:36 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:48 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:62:48 wrongPropertyName.f(13); ~~~~~~~~~~~~~~~~~ -!!! error TS2684: The 'this' context of type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }' is not assignable to method's 'this' of type '{ y: number; }'. -!!! error TS2684: Property 'y' is missing in type '{ wrongName: number; f: (this: { y: number; }, x: number) => number; }' but required in type '{ y: number; }'. +!!! error TS2684: The 'this' context of type '{ {|wrongName|0|}: number; {|f|1|}: (this: { {|y|2|}: number; }, x: number) => number; }' is not assignable to method's 'this' of type '{ {|y|3|}: number; }'. +!!! error TS2684: Property 'y' is missing in type '{ {|wrongName|4|}: number; {|f|5|}: (this: { {|y|6|}: number; }, x: number) => number; }' but required in type '{ {|y|7|}: number; }'. !!! related TS2728 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:56: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:25 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:44 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:56 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:56 +!!! annotated symbol 4 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:25 +!!! annotated symbol 5 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:44 +!!! annotated symbol 6 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:56 +!!! annotated symbol 7 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:63:56 let c = new C(); c.explicitC(); // not enough arguments @@ -247,9 +279,11 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e // oops, this triggers contextual typing, which needs to be updated to understand that =>'s `this` is void. let specifiedToVoid: (this: void, x: number) => number = explicitStructural; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: { y: number; }, x: number) => number' is not assignable to type '(this: void, x: number) => number'. +!!! error TS2322: Type '(this: { {|y|0|}: number; }, x: number) => number' is not assignable to type '(this: void, x: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'void' is not assignable to type '{ y: number; }'. +!!! error TS2322: Type 'void' is not assignable to type '{ {|y|1|}: number; }'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:52:37 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:52:37 let reconstructed: { n: number, @@ -272,54 +306,84 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e // from differing object types c.explicitC = function(this: D, m: number) { return this.x + m }; ~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: C, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: {|C|1|}, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. !!! error TS2322: Type 'C' is missing the following properties from type 'D': x, explicitD +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 c.explicitProperty = explicitXProperty; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: { x: number; }, m: number) => number' is not assignable to type '(this: { n: number; }, m: number) => number'. +!!! error TS2322: Type '(this: { {|x|0|}: number; }, m: number) => number' is not assignable to type '(this: { {|n|1|}: number; }, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Property 'x' is missing in type '{ n: number; }' but required in type '{ x: number; }'. +!!! error TS2322: Property 'x' is missing in type '{ {|n|2|}: number; }' but required in type '{ {|x|3|}: number; }'. !!! related TS2728 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:104:33: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:104:33 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:12:29 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:12:29 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:104:33 c.explicitC = d.explicitD; ~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: C, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: {|C|1|}, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Type '{|C|2|}' is not assignable to type '{|D|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 c.explicitC = d.explicitThis; ~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: C, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: {|C|1|}, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Type '{|C|2|}' is not assignable to type '{|D|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 c.explicitThis = d.explicitD; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: C, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: {|C|1|}, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Type '{|C|2|}' is not assignable to type '{|D|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 c.explicitThis = d.explicitThis; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: C, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: {|C|1|}, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'C' is not assignable to type 'D'. +!!! error TS2322: Type '{|C|2|}' is not assignable to type '{|D|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 c.explicitProperty = d.explicitD; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: { n: number; }, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: { {|n|1|}: number; }, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. !!! error TS2322: Type '{ n: number; }' is missing the following properties from type 'D': x, explicitThis, explicitD +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:12:29 c.explicitThis = d.explicitThis; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: C, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: {|C|1|}, m: number) => number'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:1:7 c.explicitVoid = d.explicitD; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: void, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: void, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'void' is not assignable to type 'D'. +!!! error TS2322: Type 'void' is not assignable to type '{|D|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 c.explicitVoid = d.explicitThis; ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: D, m: number) => number' is not assignable to type '(this: void, m: number) => number'. +!!! error TS2322: Type '(this: {|D|0|}, m: number) => number' is not assignable to type '(this: void, m: number) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'void' is not assignable to type 'D'. +!!! error TS2322: Type 'void' is not assignable to type '{|D|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:19:7 /// class-based polymorphic assignability (with inheritance!) /// @@ -351,19 +415,29 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(178,22): e b1.polymorphic = b2.polymorphic // error, 'this.y' not in Base1: { x } ~~~~~~~~~~~~~~ -!!! error TS2322: Type '(this: Base2) => number' is not assignable to type '(this: Base1) => number'. +!!! error TS2322: Type '(this: {|Base2|0|}) => number' is not assignable to type '(this: {|Base1|1|}) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Property 'y' is missing in type 'Base1' but required in type 'Base2'. +!!! error TS2322: Property 'y' is missing in type '{|Base1|2|}' but required in type '{|Base2|3|}'. !!! related TS2728 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:131:5: 'y' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:130:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:121:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:121:7 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:130:7 b1.explicit = b2.polymorphic // error, 'y' not in Base1: { x } ~~~~~~~~~~~ -!!! error TS2322: Type '(this: Base2) => number' is not assignable to type '(this: Base1) => number'. +!!! error TS2322: Type '(this: {|Base2|0|}) => number' is not assignable to type '(this: {|Base1|1|}) => number'. !!! error TS2322: The 'this' types of each signature are incompatible. -!!! error TS2322: Type 'Base1' is not assignable to type 'Base2'. +!!! error TS2322: Type '{|Base1|2|}' is not assignable to type '{|Base2|3|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:130:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:121:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:121:7 +!!! annotated symbol 3 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:130:7 d1.explicit = b2.polymorphic // error, 'y' not in Base1: { x } ~~~~~~~~~~~ -!!! error TS2322: Type '(this: Base2) => number' is not assignable to type '(this: Base1) => number'. +!!! error TS2322: Type '(this: {|Base2|0|}) => number' is not assignable to type '(this: {|Base1|1|}) => number'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:130:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts:121:7 ////// use this-type for construction with new //// function VoidThis(this: void) { diff --git a/tests/baselines/reference/tsxAttributeErrors.errors.txt b/tests/baselines/reference/tsxAttributeErrors.errors.txt index b51149e701877..181ad6dd72de1 100644 --- a/tests/baselines/reference/tsxAttributeErrors.errors.txt +++ b/tests/baselines/reference/tsxAttributeErrors.errors.txt @@ -34,9 +34,12 @@ tests/cases/conformance/jsx/tsxAttributeErrors.tsx(21,2): error TS2322: Type '{ var attribs = { text: 100 };
; ~~~ -!!! error TS2322: Type '{ text: number; }' is not assignable to type '{ text?: string; width?: number; }'. +!!! error TS2322: Type '{ {|text|0|}: number; }' is not assignable to type '{ {|text|1|}?: string; {|width|2|}?: number; }'. !!! error TS2322: Types of property 'text' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxAttributeErrors.tsx:20:17 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxAttributeErrors.tsx:5:4 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxAttributeErrors.tsx:6:4 // No errors here ; diff --git a/tests/baselines/reference/tsxAttributeResolution1.errors.txt b/tests/baselines/reference/tsxAttributeResolution1.errors.txt index 9fc3e8f94da18..46b60081292d5 100644 --- a/tests/baselines/reference/tsxAttributeResolution1.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution1.errors.txt @@ -39,25 +39,32 @@ tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type 'number' is not a !!! related TS6500 tests/cases/conformance/jsx/file.tsx:10:2: The expected type comes from property 'x' which is declared here on type 'Attribs1' ; // Error, no property "y" ~~~~~ -!!! error TS2322: Type '{ y: number; }' is not assignable to type 'Attribs1'. +!!! error TS2322: Type '{ {|y|0|}: number; }' is not assignable to type '{|Attribs1|1|}'. !!! error TS2322: Property 'y' does not exist on type 'Attribs1'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:24:8 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:9:11 ; // Error, no property "y" ~~~~~ -!!! error TS2322: Type '{ y: string; }' is not assignable to type 'Attribs1'. +!!! error TS2322: Type '{ {|y|0|}: string; }' is not assignable to type '{|Attribs1|1|}'. !!! error TS2322: Property 'y' does not exist on type 'Attribs1'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:25:8 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:9:11 ; // Error, "32" is not number ~ !!! error TS2322: Type 'string' is not assignable to type 'number'. !!! related TS6500 tests/cases/conformance/jsx/file.tsx:10:2: The expected type comes from property 'x' which is declared here on type 'Attribs1' ; // Error, no 'var' property ~~~~~ -!!! error TS2322: Type '{ var: string; }' is not assignable to type 'Attribs1'. +!!! error TS2322: Type '{ {|var|0|}: string; }' is not assignable to type '{|Attribs1|1|}'. !!! error TS2322: Property 'var' does not exist on type 'Attribs1'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:27:8 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:9:11 ; // Error, missing reqd ~~~~~ -!!! error TS2741: Property 'reqd' is missing in type '{}' but required in type '{ reqd: string; }'. +!!! error TS2741: Property 'reqd' is missing in type '{}' but required in type '{ {|reqd|0|}: string; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:12: 'reqd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:5:12 ; // Error, reqd is not string ~~~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. diff --git a/tests/baselines/reference/tsxAttributeResolution11.errors.txt b/tests/baselines/reference/tsxAttributeResolution11.errors.txt index 6c6a23a9b707f..0b8ef521f9029 100644 --- a/tests/baselines/reference/tsxAttributeResolution11.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution11.errors.txt @@ -28,7 +28,10 @@ tests/cases/conformance/jsx/file.tsx(11,10): error TS2322: Type '{ bar: string; // Should be an OK var x = ; ~~~~~~~~~~~ -!!! error TS2322: Type '{ bar: string; }' is not assignable to type 'IntrinsicAttributes & { ref?: string; }'. +!!! error TS2322: Type '{ {|bar|0|}: string; }' is not assignable to type '{|IntrinsicAttributes|1|} & { {|ref|2|}?: string; }'. !!! error TS2322: Property 'bar' does not exist on type 'IntrinsicAttributes & { ref?: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:11:22 +!!! annotated symbol 1 tests/cases/conformance/jsx/react.d.ts:8:12 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:6:4 \ No newline at end of file diff --git a/tests/baselines/reference/tsxAttributeResolution12.errors.txt b/tests/baselines/reference/tsxAttributeResolution12.errors.txt index 980617f99ecb9..5d45e5d73ae3c 100644 --- a/tests/baselines/reference/tsxAttributeResolution12.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution12.errors.txt @@ -44,15 +44,21 @@ tests/cases/conformance/jsx/file.tsx(28,11): error TS2322: Type '{}' is not assi const T = TestMod.Test; var t1 = ; ~ -!!! error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { reqd: any; }'. -!!! error TS2322: Property 'reqd' is missing in type '{}' but required in type '{ reqd: any; }'. +!!! error TS2322: Type '{}' is not assignable to type '{|IntrinsicAttributes|0|} & { {|reqd|1|}: any; }'. +!!! error TS2322: Property 'reqd' is missing in type '{}' but required in type '{ {|reqd|2|}: any; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:18:46: 'reqd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/react.d.ts:8:12 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:18:46 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:18:46 // Should error var t2 = ; ~~~~~~~~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { reqd: any; }'. -!!! error TS2322: Property 'reqd' is missing in type '{}' but required in type '{ reqd: any; }'. +!!! error TS2322: Type '{}' is not assignable to type '{|IntrinsicAttributes|0|} & { {|reqd|1|}: any; }'. +!!! error TS2322: Property 'reqd' is missing in type '{}' but required in type '{ {|reqd|2|}: any; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:18:46: 'reqd' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/react.d.ts:8:12 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:18:46 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:18:46 \ No newline at end of file diff --git a/tests/baselines/reference/tsxAttributeResolution15.errors.txt b/tests/baselines/reference/tsxAttributeResolution15.errors.txt index ca86178b57863..18952f3734ad2 100644 --- a/tests/baselines/reference/tsxAttributeResolution15.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution15.errors.txt @@ -16,8 +16,14 @@ tests/cases/conformance/jsx/file.tsx(14,44): error TS7017: Element implicitly ha // Error let a = ~~~~~~~~~~ -!!! error TS2322: Type '{ prop1: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +!!! error TS2322: Type '{ {|prop1|0|}: string; }' is not assignable to type '{|IntrinsicAttributes|1|} & {|IntrinsicClassAttributes|2|}<{|BigGreeter|3|}> & { {|children|4|}?: {|ReactNode|5|}; }'. !!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:11:21 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 /.lib/react.d.ts:2369:15 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:3:7 +!!! annotated symbol 4 /.lib/react.d.ts:175:22 +!!! annotated symbol 5 /.lib/react.d.ts:93:10 // OK let b = { this.textInput = input; }} /> diff --git a/tests/baselines/reference/tsxAttributeResolution3.errors.txt b/tests/baselines/reference/tsxAttributeResolution3.errors.txt index ed5adc9ef0724..84e7741ea3e3e 100644 --- a/tests/baselines/reference/tsxAttributeResolution3.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution3.errors.txt @@ -26,16 +26,20 @@ tests/cases/conformance/jsx/file.tsx(31,8): error TS2322: Type 'number' is not a var obj2 = { x: 32 }; ~~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'Attribs1'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type '{|Attribs1|1|}'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:18:14 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:7:11 // Error, x is missing var obj3 = { y: 32 }; ~~~~~ -!!! error TS2741: Property 'x' is missing in type '{ y: number; }' but required in type 'Attribs1'. +!!! error TS2741: Property 'x' is missing in type '{ {|y|0|}: number; }' but required in type '{|Attribs1|1|}'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:8:2: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:22:14 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:7:11 // OK var obj4 = { x: 32, y: 32 }; diff --git a/tests/baselines/reference/tsxAttributeResolution5.errors.txt b/tests/baselines/reference/tsxAttributeResolution5.errors.txt index dfbcc413a9869..1d3b4b4e68bf1 100644 --- a/tests/baselines/reference/tsxAttributeResolution5.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution5.errors.txt @@ -30,24 +30,33 @@ tests/cases/conformance/jsx/file.tsx(29,2): error TS2741: Property 'x' is missin function make2 (obj: T) { return ; // Error (x is number, not string) ~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'Attribs1'. -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'Attribs1'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|Attribs1|1|}'. +!!! error TS2322: Type '{ {|x|2|}: number; }' is not assignable to type '{|Attribs1|3|}'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:20:16 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:8:11 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:20:27 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:8:11 } function make3 (obj: T) { return ; // Error, missing x ~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'Attribs1'. -!!! error TS2322: Property 'x' is missing in type '{ y: string; }' but required in type 'Attribs1'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|Attribs1|1|}'. +!!! error TS2322: Property 'x' is missing in type '{ {|y|2|}: string; }' but required in type '{|Attribs1|3|}'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:9:2: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:24:16 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:8:11 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:24:27 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:8:11 } ; // Error, missing x ~~~~~ -!!! error TS2741: Property 'x' is missing in type '{}' but required in type 'Attribs1'. +!!! error TS2741: Property 'x' is missing in type '{}' but required in type '{|Attribs1|0|}'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:9:2: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:8:11 ; // Error, missing toString \ No newline at end of file diff --git a/tests/baselines/reference/tsxAttributeResolution6.errors.txt b/tests/baselines/reference/tsxAttributeResolution6.errors.txt index c7d13ad918ca0..25b1ee6bd60c1 100644 --- a/tests/baselines/reference/tsxAttributeResolution6.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution6.errors.txt @@ -23,8 +23,9 @@ tests/cases/conformance/jsx/file.tsx(12,2): error TS2741: Property 'n' is missin !!! related TS6500 tests/cases/conformance/jsx/file.tsx:4:12: The expected type comes from property 'n' which is declared here on type '{ n?: boolean; s?: string; }' ; ~~~~~ -!!! error TS2741: Property 'n' is missing in type '{}' but required in type '{ n: boolean; }'. +!!! error TS2741: Property 'n' is missing in type '{}' but required in type '{ {|n|0|}: boolean; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:12: 'n' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:5:12 // OK ; diff --git a/tests/baselines/reference/tsxElementResolution10.errors.txt b/tests/baselines/reference/tsxElementResolution10.errors.txt index edb0f30d51ea0..70116307606bb 100644 --- a/tests/baselines/reference/tsxElementResolution10.errors.txt +++ b/tests/baselines/reference/tsxElementResolution10.errors.txt @@ -17,7 +17,8 @@ tests/cases/conformance/jsx/file.tsx(19,2): error TS2322: Type '{ x: number; ren var Obj1: Obj1type; ; // Error, no render member ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:13:7 interface Obj2type { (n: string): { x: number; render: any; }; @@ -25,5 +26,7 @@ tests/cases/conformance/jsx/file.tsx(19,2): error TS2322: Type '{ x: number; ren var Obj2: Obj2type; ; // OK ~~~~ -!!! error TS2322: Type '{ x: number; render: number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|x|0|}: number; {|render|1|}: number; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:19:7 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:19:14 \ No newline at end of file diff --git a/tests/baselines/reference/tsxElementResolution11.errors.txt b/tests/baselines/reference/tsxElementResolution11.errors.txt index d08a6ed2721c9..286ac8338fc4c 100644 --- a/tests/baselines/reference/tsxElementResolution11.errors.txt +++ b/tests/baselines/reference/tsxElementResolution11.errors.txt @@ -21,8 +21,10 @@ tests/cases/conformance/jsx/file.tsx(17,2): error TS2322: Type '{ x: number; }' var Obj2: Obj2type; ; // Error ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ q?: number; }'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type '{ {|q|1|}?: number; }'. !!! error TS2322: Property 'x' does not exist on type '{ q?: number; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:17:7 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:14:20 interface Obj3type { new(n: string): { x: number; }; diff --git a/tests/baselines/reference/tsxElementResolution15.errors.txt b/tests/baselines/reference/tsxElementResolution15.errors.txt index 51b44c862322f..69b92607d0e90 100644 --- a/tests/baselines/reference/tsxElementResolution15.errors.txt +++ b/tests/baselines/reference/tsxElementResolution15.errors.txt @@ -17,5 +17,6 @@ tests/cases/conformance/jsx/file.tsx(11,2): error TS2322: Type '{ x: number; }' var Obj1: Obj1type; ; // Error ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:11:7 \ No newline at end of file diff --git a/tests/baselines/reference/tsxElementResolution3.errors.txt b/tests/baselines/reference/tsxElementResolution3.errors.txt index f220dbd8a5bdd..e39d94d27ef56 100644 --- a/tests/baselines/reference/tsxElementResolution3.errors.txt +++ b/tests/baselines/reference/tsxElementResolution3.errors.txt @@ -16,5 +16,7 @@ tests/cases/conformance/jsx/file.tsx(12,2): error TS2322: Type '{ w: string; }' // Error ; ~~~~ -!!! error TS2322: Type '{ w: string; }' is not assignable to type '{ n: string; }'. -!!! error TS2322: Property 'w' does not exist on type '{ n: string; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|w|0|}: string; }' is not assignable to type '{ {|n|1|}: string; }'. +!!! error TS2322: Property 'w' does not exist on type '{ n: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:12:7 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:4:21 \ No newline at end of file diff --git a/tests/baselines/reference/tsxElementResolution4.errors.txt b/tests/baselines/reference/tsxElementResolution4.errors.txt index f76925030f27b..5d838765ef710 100644 --- a/tests/baselines/reference/tsxElementResolution4.errors.txt +++ b/tests/baselines/reference/tsxElementResolution4.errors.txt @@ -20,6 +20,8 @@ tests/cases/conformance/jsx/file.tsx(16,2): error TS2322: Type '{ q: string; }' // Error ; ~~~~ -!!! error TS2322: Type '{ q: string; }' is not assignable to type '{ m: string; }'. +!!! error TS2322: Type '{ {|q|0|}: string; }' is not assignable to type '{ {|m|1|}: string; }'. !!! error TS2322: Property 'q' does not exist on type '{ m: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:16:7 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:5:14 \ No newline at end of file diff --git a/tests/baselines/reference/tsxElementResolution9.errors.txt b/tests/baselines/reference/tsxElementResolution9.errors.txt index acfe7ce9cca97..a442e4964e007 100644 --- a/tests/baselines/reference/tsxElementResolution9.errors.txt +++ b/tests/baselines/reference/tsxElementResolution9.errors.txt @@ -34,5 +34,6 @@ tests/cases/conformance/jsx/file.tsx(25,2): error TS2322: Type '{ x: number; }' var Obj3: Obj3; ; // OK ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'number'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:25:7 \ No newline at end of file diff --git a/tests/baselines/reference/tsxIntrinsicAttributeErrors.errors.txt b/tests/baselines/reference/tsxIntrinsicAttributeErrors.errors.txt index c26eb2f7d3dbb..4fd188a0524a3 100644 --- a/tests/baselines/reference/tsxIntrinsicAttributeErrors.errors.txt +++ b/tests/baselines/reference/tsxIntrinsicAttributeErrors.errors.txt @@ -32,6 +32,8 @@ tests/cases/conformance/jsx/tsxIntrinsicAttributeErrors.tsx(29,2): error TS2741: var E: I; ~ -!!! error TS2741: Property 'key' is missing in type '{ x: number; }' but required in type 'IntrinsicAttributes'. +!!! error TS2741: Property 'key' is missing in type '{ {|x|0|}: number; }' but required in type '{|IntrinsicAttributes|1|}'. !!! related TS2728 tests/cases/conformance/jsx/tsxIntrinsicAttributeErrors.tsx:7:9: 'key' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxIntrinsicAttributeErrors.tsx:29:4 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxIntrinsicAttributeErrors.tsx:6:15 \ No newline at end of file diff --git a/tests/baselines/reference/tsxInvokeComponentType.errors.txt b/tests/baselines/reference/tsxInvokeComponentType.errors.txt index 7b05474e819d0..dd890967fc2bd 100644 --- a/tests/baselines/reference/tsxInvokeComponentType.errors.txt +++ b/tests/baselines/reference/tsxInvokeComponentType.errors.txt @@ -9,8 +9,9 @@ tests/cases/compiler/tsxInvokeComponentType.tsx(6,14): error TS2741: Property 's const bad = ; ~~~~ -!!! error TS2741: Property 'someKey' is missing in type '{}' but required in type '{ someKey: string; }'. +!!! error TS2741: Property 'someKey' is missing in type '{}' but required in type '{ {|someKey|0|}: string; }'. !!! related TS2728 tests/cases/compiler/tsxInvokeComponentType.tsx:4:37: 'someKey' is declared here. +!!! annotated symbol 0 tests/cases/compiler/tsxInvokeComponentType.tsx:4:37 const good = ; diff --git a/tests/baselines/reference/tsxLibraryManagedAttributes.errors.txt b/tests/baselines/reference/tsxLibraryManagedAttributes.errors.txt index b34ee77d1fbc5..1afe248514f67 100644 --- a/tests/baselines/reference/tsxLibraryManagedAttributes.errors.txt +++ b/tests/baselines/reference/tsxLibraryManagedAttributes.errors.txt @@ -78,13 +78,37 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232 const a = ; const b = ; // Error, missing required prop bar ~~~~~~~~~ -!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Defaultize; bar: PropTypeChecker; baz: PropTypeChecker; }>, { foo: number; }>'. +!!! error TS2322: Type '{ {|foo|0|}: number; }' is not assignable to type '{|Defaultize|1|}<{|InferredPropTypes|2|}<{ {|foo|3|}: {|PropTypeChecker|4|}; {|bar|5|}: {|PropTypeChecker|6|}<{|ReactNode|7|}, false>; {|baz|8|}: {|PropTypeChecker|9|}; }>, { {|foo|10|}: number; }>'. !!! error TS2322: Type '{ foo: number; }' is missing the following properties from type '{ bar: string | number | ReactComponent<{}, {}> | null | undefined; baz: string; }': bar, baz +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:55:22 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:1:6 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:6:6 +!!! annotated symbol 3 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:45:9 +!!! annotated symbol 4 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 5 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:46:9 +!!! annotated symbol 6 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 7 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:21:6 +!!! annotated symbol 8 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:47:9 +!!! annotated symbol 9 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 10 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:50:9 const c = ; const d = ; // Error, baz not a valid prop ~~~~~~~~~ -!!! error TS2322: Type '{ bar: string; baz: string; bat: string; }' is not assignable to type 'Defaultize; bar: PropTypeChecker; baz: PropTypeChecker; }>, { foo: number; }>'. +!!! error TS2322: Type '{ {|bar|0|}: string; {|baz|1|}: string; {|bat|2|}: string; }' is not assignable to type '{|Defaultize|3|}<{|InferredPropTypes|4|}<{ {|foo|5|}: {|PropTypeChecker|6|}; {|bar|7|}: {|PropTypeChecker|8|}<{|ReactNode|9|}, false>; {|baz|10|}: {|PropTypeChecker|11|}; }>, { {|foo|12|}: number; }>'. !!! error TS2322: Property 'bat' does not exist on type 'Defaultize; bar: PropTypeChecker; baz: PropTypeChecker; }>, { foo: number; }>'. +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:57:22 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:57:32 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:57:41 +!!! annotated symbol 3 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:1:6 +!!! annotated symbol 4 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:6:6 +!!! annotated symbol 5 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:45:9 +!!! annotated symbol 6 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 7 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:46:9 +!!! annotated symbol 8 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 9 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:21:6 +!!! annotated symbol 10 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:47:9 +!!! annotated symbol 11 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 12 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:50:9 const e = ; // bar is nullable/undefinable since it's not marked `isRequired` const f = ; // Error, baz is _not_ nullable/undefinable since it's marked `isRequired` ~~~ @@ -105,8 +129,9 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232 const i = ; const j = ; // error, bar is required ~~~ -!!! error TS2322: Type 'null' is not assignable to type 'ReactNode'. +!!! error TS2322: Type 'null' is not assignable to type '{|ReactNode|0|}'. !!! related TS6500 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:64:9: The expected type comes from property 'bar' which is declared here on type 'InferredPropTypes<{ foo: PropTypeChecker; bar: PropTypeChecker; }>' +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:21:6 class JustDefaultProps extends ReactComponent { static defaultProps = { @@ -117,8 +142,12 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232 const k = ; const l = ; // error, no prop named bar ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ foo: number; bar: string; }' is not assignable to type 'Defaultize<{}, { foo: number; }>'. +!!! error TS2322: Type '{ {|foo|0|}: number; {|bar|1|}: string; }' is not assignable to type '{|Defaultize|2|}<{}, { {|foo|3|}: number; }>'. !!! error TS2322: Property 'bar' does not exist on type 'Defaultize<{}, { foo: number; }>'. +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:80:29 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:80:38 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:1:6 +!!! annotated symbol 3 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:75:9 const m = ; // error, wrong type ~~~ !!! error TS2322: Type 'string' is not assignable to type 'number | undefined'. @@ -141,13 +170,39 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232 const n = ; const o = ; // Error, missing required prop bar ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Defaultize; bar: PropTypeChecker; baz: PropTypeChecker; }>, { foo: string; }>'. +!!! error TS2322: Type '{ {|foo|0|}: string; }' is not assignable to type '{|Defaultize|1|}<{|FooProps|2|} & {|InferredPropTypes|3|}<{ {|foo|4|}: {|PropTypeChecker|5|}; {|bar|6|}: {|PropTypeChecker|7|}<{|ReactNode|8|}, false>; {|baz|9|}: {|PropTypeChecker|10|}; }>, { {|foo|11|}: string; }>'. !!! error TS2322: Type '{ foo: string; }' is missing the following properties from type '{ bar: string | number | ReactComponent<{}, {}> | null | undefined; baz: number; }': bar, baz +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:98:37 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:1:6 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:83:11 +!!! annotated symbol 3 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:6:6 +!!! annotated symbol 4 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:89:9 +!!! annotated symbol 5 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 6 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:90:9 +!!! annotated symbol 7 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 8 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:21:6 +!!! annotated symbol 9 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:91:9 +!!! annotated symbol 10 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 11 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:94:9 const p = ; const q = ; // Error, baz not a valid prop ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ bar: string; baz: number; bat: string; }' is not assignable to type 'Defaultize; bar: PropTypeChecker; baz: PropTypeChecker; }>, { foo: string; }>'. +!!! error TS2322: Type '{ {|bar|0|}: string; {|baz|1|}: number; {|bat|2|}: string; }' is not assignable to type '{|Defaultize|3|}<{|FooProps|4|} & {|InferredPropTypes|5|}<{ {|foo|6|}: {|PropTypeChecker|7|}; {|bar|8|}: {|PropTypeChecker|9|}<{|ReactNode|10|}, false>; {|baz|11|}: {|PropTypeChecker|12|}; }>, { {|foo|13|}: string; }>'. !!! error TS2322: Property 'bat' does not exist on type 'Defaultize; bar: PropTypeChecker; baz: PropTypeChecker; }>, { foo: string; }>'. +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:100:37 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:100:47 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:100:56 +!!! annotated symbol 3 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:1:6 +!!! annotated symbol 4 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:83:11 +!!! annotated symbol 5 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:6:6 +!!! annotated symbol 6 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:89:9 +!!! annotated symbol 7 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 8 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:90:9 +!!! annotated symbol 9 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 10 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:21:6 +!!! annotated symbol 11 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:91:9 +!!! annotated symbol 12 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:9:11 +!!! annotated symbol 13 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:94:9 const r = ; // bar is nullable/undefinable since it's not marked `isRequired` const s = ; // Error, baz is _not_ nullable/undefinable since it's marked `isRequired` ~~~ @@ -170,8 +225,9 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232 !!! related TS6500 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:84:5: The expected type comes from property 'foo' which is declared here on type 'FooProps & InferredPropTypes<{ foo: PropTypeChecker; bar: PropTypeChecker; }>' const w = ; // error, bar is required ~~~ -!!! error TS2322: Type 'null' is not assignable to type 'ReactNode'. +!!! error TS2322: Type 'null' is not assignable to type '{|ReactNode|0|}'. !!! related TS6500 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:107:9: The expected type comes from property 'bar' which is declared here on type 'FooProps & InferredPropTypes<{ foo: PropTypeChecker; bar: PropTypeChecker; }>' +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:21:6 class JustDefaultPropsWithSpecifiedGeneric extends ReactComponent { static defaultProps = { @@ -182,8 +238,13 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232 const x = ; const y = ; // error, no prop named bar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ foo: string; bar: string; }' is not assignable to type 'Defaultize'. +!!! error TS2322: Type '{ {|foo|0|}: string; {|bar|1|}: string; }' is not assignable to type '{|Defaultize|2|}<{|FooProps|3|}, { {|foo|4|}: string; }>'. !!! error TS2322: Property 'bar' does not exist on type 'Defaultize'. +!!! annotated symbol 0 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:122:49 +!!! annotated symbol 1 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:122:58 +!!! annotated symbol 2 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:1:6 +!!! annotated symbol 3 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:83:11 +!!! annotated symbol 4 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:117:9 const z = ; // error, wrong type ~~~ !!! error TS2322: Type 'number' is not assignable to type 'string | undefined'. diff --git a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt index 7fe6609cc9615..d8fceb3a0a43a 100644 --- a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt +++ b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt @@ -19,11 +19,16 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,14): error TS2322: Type } let x = ; // should error ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'P'. -!!! error TS2322: '{}' is assignable to the constraint of type 'P', but 'P' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{|P|0|}'. +!!! error TS2322: '{}' is assignable to the constraint of type '{|P|1|}', but '{|P|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:5:15 +!!! annotated symbol 1 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:5:15 +!!! annotated symbol 2 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:5:15 let y = ; // should error ~~~~~~~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'Readonly

'. +!!! error TS2322: Type '{}' is not assignable to type '{|Readonly|0|}<{|P|1|}>'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1438:6 +!!! annotated symbol 1 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:5:15 let z = // should work let q = // should work diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt index 36b86e8aaf27c..86660307ee3d8 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt @@ -43,8 +43,12 @@ tests/cases/conformance/jsx/file.tsx(30,11): error TS2322: Type '{ y: true; x: 2 let x2 = let x3 = ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'. +!!! error TS2322: Type '{ {|y|0|}: true; {|x|1|}: 2; {|overwrite|2|}: string; }' is not assignable to type '{|Prop|3|}'. !!! error TS2322: Types of property 'y' are incompatible. !!! error TS2322: Type 'true' is not assignable to type 'false'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:30:55 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:4:14 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:30:25 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:12:11 \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt index 67beb30ccb021..218b43c3e7523 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt @@ -15,8 +15,13 @@ tests/cases/conformance/jsx/file.tsx(11,10): error TS2322: Type '{ Property1: tr // Error extra property ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ Property1: true; property1: string; property2: number; }' is not assignable to type 'IntrinsicAttributes & AnotherComponentProps'. +!!! error TS2322: Type '{ {|Property1|0|}: true; {|property1|1|}: string; {|property2|2|}: number; }' is not assignable to type '{|IntrinsicAttributes|3|} & {|AnotherComponentProps|4|}'. !!! error TS2322: Property 'Property1' does not exist on type 'IntrinsicAttributes & AnotherComponentProps'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:11:38 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:4:5 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:5:5 +!!! annotated symbol 3 /.lib/react.d.ts:2367:15 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:15:11 ); } diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt index 2d75aba9b9a70..8c2b356440a5e 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt @@ -14,8 +14,11 @@ tests/cases/conformance/jsx/file.tsx(11,10): error TS2741: Property 'AnotherProp // Error: missing property ~~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }' but required in type 'AnotherComponentProps'. +!!! error TS2741: Property 'AnotherProperty1' is missing in type '{ {|property1|0|}: string; {|property2|1|}: number; }' but required in type '{|AnotherComponentProps|2|}'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:17:5: 'AnotherProperty1' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:4:5 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:5:5 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:15:11 ); } diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt index d9748382f25b9..02b15ed35aa56 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt @@ -44,10 +44,22 @@ tests/cases/conformance/jsx/file.tsx(24,11): error TS2322: Type '{ X: string; x: !!! related TS6500 tests/cases/conformance/jsx/file.tsx:5:5: The expected type comes from property 'y' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }' let w = ; ~~~~~~~~ -!!! error TS2322: Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'. +!!! error TS2322: Type '{ {|x|0|}: number; {|y|1|}: "2"; }' is not assignable to type '{|PoisonedProp|2|}'. !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:23:24 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:23:30 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:11 let w1 = ; ~~~~~~~~ -!!! error TS2322: Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'. -!!! error TS2322: Property 'X' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'. \ No newline at end of file +!!! error TS2322: Type '{ {|X|0|}: string; {|x|1|}: number; {|y|2|}: "2"; }' is not assignable to type '{|IntrinsicAttributes|3|} & {|IntrinsicClassAttributes|4|}<{|Poisoned|5|}> & {|PoisonedProp|6|} & { {|children|7|}?: {|ReactNode|8|}; }'. +!!! error TS2322: Property 'X' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:24:40 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:24:25 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:24:31 +!!! annotated symbol 3 /.lib/react.d.ts:2367:15 +!!! annotated symbol 4 /.lib/react.d.ts:2369:15 +!!! annotated symbol 5 tests/cases/conformance/jsx/file.tsx:8:7 +!!! annotated symbol 6 tests/cases/conformance/jsx/file.tsx:3:11 +!!! annotated symbol 7 /.lib/react.d.ts:175:22 +!!! annotated symbol 8 /.lib/react.d.ts:93:10 \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt index 22fa2022badb7..d895e8993cc5f 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt @@ -26,9 +26,12 @@ tests/cases/conformance/jsx/file.tsx(33,10): error TS2559: Type '{ prop1: boolea // Error as "obj" has type { x: string; y: number } let p = ; ~~~~~~~~ -!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'. +!!! error TS2322: Type '{ {|x|0|}: string; {|y|1|}: number; }' is not assignable to type '{|PoisonedProp|2|}'. !!! error TS2322: Types of property 'y' are incompatible. !!! error TS2322: Type 'number' is not assignable to type '2'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:15:5 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:16:5 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:11 class EmptyProp extends React.Component<{}, {}> { render() { diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt index 0027abe10921b..d3ead32a5dcd9 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt @@ -17,9 +17,26 @@ tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: tru // Error let x = ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'. -!!! error TS2322: Property 'onEdit' is missing in type '{ editable: true; }' but required in type '{ editable: true; onEdit: (newText: string) => void; }'. +!!! error TS2322: Type '{ {|editable|0|}: true; }' is not assignable to type '({|IntrinsicAttributes|1|} & {|IntrinsicClassAttributes|2|}<{|TextComponent|3|}> & { {|editable|4|}: false; } & { {|children|5|}?: {|ReactNode|6|}; }) | ({|IntrinsicAttributes|7|} & {|IntrinsicClassAttributes|8|}<{|TextComponent|9|}> & { {|editable|10|}: true; {|onEdit|11|}: (newText: string) => void; } & { {|children|12|}?: {|ReactNode|13|}; })'. +!!! error TS2322: Property 'onEdit' is missing in type '{ {|editable|14|}: true; }' but required in type '{ {|editable|15|}: true; {|onEdit|16|}: (newText: string) => void; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:4:36: 'onEdit' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:13:24 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 /.lib/react.d.ts:2369:15 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:6:7 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:3:20 +!!! annotated symbol 5 /.lib/react.d.ts:175:22 +!!! annotated symbol 6 /.lib/react.d.ts:93:10 +!!! annotated symbol 7 /.lib/react.d.ts:2367:15 +!!! annotated symbol 8 /.lib/react.d.ts:2369:15 +!!! annotated symbol 9 tests/cases/conformance/jsx/file.tsx:6:7 +!!! annotated symbol 10 tests/cases/conformance/jsx/file.tsx:4:20 +!!! annotated symbol 11 tests/cases/conformance/jsx/file.tsx:4:36 +!!! annotated symbol 12 /.lib/react.d.ts:175:22 +!!! annotated symbol 13 /.lib/react.d.ts:93:10 +!!! annotated symbol 14 tests/cases/conformance/jsx/file.tsx:13:24 +!!! annotated symbol 15 tests/cases/conformance/jsx/file.tsx:4:20 +!!! annotated symbol 16 tests/cases/conformance/jsx/file.tsx:4:36 const textProps: TextProps = { editable: false diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt index 733bb200e9960..5f34ee4ce5794 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt @@ -29,12 +29,19 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type 'string' is not // Error const c0 = ; // extra property; ~~~~~~~~ -!!! error TS2322: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! error TS2322: Type '{ {|extraProp|0|}: true; }' is not assignable to type '{|IntrinsicAttributes|1|} & { {|yy|2|}: number; {|yy1|3|}: string; }'. !!! error TS2322: Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:12:22 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:31 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:3:43 const c1 = ; // missing property; ~~~~~~~~ -!!! error TS2741: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'. +!!! error TS2741: Property 'yy1' is missing in type '{ {|yy|0|}: number; }' but required in type '{ {|yy|1|}: number; {|yy1|2|}: string; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:3:43: 'yy1' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:13:22 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:3:31 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:43 const c2 = ; // type incompatible; ~~~ !!! error TS2322: Type 'true' is not assignable to type 'string'. @@ -42,13 +49,23 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type 'string' is not const c3 = ; // This is OK becuase all attribute are spread const c4 = ; // extra property; ~~~~~~~~ -!!! error TS2322: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! error TS2322: Type '{ {|y1|0|}: number; {|yy|1|}: number; {|yy1|2|}: string; }' is not assignable to type '{|IntrinsicAttributes|3|} & { {|yy|4|}: number; {|yy1|5|}: string; }'. !!! error TS2322: Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:16:31 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:6:5 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:7:5 +!!! annotated symbol 3 /.lib/react.d.ts:2367:15 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:3:31 +!!! annotated symbol 5 tests/cases/conformance/jsx/file.tsx:3:43 const c5 = ; // type incompatible; ~~~~~~~~ -!!! error TS2322: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'. +!!! error TS2322: Type '{ {|yy|0|}: boolean; {|yy1|1|}: string; }' is not assignable to type '{ {|yy|2|}: number; {|yy1|3|}: string; }'. !!! error TS2322: Types of property 'yy' are incompatible. !!! error TS2322: Type 'boolean' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:17:36 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:7:5 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:31 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:3:43 const c6 = ; // Should error as there is extra attribute that doesn't match any. Current it is not const c7 = ; // Should error as there is extra attribute that doesn't match any. Current it is not @@ -58,8 +75,11 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type 'string' is not // Error const d1 = ~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'. +!!! error TS2741: Property 'yy' is missing in type '{ {|extra-data|0|}: true; }' but required in type '{ {|yy|1|}: string; {|direction|2|}?: number; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:22:38: 'yy' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:25:29 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:22:38 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:22:50 const d2 = ~~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type 'number'. diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt index 9101537a6e976..db9b52489a2ac 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt @@ -55,8 +55,13 @@ tests/cases/conformance/jsx/file.tsx(56,24): error TS2322: Type 'true' is not as // Error const b0 = {}}>GO; // extra property; ~~~~~~~~~~ -!!! error TS2322: Type '{ children: string; to: string; onClick: (e: any) => void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. +!!! error TS2322: Type '{ {|children|0|}: string; {|to|1|}: string; {|onClick|2|}: (e: any) => void; }' is not assignable to type '{|IntrinsicAttributes|3|} & {|HyphenProps|4|}'. !!! error TS2322: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'. +!!! annotated dropped!: 0 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:48:24 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:48:40 +!!! annotated symbol 3 /.lib/react.d.ts:2367:15 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:16:18 const b1 = {}} {...obj0}>Hello world; // extra property; const b2 = ; // extra property const b3 = {}}} />; // extra property diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt index 2ca7adfbc3e69..04da0948d293e 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt @@ -33,8 +33,11 @@ tests/cases/conformance/jsx/file.tsx(45,11): error TS2559: Type '{ prop1: boolea // Error let b = ; ~~~~~ -!!! error TS2322: Type '{ naaame: string; }' is not assignable to type 'IntrinsicAttributes & { name: string; }'. +!!! error TS2322: Type '{ {|naaame|0|}: string; }' is not assignable to type '{|IntrinsicAttributes|1|} & { {|name|2|}: string; }'. !!! error TS2322: Property 'naaame' does not exist on type 'IntrinsicAttributes & { name: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:19:16 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:5:20 // OK let c = ; @@ -48,26 +51,35 @@ tests/cases/conformance/jsx/file.tsx(45,11): error TS2559: Type '{ prop1: boolea // Error let f = ; ~~~~ -!!! error TS2322: Type '{ naaaaaaame: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. +!!! error TS2322: Type '{ {|naaaaaaame|0|}: string; }' is not assignable to type '{|IntrinsicAttributes|1|} & { {|name|2|}?: string; }'. !!! error TS2322: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:29:15 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated dropped!: 2 // OK let g = ; // Error let h = ; ~~~~~~~~~~~~ -!!! error TS2741: Property '"prop-name"' is missing in type '{ extra-prop-name: string; }' but required in type '{ "prop-name": string; }'. +!!! error TS2741: Property '"prop-name"' is missing in type '{ {|extra-prop-name|0|}: string; }' but required in type '{ {|"prop-name"|1|}: string; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:11:27: '"prop-name"' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:34:23 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:11:27 // Error let i = ~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ {|prop1|0|}: true; }' is not assignable to type '{|IntrinsicAttributes|1|}'. !!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:37:23 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 let i1 = x.greeting.substr(10)} /> ~~~~~~~~~~~~ -!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ {|ref|0|}: (x: any) => any; }' is not assignable to type '{|IntrinsicAttributes|1|}'. !!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:38:24 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 let o = { prop1: true; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt index 551d0e7252391..fea080e70ba0f 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt @@ -26,8 +26,11 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot // Error - not allowed to specify 'ref' on SFCs let c = ; ~~~~~ -!!! error TS2322: Type '{ ref: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. +!!! error TS2322: Type '{ {|ref|0|}: string; }' is not assignable to type '{|IntrinsicAttributes|1|} & { {|name|2|}?: string; }'. !!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:19:16 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:20 // OK - ref is valid for classes diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt index 7a6a6fbdcbacc..fec316c5faa15 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt @@ -25,8 +25,15 @@ tests/cases/conformance/jsx/file.tsx(31,52): error TS2322: Type '(val: string) = function Baz(arg: T) { let a0 = ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }'. -!!! error TS2322: Type 'T' is not assignable to type '{ prop: unknown; "ignore-prop": string; }'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|IntrinsicAttributes|1|} & { {|prop|2|}: unknown; {|"ignore-prop"|3|}: string; }'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{ {|prop|5|}: unknown; {|"ignore-prop"|6|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:12:14 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:3:44 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:3:53 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:12:14 +!!! annotated symbol 5 tests/cases/conformance/jsx/file.tsx:3:44 +!!! annotated symbol 6 tests/cases/conformance/jsx/file.tsx:3:53 } declare function Link(l: {func: (arg: U)=>void}): JSX.Element; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt index 38d4435a46d8c..eb2876dfd1ee7 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt @@ -14,11 +14,23 @@ tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-pr function Baz(arg1: T, arg2: U) { let a0 = ~~~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'. +!!! error TS2741: Property 'b' is missing in type '{ {|a|0|}: number; }' but required in type '{ {|b|1|}: unknown; {|a|2|}: number; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:49: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:9:33 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:5:49 +!!! annotated symbol 2 tests/cases/conformance/jsx/file.tsx:5:55 let a2 = // missing a ~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'. -!!! error TS2322: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: unknown; }'. +!!! error TS2322: Type '{|T|0|} & { {|ignore-prop|1|}: true; }' is not assignable to type '{|IntrinsicAttributes|2|} & { {|b|3|}: unknown; {|a|4|}: unknown; }'. +!!! error TS2322: Property 'a' is missing in type '{ {|b|5|}: number; } & { {|ignore-prop|6|}: true; }' but required in type '{ {|b|7|}: unknown; {|a|8|}: unknown; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:55: 'a' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:8:14 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:10:43 +!!! annotated symbol 2 /.lib/react.d.ts:2367:15 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:5:49 +!!! annotated symbol 4 tests/cases/conformance/jsx/file.tsx:5:55 +!!! annotated symbol 5 tests/cases/conformance/jsx/file.tsx:8:25 +!!! annotated symbol 6 tests/cases/conformance/jsx/file.tsx:10:43 +!!! annotated symbol 7 tests/cases/conformance/jsx/file.tsx:5:49 +!!! annotated symbol 8 tests/cases/conformance/jsx/file.tsx:5:55 } \ No newline at end of file diff --git a/tests/baselines/reference/tsxTypeArgumentResolution.errors.txt b/tests/baselines/reference/tsxTypeArgumentResolution.errors.txt index 7b429f073dd37..ba381410ede7d 100644 --- a/tests/baselines/reference/tsxTypeArgumentResolution.errors.txt +++ b/tests/baselines/reference/tsxTypeArgumentResolution.errors.txt @@ -75,13 +75,17 @@ tests/cases/conformance/jsx/file.tsx(53,47): error TS2322: Type 'string' is not x = a={10} b="hi" />; // error ~~~~ -!!! error TS2344: Type 'Prop' does not satisfy the constraint '{ a: string; }'. +!!! error TS2344: Type '{|Prop|0|}' does not satisfy the constraint '{ {|a|1|}: string; }'. !!! error TS2344: Types of property 'a' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:3:11 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:32:35 x = a={10} b="hi">; // error ~~~~ -!!! error TS2344: Type 'Prop' does not satisfy the constraint '{ a: string; }'. +!!! error TS2344: Type '{|Prop|0|}' does not satisfy the constraint '{ {|a|1|}: string; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:3:11 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:32:35 x = a="hi" b="hi" />; // OK diff --git a/tests/baselines/reference/tsxUnionElementType4.errors.txt b/tests/baselines/reference/tsxUnionElementType4.errors.txt index 4b059d093f8ff..e01a62234dfaa 100644 --- a/tests/baselines/reference/tsxUnionElementType4.errors.txt +++ b/tests/baselines/reference/tsxUnionElementType4.errors.txt @@ -45,10 +45,22 @@ tests/cases/conformance/jsx/file.tsx(34,10): error TS2322: Type '{ prop: true; } !!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:36: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & { x: number; } & { children?: ReactNode; } & { x: string; } & { children?: ReactNode; }' let b = ~~~~~~~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +!!! error TS2322: Type '{ {|x|0|}: number; }' is not assignable to type '{|IntrinsicAttributes|1|} & {|IntrinsicClassAttributes|2|}<{|RC4|3|}> & { {|children|4|}?: {|ReactNode|5|}; }'. !!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:33:21 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 /.lib/react.d.ts:2369:15 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:22:7 +!!! annotated symbol 4 /.lib/react.d.ts:175:22 +!!! annotated symbol 5 /.lib/react.d.ts:93:10 let c = ; ~~~~~~~~~~~ -!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +!!! error TS2322: Type '{ {|prop|0|}: true; }' is not assignable to type '{|IntrinsicAttributes|1|} & {|IntrinsicClassAttributes|2|}<{|RC3|3|}> & { {|children|4|}?: {|ReactNode|5|}; }'. !!! error TS2322: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:34:22 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 +!!! annotated symbol 2 /.lib/react.d.ts:2369:15 +!!! annotated symbol 3 tests/cases/conformance/jsx/file.tsx:16:7 +!!! annotated symbol 4 /.lib/react.d.ts:175:22 +!!! annotated symbol 5 /.lib/react.d.ts:93:10 \ No newline at end of file diff --git a/tests/baselines/reference/tsxUnionElementType6.errors.txt b/tests/baselines/reference/tsxUnionElementType6.errors.txt index 790285f2978c1..dbcea5a990b88 100644 --- a/tests/baselines/reference/tsxUnionElementType6.errors.txt +++ b/tests/baselines/reference/tsxUnionElementType6.errors.txt @@ -25,19 +25,24 @@ tests/cases/conformance/jsx/file.tsx(21,10): error TS2741: Property 'x' is missi // Error let a = ; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ {|x|0|}: true; }' is not assignable to type '{|IntrinsicAttributes|1|}'. !!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes'. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:18:23 +!!! annotated symbol 1 /.lib/react.d.ts:2367:15 let b = ; ~ !!! error TS2322: Type 'string' is not assignable to type 'boolean'. !!! related TS6500 tests/cases/conformance/jsx/file.tsx:11:23: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & { x: boolean; }' let c = ; ~~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'x' is missing in type '{}' but required in type '{ x: boolean; }'. +!!! error TS2741: Property 'x' is missing in type '{}' but required in type '{ {|x|0|}: boolean; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:11:23: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:11:23 let d = ; ~~~~~~~~~~~~~~~~ -!!! error TS2741: Property 'x' is missing in type '{ data-prop: true; }' but required in type '{ x: boolean; }'. +!!! error TS2741: Property 'x' is missing in type '{ {|data-prop|0|}: true; }' but required in type '{ {|x|1|}: boolean; }'. !!! related TS2728 tests/cases/conformance/jsx/file.tsx:11:23: 'x' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsx/file.tsx:21:27 +!!! annotated symbol 1 tests/cases/conformance/jsx/file.tsx:11:23 \ No newline at end of file diff --git a/tests/baselines/reference/typeArgInference2WithError.errors.txt b/tests/baselines/reference/typeArgInference2WithError.errors.txt index 796f49f343863..be33f91dce7cf 100644 --- a/tests/baselines/reference/typeArgInference2WithError.errors.txt +++ b/tests/baselines/reference/typeArgInference2WithError.errors.txt @@ -10,4 +10,5 @@ tests/cases/compiler/typeArgInference2WithError.ts(7,14): error TS2345: Argument var z7 = foo("abc", 5); // Error ~~~~~ -!!! error TS2345: Argument of type '"abc"' is not assignable to parameter of type 'Item'. \ No newline at end of file +!!! error TS2345: Argument of type '"abc"' is not assignable to parameter of type '{|Item|0|}'. +!!! annotated symbol 0 tests/cases/compiler/typeArgInference2WithError.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt b/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt index 6f27916eda0b7..36745744719c8 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.errors.txt @@ -8,7 +8,8 @@ tests/cases/compiler/typeArgumentConstraintResolution1.ts(11,12): error TS2345: function foo1(test: any) { } foo1(""); // should error ~~ -!!! error TS2345: Argument of type '""' is not assignable to parameter of type 'Date'. +!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{|Date|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 @@ -17,5 +18,6 @@ tests/cases/compiler/typeArgumentConstraintResolution1.ts(11,12): error TS2345: function foo2(test: any): any { return null; } foo2(""); // Type Date does not satisfy the constraint 'Number' for type parameter 'T extends Number' ~~ -!!! error TS2345: Argument of type '""' is not assignable to parameter of type 'Date'. +!!! error TS2345: Argument of type '""' is not assignable to parameter of type '{|Date|0|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentDefaultUsesConstraintOnCircularDefault.errors.txt b/tests/baselines/reference/typeArgumentDefaultUsesConstraintOnCircularDefault.errors.txt index 756c1f9da3eba..f77107748622f 100644 --- a/tests/baselines/reference/typeArgumentDefaultUsesConstraintOnCircularDefault.errors.txt +++ b/tests/baselines/reference/typeArgumentDefaultUsesConstraintOnCircularDefault.errors.txt @@ -10,8 +10,10 @@ tests/cases/compiler/typeArgumentDefaultUsesConstraintOnCircularDefault.ts(3,18) let zz: Test = { foo: "abc" }; // should error on comparison with Test ~~~~~~~~~~ -!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Test'. +!!! error TS2322: Type '{ {|foo|0|}: string; }' is not assignable to type '{|Test|1|}'. !!! error TS2322: Object literal may only specify known properties, and 'foo' does not exist in type 'Test'. +!!! annotated symbol 0 tests/cases/compiler/typeArgumentDefaultUsesConstraintOnCircularDefault.ts:3:18 +!!! annotated symbol 1 tests/cases/compiler/typeArgumentDefaultUsesConstraintOnCircularDefault.ts:1:6 let zzy: Test = { value: {} }; diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index 95e47ab583f22..c0feb1dad07bc 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -94,8 +94,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,74 !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Date; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); ~~~~~ -!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. +!!! error TS2345: Argument of type '{ {|x|0|}: number; {|y|1|}: string; }' is not assignable to parameter of type '{|A92|2|}'. !!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts:84:68 +!!! annotated symbol 1 tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts:84:74 +!!! annotated symbol 2 tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts:78:11 var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index 8707ff26ef052..c7bafc91c4511 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -156,8 +156,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~ -!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. +!!! error TS2345: Argument of type '{ {|x|0|}: number; {|y|1|}: string; }' is not assignable to parameter of type '{|A92|2|}'. !!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts:122:68 +!!! annotated symbol 1 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts:122:74 +!!! annotated symbol 2 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts:116:11 var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt index 33e2f2e38c115..18b58b13347bc 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.errors.txt @@ -10,6 +10,11 @@ tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpre // Should not infer string because it is a static property foo(class { static prop = "hello" }).length; ~~~~~ -!!! error TS2345: Argument of type 'typeof (Anonymous class)' is not assignable to parameter of type 'typeof (Anonymous class)'. -!!! error TS2345: Property 'prop' is missing in type '(Anonymous class)' but required in type 'foo.(Anonymous class)'. -!!! related TS2728 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:29: 'prop' is declared here. \ No newline at end of file +!!! error TS2345: Argument of type 'typeof {|(Anonymous class)|0|}' is not assignable to parameter of type 'typeof {|(Anonymous class)|1|}'. +!!! error TS2345: Property 'prop' is missing in type '{|(Anonymous class)|2|}' but required in type '{|foo|3|}.{|(Anonymous class)|4|}'. +!!! related TS2728 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:29: 'prop' is declared here. +!!! annotated symbol 0 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:6:5 +!!! annotated symbol 1 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:21 +!!! annotated symbol 2 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:6:5 +!!! annotated symbol 3 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:10 +!!! annotated symbol 4 tests/cases/conformance/es6/classExpressions/typeArgumentInferenceWithClassExpression2.ts:1:21 \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt index ce0f478610bf2..7b26d763423cf 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt @@ -11,6 +11,10 @@ tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,6): er var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal ~ -!!! error TS2345: Argument of type 'Elephant' is not assignable to parameter of type 'Giraffe'. -!!! error TS2345: Property 'y' is missing in type 'Elephant' but required in type 'Giraffe'. -!!! related TS2728 tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts:2:36: 'y' is declared here. \ No newline at end of file +!!! error TS2345: Argument of type '{|Elephant|0|}' is not assignable to parameter of type '{|Giraffe|1|}'. +!!! error TS2345: Property 'y' is missing in type '{|Elephant|2|}' but required in type '{|Giraffe|3|}'. +!!! related TS2728 tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts:2:36: 'y' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts:3:11 +!!! annotated symbol 1 tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts:2:11 +!!! annotated symbol 2 tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts:3:11 +!!! annotated symbol 3 tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts:2:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index 3b7750f23f009..4640bb39da095 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -61,12 +61,14 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst function someGenerics3(producer: () => T) { } someGenerics3(() => ''); // Error ~~ -!!! error TS2322: Type 'string' is not assignable to type 'Window'. +!!! error TS2322: Type 'string' is not assignable to type '{|Window|0|}'. !!! related TS6502 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:32:52: The expected type comes from the return type of this signature. +!!! annotated symbol 0 /.ts/lib.dom.d.ts:17123:11 someGenerics3(() => undefined); someGenerics3(() => 3); // Error ~~~~~~ -!!! error TS2344: Type 'number' does not satisfy the constraint 'Window'. +!!! error TS2344: Type 'number' does not satisfy the constraint '{|Window|0|}'. +!!! annotated symbol 0 /.ts/lib.dom.d.ts:17123:11 // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type function someGenerics4(n: T, f: (x: U) => void) { } @@ -113,7 +115,16 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst function someGenerics8(n: T): T { return n; } var x = someGenerics8(someGenerics7); // Error ~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '<{|A|0|}, {|B|1|} extends string, {|C|2|}>(a: (a: {|A|3|}) => {|A|4|}, b: (b: {|B|5|}) => {|B|6|}, c: (c: {|C|7|}) => {|C|8|}) => void' is not assignable to parameter of type 'string'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:24 +!!! annotated symbol 1 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:27 +!!! annotated symbol 2 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:45 +!!! annotated symbol 3 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:24 +!!! annotated symbol 4 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:24 +!!! annotated symbol 5 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:27 +!!! annotated symbol 6 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:27 +!!! annotated symbol 7 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:45 +!!! annotated symbol 8 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:59:45 x(null, null, null); // Error // Generic call with multiple parameters of generic type passed arguments with no best common type @@ -142,8 +153,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a9e' must be of type '{ x: number; z: Window; y?: undefined; } | { x: number; y: string; z?: undefined; }', but here has type '{}'. var a9f = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~ -!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. +!!! error TS2345: Argument of type '{ {|x|0|}: number; {|y|1|}: string; }' is not assignable to parameter of type '{|A92|2|}'. !!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:89:64 +!!! annotated symbol 1 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:89:70 +!!! annotated symbol 2 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts:83:11 var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.errors.txt index ff718b4c36413..0a0a1815d48cb 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.errors.txt @@ -38,5 +38,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithObjec var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error ~~~~ -!!! error TS2345: Argument of type 'E2' is not assignable to parameter of type 'E1'. +!!! error TS2345: Argument of type '{|E2|0|}' is not assignable to parameter of type '{|E1|1|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithObjectLiteral.ts:21:6 +!!! annotated symbol 1 tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithObjectLiteral.ts:20:6 \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt b/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt index 2781d2fcee524..f11bc027d8db3 100644 --- a/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt +++ b/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt @@ -11,8 +11,11 @@ tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(4,15): erro !!! error TS2558: Expected 0 type arguments, but got 1. var r2 = f(1); ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'T'. -!!! error TS2345: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '{|T|0|}'. +!!! error TS2345: '1' is assignable to the constraint of type '{|T|1|}', but '{|T|2|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts:1:14 var r3 = f(null); ~~~ !!! error TS2558: Expected 0 type arguments, but got 1. diff --git a/tests/baselines/reference/typeAssertions.errors.txt b/tests/baselines/reference/typeAssertions.errors.txt index ef9a23b8d8ae4..6bc0edf3f3227 100644 --- a/tests/baselines/reference/typeAssertions.errors.txt +++ b/tests/baselines/reference/typeAssertions.errors.txt @@ -58,27 +58,41 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): err someBase = someBase; someBase = someOther; // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. +!!! error TS2352: Conversion of type '{|SomeOther|0|}' to type '{|SomeBase|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'p' is missing in type '{|SomeOther|2|}' but required in type '{|SomeBase|3|}'. !!! related TS2728 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:15:13: 'p' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:14:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:14:7 someDerived = someDerived; someDerived = someBase; someDerived = someOther; // Error ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Conversion of type '{|SomeOther|0|}' to type '{|SomeDerived|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. !!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': x, p +!!! annotated symbol 0 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:17:7 someOther = someDerived; // Error ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. +!!! error TS2352: Conversion of type '{|SomeDerived|0|}' to type '{|SomeOther|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'q' is missing in type '{|SomeDerived|2|}' but required in type '{|SomeOther|3|}'. !!! related TS2728 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:21:13: 'q' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:17:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:17:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 someOther = someBase; // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. +!!! error TS2352: Conversion of type '{|SomeBase|0|}' to type '{|SomeOther|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'q' is missing in type '{|SomeBase|2|}' but required in type '{|SomeOther|3|}'. !!! related TS2728 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:21:13: 'q' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:14:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:14:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts:20:7 someOther = someOther; // Type assertion cannot be a type-predicate type diff --git a/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.errors.txt b/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.errors.txt index 29a7f49d2dbe8..4ac849454b5d0 100644 --- a/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.errors.txt +++ b/tests/baselines/reference/typeAssertionsWithIntersectionTypes01.errors.txt @@ -22,12 +22,19 @@ tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithInt var a = z; ~~~~~~~~~~ -!!! error TS2352: Conversion of type 'I2' to type 'I1 & I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Property 'p3' is missing in type 'I2' but required in type 'I3'. +!!! error TS2352: Conversion of type '{|I2|0|}' to type '{|I1|1|} & {|I3|2|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Property 'p3' is missing in type '{|I2|3|}' but required in type '{|I3|4|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:10:5: 'p3' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:1:11 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:9:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:5:11 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:9:11 var b = z; ~~~~~ -!!! error TS2352: Conversion of type 'I2' to type 'I3' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Conversion of type '{|I2|0|}' to type '{|I3|1|}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:5:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithIntersectionTypes01.ts:9:11 var c = z; var d = y; \ No newline at end of file diff --git a/tests/baselines/reference/typeAssertionsWithUnionTypes01.errors.txt b/tests/baselines/reference/typeAssertionsWithUnionTypes01.errors.txt index 665b49a05cf38..c6e3c41044232 100644 --- a/tests/baselines/reference/typeAssertionsWithUnionTypes01.errors.txt +++ b/tests/baselines/reference/typeAssertionsWithUnionTypes01.errors.txt @@ -17,7 +17,8 @@ tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithUni var a = z; var b = z; ~~~~~~~~~ -!!! error TS2352: Conversion of type 'I1' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Conversion of type '{|I1|0|}' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/comparable/typeAssertionsWithUnionTypes01.ts:1:11 var c = z; var d = y; \ No newline at end of file diff --git a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt index 8df09b665131d..4b96dc5fb91cd 100644 --- a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt +++ b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.errors.txt @@ -11,7 +11,8 @@ tests/cases/compiler/typeCheckingInsideFunctionExpressionInArray.ts(5,5): error !!! error TS2322: Type '10' is not assignable to type 'string'. k = new Object(); ~ -!!! error TS2322: Type 'Object' is not assignable to type 'string'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type 'string'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 [1, 2, 3].NonexistantMethod(); ~~~~~~~~~~~~~~~~~ !!! error TS2339: Property 'NonexistantMethod' does not exist on type 'number[]'. diff --git a/tests/baselines/reference/typeComparisonCaching.errors.txt b/tests/baselines/reference/typeComparisonCaching.errors.txt index 8a94bdf835cef..e36bad471a313 100644 --- a/tests/baselines/reference/typeComparisonCaching.errors.txt +++ b/tests/baselines/reference/typeComparisonCaching.errors.txt @@ -34,12 +34,18 @@ tests/cases/compiler/typeComparisonCaching.ts(27,1): error TS2322: Type 'D' is n a = b; ~ -!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type '{|B|0|}' is not assignable to type '{|A|1|}'. !!! error TS2322: Types of property 's' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/typeComparisonCaching.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/typeComparisonCaching.ts:3:11 c = d; // Should not be allowed ~ -!!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types of property 'q' are incompatible. -!!! error TS2322: Type 'B' is not assignable to type 'A'. +!!! error TS2322: Type '{|B|2|}' is not assignable to type '{|A|3|}'. +!!! annotated symbol 0 tests/cases/compiler/typeComparisonCaching.ts:17:11 +!!! annotated symbol 1 tests/cases/compiler/typeComparisonCaching.ts:13:11 +!!! annotated symbol 2 tests/cases/compiler/typeComparisonCaching.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/typeComparisonCaching.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeFromPropertyAssignment28.errors.txt b/tests/baselines/reference/typeFromPropertyAssignment28.errors.txt index 3fb90fc92f426..f611ea9e645b4 100644 --- a/tests/baselines/reference/typeFromPropertyAssignment28.errors.txt +++ b/tests/baselines/reference/typeFromPropertyAssignment28.errors.txt @@ -12,8 +12,10 @@ tests/cases/conformance/salsa/a.js(11,3): error TS2339: Property 'q' does not ex // (Object.defineProperty isn't recognised as a JS special assignment right now.) C.prototype = { q: 2 }; ~~~~ -!!! error TS2322: Type '{ q: number; }' is not assignable to type 'C'. +!!! error TS2322: Type '{ {|q|0|}: number; }' is not assignable to type '{|C|1|}'. !!! error TS2322: Object literal may only specify known properties, and 'q' does not exist in type 'C'. +!!! annotated symbol 0 tests/cases/conformance/salsa/a.js:7:17 +!!! annotated symbol 1 tests/cases/conformance/salsa/a.js:2:7 const c = new C() c.p diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index 6f24585a85f2b..323ad28a32559 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -132,8 +132,10 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 function hasNonMatchingParameterType1(x: A): x is B { ~ !!! error TS2677: A type predicate's type must be assignable to its parameter's type. -!!! error TS2677: Property 'propA' is missing in type 'B' but required in type 'A'. +!!! error TS2677: Property 'propA' is missing in type '{|B|0|}' but required in type '{|A|1|}'. !!! related TS2728 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:2:5: 'propA' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:5:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:1:7 return true; } @@ -147,7 +149,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 function hasNonMathcingGenericType(a: string): a is T[] { ~~~ !!! error TS2677: A type predicate's type must be assignable to its parameter's type. -!!! error TS2677: Type 'T[]' is not assignable to type 'string'. +!!! error TS2677: Type '{|T|0|}[]' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:45:36 return true; } @@ -187,17 +190,22 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 declare function acceptingDifferentSignatureTypeGuardFunction(p1: (p1) => p1 is B); acceptingDifferentSignatureTypeGuardFunction(isC); ~~~ -!!! error TS2345: Argument of type '(p1: any) => p1 is C' is not assignable to parameter of type '(p1: any) => p1 is B'. +!!! error TS2345: Argument of type '(p1: any) => p1 is {|C|0|}' is not assignable to parameter of type '(p1: any) => p1 is {|B|1|}'. !!! error TS2345: Type predicate 'p1 is C' is not assignable to 'p1 is B'. -!!! error TS2345: Property 'propB' is missing in type 'C' but required in type 'B'. +!!! error TS2345: Property 'propB' is missing in type '{|C|2|}' but required in type '{|B|3|}'. !!! related TS2728 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:6:5: 'propB' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:9:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:5:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:9:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:5:7 // Boolean not assignable to type guard var assign1: (p1, p2) => p1 is A; assign1 = function(p1, p2): boolean { ~~~~~~~ -!!! error TS2322: Type '(p1: any, p2: any) => boolean' is not assignable to type '(p1: any, p2: any) => p1 is A'. +!!! error TS2322: Type '(p1: any, p2: any) => boolean' is not assignable to type '(p1: any, p2: any) => p1 is {|A|0|}'. !!! error TS2322: Signature '(p1: any, p2: any): boolean' must be a type predicate. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:1:7 return true; }; @@ -205,9 +213,11 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 var assign2: (p1, p2) => p1 is A; assign2 = function(p1, p2): p2 is A { ~~~~~~~ -!!! error TS2322: Type '(p1: any, p2: any) => p2 is A' is not assignable to type '(p1: any, p2: any) => p1 is A'. +!!! error TS2322: Type '(p1: any, p2: any) => p2 is {|A|0|}' is not assignable to type '(p1: any, p2: any) => p1 is {|A|1|}'. !!! error TS2322: Type predicate 'p2 is A' is not assignable to 'p1 is A'. !!! error TS2322: Parameter 'p2' is not in the same position as parameter 'p1'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:1:7 return true; }; @@ -215,7 +225,9 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 var assign3: (p1, p2) => p1 is A; assign3 = function(p1, p2, p3): p1 is A { ~~~~~~~ -!!! error TS2322: Type '(p1: any, p2: any, p3: any) => p1 is A' is not assignable to type '(p1: any, p2: any) => p1 is A'. +!!! error TS2322: Type '(p1: any, p2: any, p3: any) => p1 is {|A|0|}' is not assignable to type '(p1: any, p2: any) => p1 is {|A|1|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:1:7 return true; }; @@ -255,7 +267,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 !!! error TS1228: A type predicate is only allowed in return type position for functions and methods. return true; ~~~~~~~~~~~~ -!!! error TS2322: Type 'true' is not assignable to type 'D'. +!!! error TS2322: Type 'true' is not assignable to type '{|D|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:102:7 ~~~~~~~~~~~~ !!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } @@ -331,8 +344,11 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 // expected an error, since Keys doesn't have a 'd' declare function hasKey(x: KeySet): x is KeySet; ~~~~~ -!!! error TS2344: Type 'T | "d"' does not satisfy the constraint 'Keys'. -!!! error TS2344: Type '"d"' is not assignable to type 'Keys'. +!!! error TS2344: Type '{|T|0|} | "d"' does not satisfy the constraint '{|Keys|1|}'. +!!! error TS2344: Type '"d"' is not assignable to type '{|Keys|2|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:152:25 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:148:6 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:148:6 type Foo = { 'a': string; } type Bar = { 'a': number; } @@ -341,27 +357,37 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(166,54 foo: T; isFoo(): this is NeedsFoo; // should error ~~~ -!!! error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. +!!! error TS2344: Type '{|Bar|0|}' does not satisfy the constraint '{|Foo|1|}'. !!! error TS2344: Types of property ''a'' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:155:6 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:154:6 }; declare var anError: NeedsFoo; // error, as expected ~~~ -!!! error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. +!!! error TS2344: Type '{|Bar|0|}' does not satisfy the constraint '{|Foo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:155:6 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:154:6 declare var alsoAnError: NeedsFoo; // also error, as expected ~~~~~~ -!!! error TS2344: Type 'number' does not satisfy the constraint 'Foo'. +!!! error TS2344: Type 'number' does not satisfy the constraint '{|Foo|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:154:6 declare function newError1(x: any): x is NeedsFoo; // should error ~~~ -!!! error TS2344: Type 'Bar' does not satisfy the constraint 'Foo'. +!!! error TS2344: Type '{|Bar|0|}' does not satisfy the constraint '{|Foo|1|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:155:6 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:154:6 declare function newError2(x: any): x is NeedsFoo; // should error ~~~~~~ -!!! error TS2344: Type 'number' does not satisfy the constraint 'Foo'. +!!! error TS2344: Type 'number' does not satisfy the constraint '{|Foo|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:154:6 declare function newError3(x: number): x is NeedsFoo; // should error ~~~~~~~~~~~~~~~~ !!! error TS2677: A type predicate's type must be assignable to its parameter's type. -!!! error TS2677: Type 'NeedsFoo' is not assignable to type 'number'. +!!! error TS2677: Type '{|NeedsFoo|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:157:11 ~~~~~~ -!!! error TS2344: Type 'number' does not satisfy the constraint 'Foo'. +!!! error TS2344: Type 'number' does not satisfy the constraint '{|Foo|0|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts:154:6 \ No newline at end of file diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt index 4e6e842e39ade..21a5769a4f5a0 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt @@ -40,27 +40,43 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors // Mismatched guards shouldn't be assignable b.isFollower = b.isLeader; ~~~~~~~~~~~~ -!!! error TS2322: Type '() => this is LeadGuard' is not assignable to type '() => this is FollowerGuard'. +!!! error TS2322: Type '() => this is {|LeadGuard|0|}' is not assignable to type '() => this is {|FollowerGuard|1|}'. !!! error TS2322: Type predicate 'this is LeadGuard' is not assignable to 'this is FollowerGuard'. -!!! error TS2322: Property 'follow' is missing in type 'LeadGuard' but required in type 'FollowerGuard'. +!!! error TS2322: Property 'follow' is missing in type '{|LeadGuard|2|}' but required in type '{|FollowerGuard|3|}'. !!! related TS2728 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:15:5: 'follow' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 b.isLeader = b.isFollower; ~~~~~~~~~~ -!!! error TS2322: Type '() => this is FollowerGuard' is not assignable to type '() => this is LeadGuard'. +!!! error TS2322: Type '() => this is {|FollowerGuard|0|}' is not assignable to type '() => this is {|LeadGuard|1|}'. !!! error TS2322: Type predicate 'this is FollowerGuard' is not assignable to 'this is LeadGuard'. -!!! error TS2322: Property 'lead' is missing in type 'FollowerGuard' but required in type 'LeadGuard'. +!!! error TS2322: Property 'lead' is missing in type '{|FollowerGuard|2|}' but required in type '{|LeadGuard|3|}'. !!! related TS2728 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:11:5: 'lead' is declared here. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 a.isFollower = a.isLeader; ~~~~~~~~~~~~ -!!! error TS2322: Type '() => this is LeadGuard' is not assignable to type '() => this is FollowerGuard'. +!!! error TS2322: Type '() => this is {|LeadGuard|0|}' is not assignable to type '() => this is {|FollowerGuard|1|}'. !!! error TS2322: Type predicate 'this is LeadGuard' is not assignable to 'this is FollowerGuard'. -!!! error TS2322: Type 'LeadGuard' is not assignable to type 'FollowerGuard'. +!!! error TS2322: Type '{|LeadGuard|2|}' is not assignable to type '{|FollowerGuard|3|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 a.isLeader = a.isFollower; ~~~~~~~~~~ -!!! error TS2322: Type '() => this is FollowerGuard' is not assignable to type '() => this is LeadGuard'. +!!! error TS2322: Type '() => this is {|FollowerGuard|0|}' is not assignable to type '() => this is {|LeadGuard|1|}'. !!! error TS2322: Type predicate 'this is FollowerGuard' is not assignable to 'this is LeadGuard'. -!!! error TS2322: Type 'FollowerGuard' is not assignable to type 'LeadGuard'. +!!! error TS2322: Type '{|FollowerGuard|2|}' is not assignable to type '{|LeadGuard|3|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:14:7 +!!! annotated symbol 3 tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThisErrors.ts:10:7 function invalidGuard(c: any): this is number { ~~~~ diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt index d310abe9cd244..56d5414039416 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt @@ -60,14 +60,19 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75, if (typeof strOrC === "Object" as string) { // comparison is OK with cast c = strOrC; // error: but no narrowing to C ~ -!!! error TS2322: Type 'string | C' is not assignable to type 'C'. -!!! error TS2322: Type 'string' is not assignable to type 'C'. +!!! error TS2322: Type 'string | {|C|0|}' is not assignable to type '{|C|1|}'. +!!! error TS2322: Type 'string' is not assignable to type '{|C|2|}'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts:1:7 } else { var r5: string = strOrC; // error: no narrowing to string ~~ -!!! error TS2322: Type 'string | C' is not assignable to type 'string'. -!!! error TS2322: Type 'C' is not assignable to type 'string'. +!!! error TS2322: Type 'string | {|C|0|}' is not assignable to type 'string'. +!!! error TS2322: Type '{|C|1|}' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts:1:7 } if (typeof strOrNumOrBool === "Object") { diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt index 0e291769afeef..b7bc9b1c0d91f 100644 --- a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt +++ b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt @@ -36,10 +36,14 @@ tests/cases/compiler/typeIdentityConsidersBrands.ts(31,6): error TS2345: Argumen a2 = b2; // should error ~~ -!!! error TS2322: Type 'X_1' is not assignable to type 'Y_1'. +!!! error TS2322: Type '{|X_1|0|}' is not assignable to type '{|Y_1|1|}'. !!! error TS2322: Types have separate declarations of a private property 'name'. +!!! annotated symbol 0 tests/cases/compiler/typeIdentityConsidersBrands.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/typeIdentityConsidersBrands.ts:13:7 foo2(a2); // should error ~~ -!!! error TS2345: Argument of type 'Y_1' is not assignable to parameter of type 'X_1'. +!!! error TS2345: Argument of type '{|Y_1|0|}' is not assignable to parameter of type '{|X_1|1|}'. !!! error TS2345: Types have separate declarations of a private property 'name'. +!!! annotated symbol 0 tests/cases/compiler/typeIdentityConsidersBrands.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/typeIdentityConsidersBrands.ts:9:7 \ No newline at end of file diff --git a/tests/baselines/reference/typeInfer1.errors.txt b/tests/baselines/reference/typeInfer1.errors.txt index 6f26b2e60547c..710f8c5214ef6 100644 --- a/tests/baselines/reference/typeInfer1.errors.txt +++ b/tests/baselines/reference/typeInfer1.errors.txt @@ -16,6 +16,8 @@ tests/cases/compiler/typeInfer1.ts(12,5): error TS2322: Type '{ Moo: () => strin var yyyyyyyy: ITextWriter2 = { Moo: function() { return "cow"; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. +!!! error TS2322: Type '{ {|Moo|0|}: () => string; }' is not assignable to type '{|ITextWriter2|1|}'. !!! error TS2322: Object literal may only specify known properties, and 'Moo' does not exist in type 'ITextWriter2'. +!!! annotated symbol 0 tests/cases/compiler/typeInfer1.ts:12:5 +!!! annotated symbol 1 tests/cases/compiler/typeInfer1.ts:1:11 } \ No newline at end of file diff --git a/tests/baselines/reference/typeMatch1.errors.txt b/tests/baselines/reference/typeMatch1.errors.txt index 7e471171a0e86..02537ee7d1fee 100644 --- a/tests/baselines/reference/typeMatch1.errors.txt +++ b/tests/baselines/reference/typeMatch1.errors.txt @@ -24,13 +24,17 @@ tests/cases/compiler/typeMatch1.ts(20,1): error TS2367: This condition will alwa x6 = x7; ~~ -!!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|C|1|}'. !!! error TS2322: Types have separate declarations of a private property 'x'. +!!! annotated symbol 0 tests/cases/compiler/typeMatch1.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/typeMatch1.ts:12:7 x6=C; ~ -!!! error TS2741: Property 'x' is missing in type 'typeof C' but required in type 'C'. +!!! error TS2741: Property 'x' is missing in type 'typeof {|C|0|}' but required in type '{|C|1|}'. !!! related TS2728 tests/cases/compiler/typeMatch1.ts:12:19: 'x' is declared here. !!! related TS6213 tests/cases/compiler/typeMatch1.ts:19:4: Did you mean to use 'new' with this expression? +!!! annotated symbol 0 tests/cases/compiler/typeMatch1.ts:12:7 +!!! annotated symbol 1 tests/cases/compiler/typeMatch1.ts:12:7 C==D; ~~~~ !!! error TS2367: This condition will always return 'false' since the types 'typeof C' and 'typeof D' have no overlap. diff --git a/tests/baselines/reference/typeMatch2.errors.txt b/tests/baselines/reference/typeMatch2.errors.txt index 53f5582f5a1bf..138a1dfad19b0 100644 --- a/tests/baselines/reference/typeMatch2.errors.txt +++ b/tests/baselines/reference/typeMatch2.errors.txt @@ -22,16 +22,28 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2741: Property 'y' is missing !!! error TS2739: Type '{}' is missing the following properties from type '{ x: number; y: number; }': x, y a = { x: 1 }; // error ~ -!!! error TS2741: Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'. +!!! error TS2741: Property 'y' is missing in type '{ {|x|0|}: number; }' but required in type '{ {|x|1|}: number; {|y|2|}: number; }'. !!! related TS2728 tests/cases/compiler/typeMatch2.ts:2:18: 'y' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:4:11 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:2:12 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:2:18 a = { x: 1, y: 2, z: 3 }; ~~~~ -!!! error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Type '{ {|x|0|}: number; {|y|1|}: number; {|z|2|}: number; }' is not assignable to type '{ {|x|3|}: number; {|y|4|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:5:8 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:5:14 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:5:20 +!!! annotated symbol 3 tests/cases/compiler/typeMatch2.ts:2:12 +!!! annotated symbol 4 tests/cases/compiler/typeMatch2.ts:2:18 a = { x: 1, z: 3 }; // error ~~~~ -!!! error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Type '{ {|x|0|}: number; {|z|1|}: number; }' is not assignable to type '{ {|x|2|}: number; {|y|3|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:6:11 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:6:17 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:2:12 +!!! annotated symbol 3 tests/cases/compiler/typeMatch2.ts:2:18 } class Animal { private a; } @@ -45,17 +57,29 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2741: Property 'y' is missing aa = gg; gg = aa; // error ~~ -!!! error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. -!!! error TS2322: Property 'g' is missing in type 'Animal' but required in type 'Giraffe'. +!!! error TS2322: Type '{|Animal|0|}[]' is not assignable to type '{|Giraffe|1|}[]'. +!!! error TS2322: Property 'g' is missing in type '{|Animal|2|}' but required in type '{|Giraffe|3|}'. !!! related TS2728 tests/cases/compiler/typeMatch2.ts:10:40: 'g' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:10:7 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/typeMatch2.ts:10:7 var xa = { f1: 5, f2: aa }; var xb = { f1: 5, f2: gg }; xa = xb; // Should be ok xb = xa; // Not ok ~~ -!!! error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'. +!!! error TS2322: Type '{ {|f1|0|}: number; {|f2|1|}: {|Animal|2|}[]; }' is not assignable to type '{ {|f1|3|}: number; {|f2|4|}: {|Giraffe|5|}[]; }'. !!! error TS2322: Types of property 'f2' are incompatible. -!!! error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. +!!! error TS2322: Type '{|Animal|6|}[]' is not assignable to type '{|Giraffe|7|}[]'. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:19:16 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:19:23 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:9:7 +!!! annotated symbol 3 tests/cases/compiler/typeMatch2.ts:20:16 +!!! annotated symbol 4 tests/cases/compiler/typeMatch2.ts:20:23 +!!! annotated symbol 5 tests/cases/compiler/typeMatch2.ts:10:7 +!!! annotated symbol 6 tests/cases/compiler/typeMatch2.ts:9:7 +!!! annotated symbol 7 tests/cases/compiler/typeMatch2.ts:10:7 } function f4() { @@ -69,12 +93,20 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2741: Property 'y' is missing a = { x: 1, y: _any }; a = { x: 1, y: _any, z:1 }; ~~~ -!!! error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Type '{ {|x|0|}: number; {|y|1|}: any; {|z|2|}: number; }' is not assignable to type '{ {|x|3|}: number; {|y|4|}: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:34:11 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:34:17 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:34:26 +!!! annotated symbol 3 tests/cases/compiler/typeMatch2.ts:30:15 +!!! annotated symbol 4 tests/cases/compiler/typeMatch2.ts:30:21 a = { x: 1 }; // error ~ -!!! error TS2741: Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'. +!!! error TS2741: Property 'y' is missing in type '{ {|x|0|}: number; }' but required in type '{ {|x|1|}: number; {|y|2|}: number; }'. !!! related TS2728 tests/cases/compiler/typeMatch2.ts:30:21: 'y' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeMatch2.ts:35:11 +!!! annotated symbol 1 tests/cases/compiler/typeMatch2.ts:30:15 +!!! annotated symbol 2 tests/cases/compiler/typeMatch2.ts:30:21 var mf = function m(n) { return false; }; var zf = function z(n: number) { return true; }; mf=zf; diff --git a/tests/baselines/reference/typeName1.errors.txt b/tests/baselines/reference/typeName1.errors.txt index 6d65f1d83c325..fddc55a88e08d 100644 --- a/tests/baselines/reference/typeName1.errors.txt +++ b/tests/baselines/reference/typeName1.errors.txt @@ -28,53 +28,97 @@ tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not as var x1:{ f(s:string):number;f(n:number):string; }=3; ~~ -!!! error TS2322: Type '3' is not assignable to type '{ f(s: string): number; f(n: number): string; }'. +!!! error TS2322: Type '3' is not assignable to type '{ {|f|0|}(s: string): number; {|f|1|}(n: number): string; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:9:10 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:9:10 var x2:{ f(s:string):number; } =3; ~~ -!!! error TS2322: Type '3' is not assignable to type '{ f(s: string): number; }'. +!!! error TS2322: Type '3' is not assignable to type '{ {|f|0|}(s: string): number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:10:10 var x3:{ (s:string):number;(n:number):string; }=3; ~~ !!! error TS2322: Type '3' is not assignable to type '{ (s: string): number; (n: number): string; }'. var x4:{ x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ -!!! error TS2322: Type '3' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. +!!! error TS2322: Type '3' is not assignable to type '{ {|x|0|}: any; {|y|1|}: any; {|z|2|}: number; {|f|3|}(n: number): string; {|f|4|}(s: string): number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:12:10 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:12:12 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:12:14 +!!! annotated symbol 3 tests/cases/compiler/typeName1.ts:12:23 +!!! annotated symbol 4 tests/cases/compiler/typeName1.ts:12:23 var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s:string):number; }=3; ~~ -!!! error TS2322: Type '3' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'. +!!! error TS2322: Type '3' is not assignable to type '{ (s: string): number; (n: number): string; {|x|0|}: any; {|y|1|}: any; {|z|2|}: number; {|f|3|}(n: number): string; {|f|4|}(s: string): number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:13:46 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:13:48 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:13:50 +!!! annotated symbol 3 tests/cases/compiler/typeName1.ts:13:59 +!!! annotated symbol 4 tests/cases/compiler/typeName1.ts:13:59 var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3; ~~ -!!! error TS2322: Type '3' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'. +!!! error TS2322: Type '3' is not assignable to type '{ {|z|0|}: number; {|f|1|}: { (n: number): string; (s: string): number; }; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:14:10 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:14:19 var x7:(s:string)=>boolean=3; ~~ !!! error TS2322: Type '3' is not assignable to type '(s: string) => boolean'. var x8:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; }=3; ~~ -!!! error TS2322: Type '3' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'. +!!! error TS2322: Type '3' is not assignable to type '{ (): boolean; [s: string]: { {|x|0|}: any; {|y|1|}: any; }; [n: number]: { {|x|2|}: any; {|y|3|}: any; }; {|z|4|}: {|I|5|}; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:16:27 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:16:30 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:16:47 +!!! annotated symbol 3 tests/cases/compiler/typeName1.ts:16:50 +!!! annotated symbol 4 tests/cases/compiler/typeName1.ts:16:10 +!!! annotated symbol 5 tests/cases/compiler/typeName1.ts:1:11 ~ !!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x9:I=3; ~~ -!!! error TS2322: Type '3' is not assignable to type 'I'. +!!! error TS2322: Type '3' is not assignable to type '{|I|0|}'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:1:11 var x10:I[][][][]=3; ~~~ -!!! error TS2322: Type '3' is not assignable to type 'I[][][][]'. +!!! error TS2322: Type '3' is not assignable to type '{|I|0|}[][][][]'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:1:11 var x11:{z:I;x:boolean;}[][]=3; ~~~ -!!! error TS2322: Type '3' is not assignable to type '{ z: I; x: boolean; }[][]'. +!!! error TS2322: Type '3' is not assignable to type '{ {|z|0|}: {|I|1|}; {|x|2|}: boolean; }[][]'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:19:10 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:19:14 var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3; ~~~ -!!! error TS2322: Type '3' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'. +!!! error TS2322: Type '3' is not assignable to type '{ {|z|0|}: {|I|1|}; {|x|2|}: boolean; {|y|3|}: (s: string) => boolean; {|w|4|}: { (): boolean; [s: string]: { {|x|5|}: any; {|y|6|}: any; }; [n: number]: { {|x|7|}: any; {|y|8|}: any; }; {|z|9|}: {|I|10|}; }; }[][]'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:20:10 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:20:14 +!!! annotated symbol 3 tests/cases/compiler/typeName1.ts:20:24 +!!! annotated symbol 4 tests/cases/compiler/typeName1.ts:20:46 +!!! annotated symbol 5 tests/cases/compiler/typeName1.ts:20:67 +!!! annotated symbol 6 tests/cases/compiler/typeName1.ts:20:70 +!!! annotated symbol 7 tests/cases/compiler/typeName1.ts:20:87 +!!! annotated symbol 8 tests/cases/compiler/typeName1.ts:20:90 +!!! annotated symbol 9 tests/cases/compiler/typeName1.ts:20:50 +!!! annotated symbol 10 tests/cases/compiler/typeName1.ts:1:11 ~ !!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'. var x13:{ new(): number; new(n:number):number; x: string; w: {y: number;}; (): {}; } = 3; ~~~ -!!! error TS2322: Type '3' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'. +!!! error TS2322: Type '3' is not assignable to type '{ (): {}; new (): number; new (n: number): number; {|x|0|}: string; {|w|1|}: { {|y|2|}: number; }; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:21:48 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:21:59 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:21:63 var x14:{ f(x:number):boolean; p; q; ():string; }=3; ~~~ -!!! error TS2322: Type '3' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'. +!!! error TS2322: Type '3' is not assignable to type '{ (): string; {|f|0|}(x: number): boolean; {|p|1|}: any; {|q|2|}: any; }'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:22:11 +!!! annotated symbol 1 tests/cases/compiler/typeName1.ts:22:32 +!!! annotated symbol 2 tests/cases/compiler/typeName1.ts:22:35 var x15:number=C; ~~~ -!!! error TS2322: Type 'typeof C' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof {|C|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/typeName1.ts:4:7 diff --git a/tests/baselines/reference/typeOfOnTypeArg.errors.txt b/tests/baselines/reference/typeOfOnTypeArg.errors.txt index 58412a5417f05..b2d20308bb1d2 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.errors.txt +++ b/tests/baselines/reference/typeOfOnTypeArg.errors.txt @@ -10,5 +10,6 @@ tests/cases/compiler/typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type '32 fill(32); ~~ -!!! error TS2345: Argument of type '32' is not assignable to parameter of type '{ '': number; }'. +!!! error TS2345: Argument of type '32' is not assignable to parameter of type '{ {|''|0|}: number; }'. +!!! annotated symbol 0 tests/cases/compiler/typeOfOnTypeArg.ts:1:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeParamExtendsOtherTypeParam.errors.txt b/tests/baselines/reference/typeParamExtendsOtherTypeParam.errors.txt index e91afe8d02004..913c74ea8a2df 100644 --- a/tests/baselines/reference/typeParamExtendsOtherTypeParam.errors.txt +++ b/tests/baselines/reference/typeParamExtendsOtherTypeParam.errors.txt @@ -31,34 +31,58 @@ tests/cases/compiler/typeParamExtendsOtherTypeParam.ts(29,15): error TS2344: Typ // Below should be in error var x1: A<{ a: string;}, { b: string }>; ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ b: string; }' does not satisfy the constraint '{ a: string; }'. -!!! error TS2344: Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; }'. +!!! error TS2344: Type '{ {|b|0|}: string; }' does not satisfy the constraint '{ {|a|1|}: string; }'. +!!! error TS2344: Property 'a' is missing in type '{ {|b|2|}: string; }' but required in type '{ {|a|3|}: string; }'. !!! related TS2728 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:12:13: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:12:28 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:12:13 +!!! annotated symbol 2 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:12:28 +!!! annotated symbol 3 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:12:13 var x2: A<{ a: string;}, { a: number }>; ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: string; }'. +!!! error TS2344: Type '{ {|a|0|}: number; }' does not satisfy the constraint '{ {|a|1|}: string; }'. !!! error TS2344: Types of property 'a' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:13:28 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:13:13 var x3: B<{ a: string;}, { b: string }>; ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ b: string; }' does not satisfy the constraint '{ a: string; }'. -!!! error TS2344: Property 'a' is missing in type '{ b: string; }' but required in type '{ a: string; }'. +!!! error TS2344: Type '{ {|b|0|}: string; }' does not satisfy the constraint '{ {|a|1|}: string; }'. +!!! error TS2344: Property 'a' is missing in type '{ {|b|2|}: string; }' but required in type '{ {|a|3|}: string; }'. !!! related TS2728 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:14:13: 'a' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:14:28 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:14:13 +!!! annotated symbol 2 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:14:28 +!!! annotated symbol 3 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:14:13 var x4: B<{ a: string;}, { a: number }>; ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: string; }'. +!!! error TS2344: Type '{ {|a|0|}: number; }' does not satisfy the constraint '{ {|a|1|}: string; }'. !!! error TS2344: Types of property 'a' are incompatible. !!! error TS2344: Type 'number' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:15:28 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:15:13 var x5: A<{ a: string; b: number }, { a: string }>; ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: string; }' does not satisfy the constraint '{ a: string; b: number; }'. -!!! error TS2344: Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: number; }'. +!!! error TS2344: Type '{ {|a|0|}: string; }' does not satisfy the constraint '{ {|a|1|}: string; {|b|2|}: number; }'. +!!! error TS2344: Property 'b' is missing in type '{ {|a|3|}: string; }' but required in type '{ {|a|4|}: string; {|b|5|}: number; }'. !!! related TS2728 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:24: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:39 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:13 +!!! annotated symbol 2 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:24 +!!! annotated symbol 3 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:39 +!!! annotated symbol 4 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:13 +!!! annotated symbol 5 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:16:24 var x6: B<{ a: string; b: number }, { a: string }>; ~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: string; }' does not satisfy the constraint '{ a: string; b: number; }'. -!!! error TS2344: Property 'b' is missing in type '{ a: string; }' but required in type '{ a: string; b: number; }'. +!!! error TS2344: Type '{ {|a|0|}: string; }' does not satisfy the constraint '{ {|a|1|}: string; {|b|2|}: number; }'. +!!! error TS2344: Property 'b' is missing in type '{ {|a|3|}: string; }' but required in type '{ {|a|4|}: string; {|b|5|}: number; }'. !!! related TS2728 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:24: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:39 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:13 +!!! annotated symbol 2 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:24 +!!! annotated symbol 3 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:39 +!!! annotated symbol 4 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:13 +!!! annotated symbol 5 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:17:24 interface I1 { a: string; @@ -71,10 +95,16 @@ tests/cases/compiler/typeParamExtendsOtherTypeParam.ts(29,15): error TS2344: Typ var x7: A; ~~ -!!! error TS2344: Type 'I1' does not satisfy the constraint 'I2'. -!!! error TS2344: Property 'b' is missing in type 'I1' but required in type 'I2'. +!!! error TS2344: Type '{|I1|0|}' does not satisfy the constraint '{|I2|1|}'. +!!! error TS2344: Property 'b' is missing in type '{|I1|2|}' but required in type '{|I2|3|}'. !!! related TS2728 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:25:5: 'b' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:19:11 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:23:11 +!!! annotated symbol 2 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:19:11 +!!! annotated symbol 3 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:23:11 var x8: B; ~~ -!!! error TS2344: Type 'I1' does not satisfy the constraint 'I2'. +!!! error TS2344: Type '{|I1|0|}' does not satisfy the constraint '{|I2|1|}'. +!!! annotated symbol 0 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:19:11 +!!! annotated symbol 1 tests/cases/compiler/typeParamExtendsOtherTypeParam.ts:23:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt index f0360609a575b..9686923d2f70c 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence.errors.txt @@ -13,14 +13,20 @@ tests/cases/compiler/typeParameterArgumentEquivalence.ts(5,5): error TS2322: Typ var y: (item: T) => boolean; x = y; // Should be an error ~ -!!! error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: number) => boolean'. +!!! error TS2322: Type '(item: {|T|0|}) => boolean' is not assignable to type '(item: number) => boolean'. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'T'. -!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type 'number' is not assignable to type '{|T|1|}'. +!!! error TS2322: 'number' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence.ts:1:14 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence.ts:1:14 y = x; // Shound be an error ~ -!!! error TS2322: Type '(item: number) => boolean' is not assignable to type '(item: T) => boolean'. +!!! error TS2322: Type '(item: number) => boolean' is not assignable to type '(item: {|T|0|}) => boolean'. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|1|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence.ts:1:14 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt index d1727b53863ca..1e61fdf8d0e76 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence2.errors.txt @@ -14,15 +14,29 @@ tests/cases/compiler/typeParameterArgumentEquivalence2.ts(5,5): error TS2322: Ty var y: (item: T) => boolean; x = y; // Should be an error ~ -!!! error TS2322: Type '(item: T) => boolean' is not assignable to type '(item: U) => boolean'. +!!! error TS2322: Type '(item: {|T|0|}) => boolean' is not assignable to type '(item: {|U|1|}) => boolean'. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|2|}' is not assignable to type '{|T|3|}'. +!!! error TS2322: '{|U|4|}' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 +!!! annotated symbol 4 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 +!!! annotated symbol 5 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 +!!! annotated symbol 6 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 y = x; // Shound be an error ~ -!!! error TS2322: Type '(item: U) => boolean' is not assignable to type '(item: T) => boolean'. +!!! error TS2322: Type '(item: {|U|0|}) => boolean' is not assignable to type '(item: {|T|1|}) => boolean'. !!! error TS2322: Types of parameters 'item' and 'item' are incompatible. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|2|}' is not assignable to type '{|U|3|}'. +!!! error TS2322: '{|T|4|}' is assignable to the constraint of type '{|U|5|}', but '{|U|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 +!!! annotated symbol 4 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:14 +!!! annotated symbol 5 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 +!!! annotated symbol 6 tests/cases/compiler/typeParameterArgumentEquivalence2.ts:1:16 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt index c361a276b9622..5a8b0b4b0bbe0 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence3.errors.txt @@ -11,12 +11,18 @@ tests/cases/compiler/typeParameterArgumentEquivalence3.ts(5,5): error TS2322: Ty var y: (item) => boolean; x = y; // Should be an error ~ -!!! error TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => T'. -!!! error TS2322: Type 'boolean' is not assignable to type 'T'. -!!! error TS2322: 'boolean' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '(item: any) => boolean' is not assignable to type '(item: any) => {|T|0|}'. +!!! error TS2322: Type 'boolean' is not assignable to type '{|T|1|}'. +!!! error TS2322: 'boolean' is assignable to the constraint of type '{|T|2|}', but '{|T|3|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence3.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence3.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence3.ts:1:14 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence3.ts:1:14 y = x; // Shound be an error ~ -!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => boolean'. -!!! error TS2322: Type 'T' is not assignable to type 'boolean'. +!!! error TS2322: Type '(item: any) => {|T|0|}' is not assignable to type '(item: any) => boolean'. +!!! error TS2322: Type '{|T|1|}' is not assignable to type 'boolean'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence3.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence3.ts:1:14 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt index ce194146f6ca9..d83bf3e9eae7b 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence4.errors.txt @@ -12,13 +12,27 @@ tests/cases/compiler/typeParameterArgumentEquivalence4.ts(5,5): error TS2322: Ty var y: (item) => T; x = y; // Should be an error ~ -!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '(item: any) => {|T|0|}' is not assignable to type '(item: any) => {|U|1|}'. +!!! error TS2322: Type '{|T|2|}' is not assignable to type '{|U|3|}'. +!!! error TS2322: '{|T|4|}' is assignable to the constraint of type '{|U|5|}', but '{|U|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 +!!! annotated symbol 4 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 +!!! annotated symbol 5 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 +!!! annotated symbol 6 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 y = x; // Shound be an error ~ -!!! error TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '(item: any) => {|U|0|}' is not assignable to type '(item: any) => {|T|1|}'. +!!! error TS2322: Type '{|U|2|}' is not assignable to type '{|T|3|}'. +!!! error TS2322: '{|U|4|}' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 +!!! annotated symbol 4 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:16 +!!! annotated symbol 5 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 +!!! annotated symbol 6 tests/cases/compiler/typeParameterArgumentEquivalence4.ts:1:14 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt index e5196d3d4a50d..af29a6d32f7cc 100644 --- a/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt +++ b/tests/baselines/reference/typeParameterArgumentEquivalence5.errors.txt @@ -14,15 +14,33 @@ tests/cases/compiler/typeParameterArgumentEquivalence5.ts(5,5): error TS2322: Ty var y: () => (item) => T; x = y; // Should be an error ~ -!!! error TS2322: Type '() => (item: any) => T' is not assignable to type '() => (item: any) => U'. -!!! error TS2322: Type '(item: any) => T' is not assignable to type '(item: any) => U'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => (item: any) => {|T|0|}' is not assignable to type '() => (item: any) => {|U|1|}'. +!!! error TS2322: Type '(item: any) => {|T|2|}' is not assignable to type '(item: any) => {|U|3|}'. +!!! error TS2322: Type '{|T|4|}' is not assignable to type '{|U|5|}'. +!!! error TS2322: '{|T|6|}' is assignable to the constraint of type '{|U|7|}', but '{|U|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 4 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 5 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 6 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 7 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 8 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 y = x; // Shound be an error ~ -!!! error TS2322: Type '() => (item: any) => U' is not assignable to type '() => (item: any) => T'. -!!! error TS2322: Type '(item: any) => U' is not assignable to type '(item: any) => T'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '() => (item: any) => {|U|0|}' is not assignable to type '() => (item: any) => {|T|1|}'. +!!! error TS2322: Type '(item: any) => {|U|2|}' is not assignable to type '(item: any) => {|T|3|}'. +!!! error TS2322: Type '{|U|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2322: '{|U|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 1 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 2 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 3 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 4 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 5 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 6 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:16 +!!! annotated symbol 7 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 +!!! annotated symbol 8 tests/cases/compiler/typeParameterArgumentEquivalence5.ts:1:14 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt index 8f286e3986314..7bb938f0cf643 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.errors.txt @@ -27,7 +27,8 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTy var n: NumberVariant; var r3 = foo(1, n); ~ -!!! error TS2345: Argument of type 'NumberVariant' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{|NumberVariant|0|}' is not assignable to parameter of type 'number'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts:9:11 function foo2(x: T, y: U) { return y; } // this is now an error foo2(1, { length: '' }); @@ -40,6 +41,7 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTy !!! related TS6500 tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts:15:30: The expected type comes from property 'length' which is declared here on type '{ length: number; }' foo2([], ['']); ~~~~ -!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{ length: any[]; }'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{ {|length|0|}: any[]; }'. !!! error TS2345: Types of property 'length' are incompatible. -!!! error TS2345: Type 'number' is not assignable to type 'any[]'. \ No newline at end of file +!!! error TS2345: Type 'number' is not assignable to type 'any[]'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts:15:30 \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignability.errors.txt b/tests/baselines/reference/typeParameterAssignability.errors.txt index 0bab4a4c74c69..3c26077a9a51e 100644 --- a/tests/baselines/reference/typeParameterAssignability.errors.txt +++ b/tests/baselines/reference/typeParameterAssignability.errors.txt @@ -10,10 +10,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara function foo(t: T, u: U) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:17 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:17 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:14 u = t; // error ~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:17 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability.ts:3:17 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignability2.errors.txt b/tests/baselines/reference/typeParameterAssignability2.errors.txt index 776649105b40e..74d7735d1fd73 100644 --- a/tests/baselines/reference/typeParameterAssignability2.errors.txt +++ b/tests/baselines/reference/typeParameterAssignability2.errors.txt @@ -67,76 +67,160 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara t = u; // error u = t; // ok ~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:3:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:3:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:3:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:3:17 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:3:17 } function foo2(t: T, u: U) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:8:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:8:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:8:28 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:8:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:8:15 u = t; // ok } function foo3(t: T, u: U, v: V) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|5|}' is not assignable to type '{|T|6|}'. +!!! error TS2322: '{|V|7|}' is assignable to the constraint of type '{|T|8|}', but '{|T|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:28 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:41 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:41 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 u = t; t = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:41 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:41 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:15 v = t; // ok u = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'U'. -!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:41 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:28 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:41 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:28 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:13:28 v = u; // ok } function foo4(t: T, u: U, v: V) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'Date' is not assignable to type 'T'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2322: Type '{|V|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|V|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! error TS2322: Type '{|Date|12|}' is not assignable to type '{|T|13|}'. +!!! error TS2322: '{|Date|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{|Date|17|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:729:11 t = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 t = new Date(); // error ~ -!!! error TS2322: Type 'Date' is not assignable to type 'T'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:15 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 u = t; u = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'U'. -!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'Date' is not assignable to type 'U'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2322: Type '{|Date|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2322: '{|Date|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 u = new Date(); // error ~ -!!! error TS2322: Type 'Date' is not assignable to type 'U'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:28 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 v = t; v = u; v = new Date(); // ok ~ -!!! error TS2322: Type 'Date' is not assignable to type 'V'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:24:41 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 var d: Date; d = t; // ok @@ -148,39 +232,93 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara function foo5(t: T, u: U, v: V) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'Date' is not assignable to type 'T'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2322: Type '{|V|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|V|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! error TS2322: Type '{|Date|12|}' is not assignable to type '{|T|13|}'. +!!! error TS2322: '{|Date|14|}' is assignable to the constraint of type '{|T|15|}', but '{|T|16|}' could be instantiated with a different subtype of constraint '{|Date|17|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 13 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 15 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 16 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 17 /.ts/lib.es5.d.ts:729:11 t = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 t = new Date(); // error ~ -!!! error TS2322: Type 'Date' is not assignable to type 'T'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:44 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 u = t; u = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'U'. -!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'Date' is not assignable to type 'U'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2322: Type '{|Date|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2322: '{|Date|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 u = new Date(); // error ~ -!!! error TS2322: Type 'Date' is not assignable to type 'U'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:31 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 v = t; v = u; v = new Date(); // ok ~ -!!! error TS2322: Type 'Date' is not assignable to type 'V'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|Date|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|Date|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:44:15 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 var d: Date; d = t; // ok @@ -191,27 +329,57 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara function foo6(t: T, u: U, v: V) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 t = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'T'. -!!! error TS2322: 'V' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 u = t; // ok u = v; // error ~ -!!! error TS2322: Type 'V' is not assignable to type 'U'. -!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|V|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 v = t; // error ~ -!!! error TS2322: Type 'T' is not assignable to type 'V'. -!!! error TS2322: 'T' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'U' is not assignable to type 'V'. -!!! error TS2322: 'U' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|5|}' is not assignable to type '{|V|6|}'. +!!! error TS2322: '{|U|7|}' is assignable to the constraint of type '{|V|8|}', but '{|V|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:15 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 v = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'V'. -!!! error TS2322: 'U' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:28 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts:63:31 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignability3.errors.txt b/tests/baselines/reference/typeParameterAssignability3.errors.txt index 52091c02b8f72..8e49d42b46a73 100644 --- a/tests/baselines/reference/typeParameterAssignability3.errors.txt +++ b/tests/baselines/reference/typeParameterAssignability3.errors.txt @@ -32,16 +32,40 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Foo'. -!!! error TS2322: Type 'Foo' is not assignable to type 'T'. -!!! error TS2322: 'Foo' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Foo'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Foo|5|}'. +!!! error TS2322: Type '{|Foo|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|Foo|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Foo|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 u = t; // error ~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Foo'. -!!! error TS2322: Type 'Foo' is not assignable to type 'U'. -!!! error TS2322: 'Foo' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Foo'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Foo|5|}'. +!!! error TS2322: Type '{|Foo|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2322: '{|Foo|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|Foo|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:5:29 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 } class C { @@ -50,15 +74,39 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara r = () => { this.t = this.u; // error ~~~~~~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Foo'. -!!! error TS2322: Type 'Foo' is not assignable to type 'T'. -!!! error TS2322: 'Foo' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Foo'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Foo|5|}'. +!!! error TS2322: Type '{|Foo|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|Foo|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Foo|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 this.u = this.t; // error ~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Foo'. -!!! error TS2322: Type 'Foo' is not assignable to type 'U'. -!!! error TS2322: 'Foo' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'Foo'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{|Foo|5|}'. +!!! error TS2322: Type '{|Foo|6|}' is not assignable to type '{|U|7|}'. +!!! error TS2322: '{|Foo|8|}' is assignable to the constraint of type '{|U|9|}', but '{|U|10|}' could be instantiated with a different subtype of constraint '{|Foo|11|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:9 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:18:24 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability3.ts:3:7 } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt index dfef4d192689c..0bf26d41ddb3c 100644 --- a/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/typeParameterAssignmentCompat1.errors.txt @@ -16,12 +16,25 @@ tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,9): error TS2322: Type var y: Foo; x = y; // should be an error ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Foo|0|}<{|U|1|}>' is not assignable to type '{|Foo|2|}<{|T|3|}>'. +!!! error TS2322: Type '{|U|4|}' is not assignable to type '{|T|5|}'. +!!! error TS2322: '{|U|6|}' is assignable to the constraint of type '{|T|7|}', but '{|T|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:15 +!!! annotated symbol 2 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:12 +!!! annotated symbol 4 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:15 +!!! annotated symbol 5 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:12 +!!! annotated symbol 6 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:15 +!!! annotated symbol 7 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:12 +!!! annotated symbol 8 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:12 return x; ~~~~~~~~~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type '{|Foo|0|}<{|T|1|}>' is not assignable to type '{|Foo|2|}<{|U|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:12 +!!! annotated symbol 2 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/typeParameterAssignmentCompat1.ts:5:15 } class C { @@ -30,9 +43,17 @@ tests/cases/compiler/typeParameterAssignmentCompat1.ts(17,9): error TS2322: Type var y: Foo; x = y; // should be an error ~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type '{|Foo|0|}<{|U|1|}>' is not assignable to type '{|Foo|2|}<{|T|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterAssignmentCompat1.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/typeParameterAssignmentCompat1.ts:12:9 return x; ~~~~~~~~~ -!!! error TS2322: Type 'Foo' is not assignable to type 'Foo'. +!!! error TS2322: Type '{|Foo|0|}<{|T|1|}>' is not assignable to type '{|Foo|2|}<{|U|3|}>'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterAssignmentCompat1.ts:12:9 +!!! annotated symbol 2 tests/cases/compiler/typeParameterAssignmentCompat1.ts:1:11 +!!! annotated symbol 3 tests/cases/compiler/typeParameterAssignmentCompat1.ts:13:7 } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt index 926ad4b3bffe0..33f5a605722bd 100644 --- a/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt +++ b/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter.errors.txt @@ -16,7 +16,10 @@ tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter.ts(10,5): erro var a: A var b: B = a; // assignment should be legal (both U's get instantiated to any for comparison) ~ -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: Type '{|A|0|}' is not assignable to type '{|B|1|}'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'U' is not assignable to type 'string[]'. -!!! error TS2322: Type 'string' is not assignable to type 'string[]'. \ No newline at end of file +!!! error TS2322: Type '{|U|2|}' is not assignable to type 'string[]'. +!!! error TS2322: Type 'string' is not assignable to type 'string[]'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter.ts:1:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter.ts:5:11 +!!! annotated symbol 2 tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter.ts:6:6 \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterDiamond2.errors.txt b/tests/baselines/reference/typeParameterDiamond2.errors.txt index eecfac811275d..c7298a2c5232c 100644 --- a/tests/baselines/reference/typeParameterDiamond2.errors.txt +++ b/tests/baselines/reference/typeParameterDiamond2.errors.txt @@ -20,19 +20,48 @@ tests/cases/compiler/typeParameterDiamond2.ts(10,13): error TS2322: Type 'Bottom top = middle; ~~~ -!!! error TS2322: Type 'T | U' is not assignable to type 'Top'. -!!! error TS2322: 'T | U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'U' is not assignable to type 'Top'. -!!! error TS2322: 'U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|} | {|U|1|}' is not assignable to type '{|Top|2|}'. +!!! error TS2322: '{|T|3|} | {|U|4|}' is assignable to the constraint of type '{|Top|5|}', but '{|Top|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|7|}' is not assignable to type '{|Top|8|}'. +!!! error TS2322: '{|U|9|}' is assignable to the constraint of type '{|Top|10|}', but '{|Top|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond2.ts:2:28 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond2.ts:2:28 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond2.ts:1:21 middle = bottom; top = bottom; ~~~ -!!! error TS2322: Type 'Bottom' is not assignable to type 'Top'. -!!! error TS2322: 'Bottom' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T | U' is not assignable to type 'Top'. -!!! error TS2322: 'T | U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'U' is not assignable to type 'Top'. -!!! error TS2322: 'U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Bottom|0|}' is not assignable to type '{|Top|1|}'. +!!! error TS2322: '{|Bottom|2|}' is assignable to the constraint of type '{|Top|3|}', but '{|Top|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|5|} | {|U|6|}' is not assignable to type '{|Top|7|}'. +!!! error TS2322: '{|T|8|} | {|U|9|}' is assignable to the constraint of type '{|Top|10|}', but '{|Top|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|12|}' is not assignable to type '{|Top|13|}'. +!!! error TS2322: '{|U|14|}' is assignable to the constraint of type '{|Top|15|}', but '{|Top|16|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond2.ts:3:32 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond2.ts:3:32 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond2.ts:2:28 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond2.ts:2:28 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 12 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 13 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 14 tests/cases/compiler/typeParameterDiamond2.ts:2:43 +!!! annotated symbol 15 tests/cases/compiler/typeParameterDiamond2.ts:1:21 +!!! annotated symbol 16 tests/cases/compiler/typeParameterDiamond2.ts:1:21 } } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterDiamond3.errors.txt b/tests/baselines/reference/typeParameterDiamond3.errors.txt index 15abd9973d17e..05ac52d30527a 100644 --- a/tests/baselines/reference/typeParameterDiamond3.errors.txt +++ b/tests/baselines/reference/typeParameterDiamond3.errors.txt @@ -31,31 +31,97 @@ tests/cases/compiler/typeParameterDiamond3.ts(10,13): error TS2322: Type 'Bottom top = middle; ~~~ -!!! error TS2322: Type 'T | U' is not assignable to type 'Top'. -!!! error TS2322: 'T | U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T' is not assignable to type 'Top'. -!!! error TS2322: 'T' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|} | {|U|1|}' is not assignable to type '{|Top|2|}'. +!!! error TS2322: '{|T|3|} | {|U|4|}' is assignable to the constraint of type '{|Top|5|}', but '{|Top|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|7|}' is not assignable to type '{|Top|8|}'. +!!! error TS2322: '{|T|9|}' is assignable to the constraint of type '{|Top|10|}', but '{|Top|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond3.ts:1:21 middle = bottom; ~~~~~~ -!!! error TS2322: Type 'Bottom' is not assignable to type 'T | U'. -!!! error TS2322: Type 'Top | T | U' is not assignable to type 'T | U'. -!!! error TS2322: Type 'Top' is not assignable to type 'T | U'. -!!! error TS2322: Type 'Top' is not assignable to type 'U'. -!!! error TS2322: 'Top' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Bottom' is not assignable to type 'U'. -!!! error TS2322: 'Bottom' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Top | T | U' is not assignable to type 'U'. -!!! error TS2322: 'Top | T | U' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Top' is not assignable to type 'U'. -!!! error TS2322: 'Top' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Bottom|0|}' is not assignable to type '{|T|1|} | {|U|2|}'. +!!! error TS2322: Type '{|Top|3|} | {|T|4|} | {|U|5|}' is not assignable to type '{|T|6|} | {|U|7|}'. +!!! error TS2322: Type '{|Top|8|}' is not assignable to type '{|T|9|} | {|U|10|}'. +!!! error TS2322: Type '{|Top|11|}' is not assignable to type '{|U|12|}'. +!!! error TS2322: '{|Top|13|}' is assignable to the constraint of type '{|U|14|}', but '{|U|15|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Bottom|16|}' is not assignable to type '{|U|17|}'. +!!! error TS2322: '{|Bottom|18|}' is assignable to the constraint of type '{|U|19|}', but '{|U|20|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Top|21|} | {|T|22|} | {|U|23|}' is not assignable to type '{|U|24|}'. +!!! error TS2322: '{|Top|25|} | {|T|26|} | {|U|27|}' is assignable to the constraint of type '{|U|28|}', but '{|U|29|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Top|30|}' is not assignable to type '{|U|31|}'. +!!! error TS2322: '{|Top|32|}' is assignable to the constraint of type '{|U|33|}', but '{|U|34|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond3.ts:3:32 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 12 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 13 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 14 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 15 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 16 tests/cases/compiler/typeParameterDiamond3.ts:3:32 +!!! annotated symbol 17 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 18 tests/cases/compiler/typeParameterDiamond3.ts:3:32 +!!! annotated symbol 19 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 20 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 21 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 22 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 23 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 24 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 25 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 26 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 27 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 28 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 29 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 30 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 31 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 32 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 33 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 34 tests/cases/compiler/typeParameterDiamond3.ts:2:31 top = bottom; ~~~ -!!! error TS2322: Type 'Bottom' is not assignable to type 'Top'. -!!! error TS2322: 'Bottom' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Top | T | U' is not assignable to type 'Top'. -!!! error TS2322: 'Top | T | U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T' is not assignable to type 'Top'. -!!! error TS2322: 'T' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Bottom|0|}' is not assignable to type '{|Top|1|}'. +!!! error TS2322: '{|Bottom|2|}' is assignable to the constraint of type '{|Top|3|}', but '{|Top|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Top|5|} | {|T|6|} | {|U|7|}' is not assignable to type '{|Top|8|}'. +!!! error TS2322: '{|Top|9|} | {|T|10|} | {|U|11|}' is assignable to the constraint of type '{|Top|12|}', but '{|Top|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|14|}' is not assignable to type '{|Top|15|}'. +!!! error TS2322: '{|T|16|}' is assignable to the constraint of type '{|Top|17|}', but '{|Top|18|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond3.ts:3:32 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond3.ts:3:32 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond3.ts:2:31 +!!! annotated symbol 12 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 13 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 14 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 15 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 16 tests/cases/compiler/typeParameterDiamond3.ts:2:28 +!!! annotated symbol 17 tests/cases/compiler/typeParameterDiamond3.ts:1:21 +!!! annotated symbol 18 tests/cases/compiler/typeParameterDiamond3.ts:1:21 } } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterDiamond4.errors.txt b/tests/baselines/reference/typeParameterDiamond4.errors.txt index e135515389232..484242f1d9c68 100644 --- a/tests/baselines/reference/typeParameterDiamond4.errors.txt +++ b/tests/baselines/reference/typeParameterDiamond4.errors.txt @@ -20,19 +20,52 @@ tests/cases/compiler/typeParameterDiamond4.ts(10,13): error TS2322: Type 'Bottom top = middle; ~~~ -!!! error TS2322: Type 'Top | T | U' is not assignable to type 'Top'. -!!! error TS2322: 'Top | T | U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T' is not assignable to type 'Top'. -!!! error TS2322: 'T' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Top|0|} | {|T|1|} | {|U|2|}' is not assignable to type '{|Top|3|}'. +!!! error TS2322: '{|Top|4|} | {|T|5|} | {|U|6|}' is assignable to the constraint of type '{|Top|7|}', but '{|Top|8|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|9|}' is not assignable to type '{|Top|10|}'. +!!! error TS2322: '{|T|11|}' is assignable to the constraint of type '{|Top|12|}', but '{|Top|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond4.ts:2:31 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond4.ts:2:31 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 12 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 13 tests/cases/compiler/typeParameterDiamond4.ts:1:21 middle = bottom; top = bottom; ~~~ -!!! error TS2322: Type 'Bottom' is not assignable to type 'Top'. -!!! error TS2322: 'Bottom' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Top | T | U' is not assignable to type 'Top'. -!!! error TS2322: 'Top | T | U' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T' is not assignable to type 'Top'. -!!! error TS2322: 'T' is assignable to the constraint of type 'Top', but 'Top' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Bottom|0|}' is not assignable to type '{|Top|1|}'. +!!! error TS2322: '{|Bottom|2|}' is assignable to the constraint of type '{|Top|3|}', but '{|Top|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Top|5|} | {|T|6|} | {|U|7|}' is not assignable to type '{|Top|8|}'. +!!! error TS2322: '{|Top|9|} | {|T|10|} | {|U|11|}' is assignable to the constraint of type '{|Top|12|}', but '{|Top|13|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|14|}' is not assignable to type '{|Top|15|}'. +!!! error TS2322: '{|T|16|}' is assignable to the constraint of type '{|Top|17|}', but '{|Top|18|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterDiamond4.ts:3:32 +!!! annotated symbol 1 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 2 tests/cases/compiler/typeParameterDiamond4.ts:3:32 +!!! annotated symbol 3 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 4 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 5 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 6 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 7 tests/cases/compiler/typeParameterDiamond4.ts:2:31 +!!! annotated symbol 8 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 9 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 10 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 11 tests/cases/compiler/typeParameterDiamond4.ts:2:31 +!!! annotated symbol 12 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 13 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 14 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 15 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 16 tests/cases/compiler/typeParameterDiamond4.ts:2:28 +!!! annotated symbol 17 tests/cases/compiler/typeParameterDiamond4.ts:1:21 +!!! annotated symbol 18 tests/cases/compiler/typeParameterDiamond4.ts:1:21 } } } \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt index 23d01094ed53c..fca87119a0568 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments2.errors.txt @@ -10,6 +10,8 @@ tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts(7,30): var d = f(a, b, x => x, x => x); // A => A not assignable to A => B ~ -!!! error TS2741: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2741: Property 'b' is missing in type '{|A|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts:3:25: 'b' is declared here. -!!! related TS6502 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts:1:51: The expected type comes from the return type of this signature. \ No newline at end of file +!!! related TS6502 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts:1:51: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts:2:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments2.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt index 5610e28cf7eb5..3e30a488ec344 100644 --- a/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt +++ b/tests/baselines/reference/typeParameterFixingWithContextSensitiveArguments3.errors.txt @@ -10,6 +10,8 @@ tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts(7,35): var d = f(a, b, u2 => u2.b, t2 => t2); ~~ -!!! error TS2741: Property 'b' is missing in type 'A' but required in type 'B'. +!!! error TS2741: Property 'b' is missing in type '{|A|0|}' but required in type '{|B|1|}'. !!! related TS2728 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:3:25: 'b' is declared here. -!!! related TS6502 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:1:56: The expected type comes from the return type of this signature. \ No newline at end of file +!!! related TS6502 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:1:56: The expected type comes from the return type of this signature. +!!! annotated symbol 0 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:2:11 +!!! annotated symbol 1 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:3:11 \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt b/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt index 01cfff63e5f6b..001d34e31ee6e 100644 --- a/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt +++ b/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt @@ -8,7 +8,8 @@ tests/cases/compiler/typeParameterHasSelfAsConstraint.ts(2,5): error TS2322: Typ !!! error TS2313: Type parameter 'T' has a circular constraint. return x; ~~~~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type 'number'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'number'. +!!! annotated symbol 0 tests/cases/compiler/typeParameterHasSelfAsConstraint.ts:1:14 } \ No newline at end of file diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt index 30f71cdfeba1b..12b604c9b5e4f 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual.errors.txt @@ -11,13 +11,23 @@ tests/cases/compiler/typeParametersShouldNotBeEqual.ts(5,5): error TS2322: Type x = x; // Ok x = y; // Error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:16 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:13 +!!! annotated symbol 2 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:16 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:13 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:13 x = z; // Error ~ -!!! error TS2322: Type 'Object' is not assignable to type 'T'. -!!! error TS2322: 'Object' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|Object|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:13 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual.ts:1:13 z = x; // Ok } \ No newline at end of file diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt index 5d04f500fd691..321cb48d71ae3 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual2.errors.txt @@ -22,32 +22,70 @@ tests/cases/compiler/typeParametersShouldNotBeEqual2.ts(9,5): error TS2322: Type x = x; // Ok x = y; // Ok ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. -!!! error TS2322: Type 'Date' is not assignable to type 'T'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Date|5|}'. +!!! error TS2322: Type '{|Date|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|Date|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Date|11|}'. +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:29 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 2 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:29 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 7 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 9 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 10 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:729:11 x = z; // Error ~ -!!! error TS2322: Type 'V' is not assignable to type 'T'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|T|1|}'. +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 z = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'V'. -!!! error TS2322: 'T' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Date' is not assignable to type 'V'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Date|5|}' is not assignable to type '{|V|6|}'. +!!! error TS2322: '{|Date|7|}' is assignable to the constraint of type '{|V|8|}', but '{|V|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 2 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 8 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 9 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 y = z; // Error ~ -!!! error TS2322: Type 'V' is not assignable to type 'U'. +!!! error TS2322: Type '{|V|0|}' is not assignable to type '{|U|1|}'. +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:29 z = y; // Error ~ -!!! error TS2322: Type 'U' is not assignable to type 'V'. -!!! error TS2322: 'U' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'Date' is not assignable to type 'V'. -!!! error TS2322: 'Date' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|V|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|V|3|}', but '{|V|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|Date|5|}' is not assignable to type '{|V|6|}'. +!!! error TS2322: '{|Date|7|}' is assignable to the constraint of type '{|V|8|}', but '{|V|9|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:29 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 2 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:29 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 6 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 7 /.ts/lib.es5.d.ts:729:11 +!!! annotated symbol 8 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 +!!! annotated symbol 9 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:45 x = zz; // Error ~ -!!! error TS2322: Type 'Object' is not assignable to type 'T'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|T|1|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual2.ts:1:13 zz = x; // Ok } \ No newline at end of file diff --git a/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt b/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt index fcc9c0d3c8786..2e1e74896320e 100644 --- a/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt +++ b/tests/baselines/reference/typeParametersShouldNotBeEqual3.errors.txt @@ -14,16 +14,34 @@ tests/cases/compiler/typeParametersShouldNotBeEqual3.ts(5,5): error TS2322: Type x = x; // Ok x = y; // Ok ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Object'. -!!! error TS2322: Type 'Object' is not assignable to type 'T'. -!!! error TS2322: 'Object' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Object'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Object|5|}'. +!!! error TS2322: Type '{|Object|6|}' is not assignable to type '{|T|7|}'. +!!! error TS2322: '{|Object|8|}' is assignable to the constraint of type '{|T|9|}', but '{|T|10|}' could be instantiated with a different subtype of constraint '{|Object|11|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! annotated symbol 0 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:31 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 2 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:31 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 6 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 7 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 9 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 10 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 11 /.ts/lib.es5.d.ts:120:11 x = z; // Ok ~ -!!! error TS2322: Type 'Object' is not assignable to type 'T'. -!!! error TS2322: 'Object' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Object'. +!!! error TS2322: Type '{|Object|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|Object|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{|Object|5|}'. !!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! annotated symbol 0 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 1 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:120:11 +!!! annotated symbol 3 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 4 tests/cases/compiler/typeParametersShouldNotBeEqual3.ts:1:13 +!!! annotated symbol 5 /.ts/lib.es5.d.ts:120:11 z = x; // Ok } \ No newline at end of file diff --git a/tests/baselines/reference/typeRelationships.errors.txt b/tests/baselines/reference/typeRelationships.errors.txt index 6176fc84d2cfb..aa5663926ab6a 100644 --- a/tests/baselines/reference/typeRelationships.errors.txt +++ b/tests/baselines/reference/typeRelationships.errors.txt @@ -16,8 +16,11 @@ tests/cases/conformance/types/thisType/typeRelationships.ts(36,9): error TS2322: this.c = this.self; this.self = this.c; // Error ~~~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type 'this'. -!!! error TS2322: 'C' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'C'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type 'this'. +!!! error TS2322: '{|C|1|}' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint '{|C|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/typeRelationships.ts:1:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/typeRelationships.ts:1:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/typeRelationships.ts:1:7 } f2() { var a: C[]; @@ -48,8 +51,11 @@ tests/cases/conformance/types/thisType/typeRelationships.ts(36,9): error TS2322: !!! error TS2739: Type 'C' is missing the following properties from type 'D': self1, self2, self3, d, bar this.self = this.d; // Error ~~~~~~~~~ -!!! error TS2322: Type 'D' is not assignable to type 'this'. -!!! error TS2322: 'D' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'D'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type 'this'. +!!! error TS2322: '{|D|1|}' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint '{|D|2|}'. +!!! annotated symbol 0 tests/cases/conformance/types/thisType/typeRelationships.ts:22:7 +!!! annotated symbol 1 tests/cases/conformance/types/thisType/typeRelationships.ts:22:7 +!!! annotated symbol 2 tests/cases/conformance/types/thisType/typeRelationships.ts:22:7 this.c = this.d; } } diff --git a/tests/baselines/reference/typedArraysCrossAssignability01.errors.txt b/tests/baselines/reference/typedArraysCrossAssignability01.errors.txt index ad94980642943..bd58c84235c9e 100644 --- a/tests/baselines/reference/typedArraysCrossAssignability01.errors.txt +++ b/tests/baselines/reference/typedArraysCrossAssignability01.errors.txt @@ -207,337 +207,465 @@ tests/cases/compiler/typedArraysCrossAssignability01.ts(89,5): error TS2322: Typ arr_Int8Array = arr_Int8Array; arr_Int8Array = arr_Uint8Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Int16Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Uint16Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Int32Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Uint32Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Float32Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Float64Array; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Int8Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Int8Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Int8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"Int8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1688:11 arr_Uint8Array = arr_Int8Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Uint8Array; arr_Uint8Array = arr_Int16Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Uint16Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Int32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Uint32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Float32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Float64Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Uint8Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Uint8Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Uint8Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"UInt8Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:1963:11 arr_Int16Array = arr_Int8Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Uint8Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Int16Array; arr_Int16Array = arr_Uint16Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Int32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Uint32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Float32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Float64Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Int16Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Int16Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Int16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"Int16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2512:11 arr_Uint16Array = arr_Int8Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Uint8Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Int16Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Uint16Array; arr_Uint16Array = arr_Int32Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Uint32Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Float32Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Float64Array; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Uint16Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Uint16Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Uint16Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"Uint16Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2787:11 arr_Int32Array = arr_Int8Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Uint8Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Int16Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Uint16Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Int32Array; arr_Int32Array = arr_Uint32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Float32Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Float64Array; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Int32Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Int32Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Int32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"Int32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3062:11 arr_Float32Array = arr_Int8Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Uint8Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Int16Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Uint16Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Int32Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Uint32Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Float32Array; arr_Float32Array = arr_Float64Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float32Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Float32Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Float32Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"Float32Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3611:11 arr_Float64Array = arr_Int8Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Uint8Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Int16Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Uint16Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Int32Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Uint32Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Float32Array; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Float64Array = arr_Float64Array; arr_Float64Array = arr_Uint8ClampedArray; ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8ClampedArray' is not assignable to type 'Float64Array'. +!!! error TS2322: Type '{|Uint8ClampedArray|0|}' is not assignable to type '{|Float64Array|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint8ClampedArray"' is not assignable to type '"Float64Array"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2238:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:3887:11 arr_Uint8ClampedArray = arr_Int8Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int8Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Int8Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int8Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1688:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Uint8Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint8Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Uint8Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"UInt8Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:1963:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Int16Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int16Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Int16Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int16Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2512:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Uint16Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint16Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Uint16Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint16Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:2787:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Int32Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Int32Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Int32Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Int32Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3062:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Uint32Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Uint32Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Uint32Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Uint32Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3337:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Float32Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float32Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Float32Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float32Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3611:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Float64Array; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Float64Array' is not assignable to type 'Uint8ClampedArray'. +!!! error TS2322: Type '{|Float64Array|0|}' is not assignable to type '{|Uint8ClampedArray|1|}'. !!! error TS2322: Types of property '[Symbol.toStringTag]' are incompatible. !!! error TS2322: Type '"Float64Array"' is not assignable to type '"Uint8ClampedArray"'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:3887:11 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:2238:11 arr_Uint8ClampedArray = arr_Uint8ClampedArray; } diff --git a/tests/baselines/reference/typedefMultipleTypeParameters.errors.txt b/tests/baselines/reference/typedefMultipleTypeParameters.errors.txt index 7d81ddab00e3b..c92185ba1ec05 100644 --- a/tests/baselines/reference/typedefMultipleTypeParameters.errors.txt +++ b/tests/baselines/reference/typedefMultipleTypeParameters.errors.txt @@ -19,9 +19,15 @@ tests/cases/conformance/jsdoc/test.ts(1,34): error TS2344: Type '{ a: number; }' /** @type {Everything<{ a: number }, undefined, { c: 1, d: 1 }, number, string>} */ ~~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: number; b: string; }'. -!!! error TS2344: Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: string; }'. +!!! error TS2344: Type '{ {|a|0|}: number; }' does not satisfy the constraint '{ {|a|1|}: number; {|b|2|}: string; }'. +!!! error TS2344: Property 'b' is missing in type '{ {|a|3|}: number; }' but required in type '{ {|a|4|}: number; {|b|5|}: string; }'. !!! related TS2728 tests/cases/conformance/jsdoc/a.js:2:28: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/a.js:12:25 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/a.js:2:17 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/a.js:2:28 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/a.js:12:25 +!!! annotated symbol 4 tests/cases/conformance/jsdoc/a.js:2:17 +!!! annotated symbol 5 tests/cases/conformance/jsdoc/a.js:2:28 var wrong; /** @type {Everything<{ a: number }>} */ @@ -32,7 +38,13 @@ tests/cases/conformance/jsdoc/test.ts(1,34): error TS2344: Type '{ a: number; }' ==== tests/cases/conformance/jsdoc/test.ts (1 errors) ==== declare var actually: Everything<{ a: number }, undefined, { c: 1, d: 1 }, number, string>; ~~~~~~~~~~~~~~ -!!! error TS2344: Type '{ a: number; }' does not satisfy the constraint '{ a: number; b: string; }'. -!!! error TS2344: Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: string; }'. +!!! error TS2344: Type '{ {|a|0|}: number; }' does not satisfy the constraint '{ {|a|1|}: number; {|b|2|}: string; }'. +!!! error TS2344: Property 'b' is missing in type '{ {|a|3|}: number; }' but required in type '{ {|a|4|}: number; {|b|5|}: string; }'. !!! related TS2728 tests/cases/conformance/jsdoc/a.js:2:28: 'b' is declared here. +!!! annotated symbol 0 tests/cases/conformance/jsdoc/test.ts:1:36 +!!! annotated symbol 1 tests/cases/conformance/jsdoc/a.js:2:17 +!!! annotated symbol 2 tests/cases/conformance/jsdoc/a.js:2:28 +!!! annotated symbol 3 tests/cases/conformance/jsdoc/test.ts:1:36 +!!! annotated symbol 4 tests/cases/conformance/jsdoc/a.js:2:17 +!!! annotated symbol 5 tests/cases/conformance/jsdoc/a.js:2:28 \ No newline at end of file diff --git a/tests/baselines/reference/typeofAmbientExternalModules.errors.txt b/tests/baselines/reference/typeofAmbientExternalModules.errors.txt index cdb247dd9289e..7c80628251ff9 100644 --- a/tests/baselines/reference/typeofAmbientExternalModules.errors.txt +++ b/tests/baselines/reference/typeofAmbientExternalModules.errors.txt @@ -11,12 +11,14 @@ tests/cases/compiler/typeofAmbientExternalModules_2.ts(9,1): error TS2741: Prope var y1: typeof ext = ext; y1 = exp; ~~ -!!! error TS2741: Property 'C' is missing in type 'typeof D' but required in type 'typeof import("tests/cases/compiler/typeofAmbientExternalModules_0")'. +!!! error TS2741: Property 'C' is missing in type 'typeof {|D|0|}' but required in type 'typeof import("tests/cases/compiler/typeofAmbientExternalModules_0")'. !!! related TS2728 tests/cases/compiler/typeofAmbientExternalModules_0.ts:1:14: 'C' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeofAmbientExternalModules_1.ts:1:7 var y2: typeof exp = exp; y2 = ext; ~~ -!!! error TS2741: Property 'prototype' is missing in type 'typeof import("tests/cases/compiler/typeofAmbientExternalModules_0")' but required in type 'typeof D'. +!!! error TS2741: Property 'prototype' is missing in type 'typeof import("tests/cases/compiler/typeofAmbientExternalModules_0")' but required in type 'typeof {|D|0|}'. +!!! annotated symbol 0 tests/cases/compiler/typeofAmbientExternalModules_1.ts:1:7 ==== tests/cases/compiler/typeofAmbientExternalModules_0.ts (0 errors) ==== export class C { foo: string; } diff --git a/tests/baselines/reference/typeofExternalModules.errors.txt b/tests/baselines/reference/typeofExternalModules.errors.txt index 643fdf3e61f49..518e3648e6103 100644 --- a/tests/baselines/reference/typeofExternalModules.errors.txt +++ b/tests/baselines/reference/typeofExternalModules.errors.txt @@ -9,12 +9,14 @@ tests/cases/compiler/typeofExternalModules_core.ts(7,1): error TS2741: Property var y1: typeof ext = ext; y1 = exp; ~~ -!!! error TS2741: Property 'C' is missing in type 'typeof D' but required in type 'typeof import("tests/cases/compiler/typeofExternalModules_external")'. +!!! error TS2741: Property 'C' is missing in type 'typeof {|D|0|}' but required in type 'typeof import("tests/cases/compiler/typeofExternalModules_external")'. !!! related TS2728 /.src/tests/cases/compiler/typeofExternalModules_external.ts:1:14: 'C' is declared here. +!!! annotated symbol 0 /.src/tests/cases/compiler/typeofExternalModules_exportAssign.ts:1:7 var y2: typeof exp = exp; y2 = ext; ~~ -!!! error TS2741: Property 'prototype' is missing in type 'typeof import("tests/cases/compiler/typeofExternalModules_external")' but required in type 'typeof D'. +!!! error TS2741: Property 'prototype' is missing in type 'typeof import("tests/cases/compiler/typeofExternalModules_external")' but required in type 'typeof {|D|0|}'. +!!! annotated symbol 0 /.src/tests/cases/compiler/typeofExternalModules_exportAssign.ts:1:7 ==== tests/cases/compiler/typeofExternalModules_external.ts (0 errors) ==== export class C { } diff --git a/tests/baselines/reference/typeofInternalModules.errors.txt b/tests/baselines/reference/typeofInternalModules.errors.txt index 8ba8cc720ca12..6d2b5c35fd1a8 100644 --- a/tests/baselines/reference/typeofInternalModules.errors.txt +++ b/tests/baselines/reference/typeofInternalModules.errors.txt @@ -30,8 +30,10 @@ tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2741: Property 'ins var x5: typeof importInst; x5 = Outer; ~~ -!!! error TS2741: Property 'C' is missing in type 'typeof Outer' but required in type 'typeof instantiated'. +!!! error TS2741: Property 'C' is missing in type 'typeof {|Outer|0|}' but required in type 'typeof {|instantiated|1|}'. !!! related TS2728 tests/cases/compiler/typeofInternalModules.ts:3:22: 'C' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeofInternalModules.ts:1:8 +!!! annotated symbol 1 tests/cases/compiler/typeofInternalModules.ts:2:19 x5 = Outer.instantiated; var x6: typeof importUninst; ~~~~~~~~~~~~ @@ -39,6 +41,8 @@ tests/cases/compiler/typeofInternalModules.ts(23,1): error TS2741: Property 'ins var x7: typeof Outer = Outer; x7 = importInst; ~~ -!!! error TS2741: Property 'instantiated' is missing in type 'typeof instantiated' but required in type 'typeof Outer'. +!!! error TS2741: Property 'instantiated' is missing in type 'typeof {|instantiated|0|}' but required in type 'typeof {|Outer|1|}'. !!! related TS2728 tests/cases/compiler/typeofInternalModules.ts:2:19: 'instantiated' is declared here. +!!! annotated symbol 0 tests/cases/compiler/typeofInternalModules.ts:2:19 +!!! annotated symbol 1 tests/cases/compiler/typeofInternalModules.ts:1:8 \ No newline at end of file diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt index 471cf39bed29c..aadec951719cb 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt +++ b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt @@ -61,65 +61,115 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts( } const assignability1: () => AsyncIterableIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterableIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterableIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterableIterator|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterableIterator|3|}'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:42:11 yield "a"; }; const assignability2: () => AsyncIterableIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterableIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterableIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterableIterator|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterableIterator|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:42:11 yield* ["a", "b"]; }; const assignability3: () => AsyncIterableIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterableIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterableIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterableIterator|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterableIterator|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:42:11 yield* (async function * () { yield "a"; })(); }; const assignability4: () => AsyncIterable = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterable'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterable'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterable|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterable|3|}'. !!! error TS2322: Types of property '[Symbol.asyncIterator]' are incompatible. -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|4|}' is not assignable to type '() => {|AsyncIterator|5|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|6|}' is not assignable to type '{|AsyncIterator|7|}'. !!! error TS2322: Types of property 'next' are incompatible. -!!! error TS2322: Type '(value?: any) => Promise>' is not assignable to type '(value?: any) => Promise>'. -!!! error TS2322: Type 'Promise>' is not assignable to type 'Promise>'. -!!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. +!!! error TS2322: Type '(value?: any) => {|Promise|8|}<{|IteratorResult|9|}>' is not assignable to type '(value?: any) => {|Promise|10|}<{|IteratorResult|11|}>'. +!!! error TS2322: Type '{|Promise|12|}<{|IteratorResult|13|}>' is not assignable to type '{|Promise|14|}<{|IteratorResult|15|}>'. +!!! error TS2322: Type '{|IteratorResult|16|}' is not assignable to type '{|IteratorResult|17|}'. !!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:38:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:38:11 +!!! annotated symbol 4 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 5 /.ts/lib.es2018.asynciterable.d.ts:32:11 +!!! annotated symbol 6 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 7 /.ts/lib.es2018.asynciterable.d.ts:32:11 +!!! annotated symbol 8 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 9 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 10 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 11 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 12 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 13 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 14 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 15 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 16 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 17 /.ts/lib.es2015.iterable.d.ts:31:11 yield "a"; }; const assignability5: () => AsyncIterable = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterable'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterable'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterable|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterable|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:38:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:38:11 yield* ["a", "b"]; }; const assignability6: () => AsyncIterable = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterable'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterable'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterable|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterable|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:38:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:38:11 yield* (async function * () { yield "a"; })(); }; const assignability7: () => AsyncIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterator|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterator|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:32:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:32:11 yield "a"; }; const assignability8: () => AsyncIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterator|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterator|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:32:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:32:11 yield* ["a", "b"]; }; const assignability9: () => AsyncIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncIterableIterator' is not assignable to type '() => AsyncIterator'. -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'AsyncIterator'. +!!! error TS2322: Type '() => {|AsyncIterableIterator|0|}' is not assignable to type '() => {|AsyncIterator|1|}'. +!!! error TS2322: Type '{|AsyncIterableIterator|2|}' is not assignable to type '{|AsyncIterator|3|}'. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2018.asynciterable.d.ts:32:11 +!!! annotated symbol 2 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 3 /.ts/lib.es2018.asynciterable.d.ts:32:11 yield* (async function * () { yield "a"; })(); }; async function * explicitReturnType1(): AsyncIterableIterator { @@ -169,22 +219,31 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts( } async function * explicitReturnType10(): IterableIterator { ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncIterableIterator' but required in type 'IterableIterator'. +!!! error TS2741: Property '[Symbol.iterator]' is missing in type '{|AsyncIterableIterator|0|}' but required in type '{|IterableIterator|1|}'. !!! related TS2728 /.ts/lib.es2015.iterable.d.ts:47:5: '[Symbol.iterator]' is declared here. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:46:11 yield 1; } async function * explicitReturnType11(): Iterable { ~~~~~~~~~~~~~~~~ -!!! error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncIterableIterator' but required in type 'Iterable'. +!!! error TS2741: Property '[Symbol.iterator]' is missing in type '{|AsyncIterableIterator|0|}' but required in type '{|Iterable|1|}'. !!! related TS2728 /.ts/lib.es2015.iterable.d.ts:43:5: '[Symbol.iterator]' is declared here. +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:42:11 yield 1; } async function * explicitReturnType12(): Iterator { ~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'AsyncIterableIterator' is not assignable to type 'Iterator'. +!!! error TS2322: Type '{|AsyncIterableIterator|0|}' is not assignable to type '{|Iterator|1|}'. !!! error TS2322: Types of property 'next' are incompatible. -!!! error TS2322: Type '(value?: any) => Promise>' is not assignable to type '(value?: any) => IteratorResult'. +!!! error TS2322: Type '(value?: any) => {|Promise|2|}<{|IteratorResult|3|}>' is not assignable to type '(value?: any) => {|IteratorResult|4|}'. !!! error TS2322: Type 'Promise>' is missing the following properties from type 'IteratorResult': done, value +!!! annotated symbol 0 /.ts/lib.es2018.asynciterable.d.ts:42:11 +!!! annotated symbol 1 /.ts/lib.es2015.iterable.d.ts:36:11 +!!! annotated symbol 2 /.ts/lib.es5.d.ts:1399:11 +!!! annotated symbol 3 /.ts/lib.es2015.iterable.d.ts:31:11 +!!! annotated symbol 4 /.ts/lib.es2015.iterable.d.ts:31:11 yield 1; } async function * yieldStar() { diff --git a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt index 29f5439c3aa3a..f3301970a7738 100644 --- a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt +++ b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.errors.txt @@ -8,8 +8,10 @@ tests/cases/conformance/externalModules/foo_1.ts(5,5): error TS2741: Property 'M var x: typeof foo0 = {}; var y: {M2: Object} = foo0; ~ -!!! error TS2741: Property 'M2' is missing in type 'typeof import("tests/cases/conformance/externalModules/foo_0")' but required in type '{ M2: Object; }'. +!!! error TS2741: Property 'M2' is missing in type 'typeof import("tests/cases/conformance/externalModules/foo_0")' but required in type '{ {|M2|0|}: {|Object|1|}; }'. !!! related TS2728 tests/cases/conformance/externalModules/foo_1.ts:5:9: 'M2' is declared here. +!!! annotated symbol 0 tests/cases/conformance/externalModules/foo_1.ts:5:9 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:120:11 ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== export interface Person { diff --git a/tests/baselines/reference/typesWithPublicConstructor.errors.txt b/tests/baselines/reference/typesWithPublicConstructor.errors.txt index 9aa44dea89da5..d62a17ba2cb72 100644 --- a/tests/baselines/reference/typesWithPublicConstructor.errors.txt +++ b/tests/baselines/reference/typesWithPublicConstructor.errors.txt @@ -13,8 +13,9 @@ tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): erro var c = new C(); var r: () => void = c.constructor; ~ -!!! error TS2322: Type 'Function' is not assignable to type '() => void'. +!!! error TS2322: Type '{|Function|0|}' is not assignable to type '() => void'. !!! error TS2322: Type 'Function' provides no match for the signature '(): void'. +!!! annotated symbol 0 /.ts/lib.es5.d.ts:272:11 class C2 { public constructor(x: number); diff --git a/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.errors.txt b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.errors.txt index dec048bb87c06..6852a9f8b7ae3 100644 --- a/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.errors.txt +++ b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.errors.txt @@ -8,6 +8,9 @@ tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts(5,5): err let x!: keyof T; obj[x] = undefined; ~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'Errors[keyof T]'. +!!! error TS2322: Type 'undefined' is not assignable to type '{|Errors|0|}<{|T|1|}>[keyof {|T|2|}]'. +!!! annotated symbol 0 tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts:1:6 +!!! annotated symbol 1 tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts:2:14 +!!! annotated symbol 2 tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts:2:14 } \ No newline at end of file diff --git a/tests/baselines/reference/underscoreTest1.errors.txt b/tests/baselines/reference/underscoreTest1.errors.txt index 66fc8961eef58..7eef101abe99e 100644 --- a/tests/baselines/reference/underscoreTest1.errors.txt +++ b/tests/baselines/reference/underscoreTest1.errors.txt @@ -30,8 +30,9 @@ tests/cases/compiler/underscoreTest1_underscoreTests.ts(26,7): error TS2345: Arg _.all([true, 1, null, 'yes'], _.identity); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(string | number | boolean)[]' is not assignable to parameter of type 'Dictionary'. +!!! error TS2345: Argument of type '(string | number | boolean)[]' is not assignable to parameter of type '{|Dictionary|0|}'. !!! error TS2345: Index signature is missing in type '(string | number | boolean)[]'. +!!! annotated symbol 0 tests/cases/compiler/underscoreTest1_underscore.ts:1:11 _.any([null, 0, 'yes', false]); diff --git a/tests/baselines/reference/unionTypeErrorMessageTypeRefs01.errors.txt b/tests/baselines/reference/unionTypeErrorMessageTypeRefs01.errors.txt index ab661b6fee7c8..8719035ad2b0c 100644 --- a/tests/baselines/reference/unionTypeErrorMessageTypeRefs01.errors.txt +++ b/tests/baselines/reference/unionTypeErrorMessageTypeRefs01.errors.txt @@ -45,22 +45,64 @@ tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(50,1): error TS2322: Typ thingOfInterfaces = a; ~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'A' is not assignable to type 'A | B | C'. -!!! error TS2322: Type 'A' is not assignable to type 'A'. -!!! error TS2322: Property 'bar' is missing in type 'Foo' but required in type 'Bar'. +!!! error TS2322: Type '{|A|0|}<{|Foo|1|}>' is not assignable to type '{|A|2|}<{|Bar|3|}> | {|B|4|}<{|Baz|5|}> | {|C|6|}<{|Kwah|7|}>'. +!!! error TS2322: Type '{|A|8|}<{|Foo|9|}>' is not assignable to type '{|A|10|}<{|Bar|11|}>'. +!!! error TS2322: Property 'bar' is missing in type '{|Foo|12|}' but required in type '{|Bar|13|}'. !!! related TS2728 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:17: 'bar' is declared here. +!!! annotated symbol 0 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:8:11 +!!! annotated symbol 1 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:12:11 +!!! annotated symbol 5 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:16:11 +!!! annotated symbol 7 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:8:11 +!!! annotated symbol 9 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:8:11 +!!! annotated symbol 11 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 12 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 13 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 thingOfInterfaces = b; ~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'B' is not assignable to type 'A | B | C'. -!!! error TS2322: Type 'B' is not assignable to type 'B'. -!!! error TS2322: Property 'baz' is missing in type 'Foo' but required in type 'Baz'. +!!! error TS2322: Type '{|B|0|}<{|Foo|1|}>' is not assignable to type '{|A|2|}<{|Bar|3|}> | {|B|4|}<{|Baz|5|}> | {|C|6|}<{|Kwah|7|}>'. +!!! error TS2322: Type '{|B|8|}<{|Foo|9|}>' is not assignable to type '{|B|10|}<{|Baz|11|}>'. +!!! error TS2322: Property 'baz' is missing in type '{|Foo|12|}' but required in type '{|Baz|13|}'. !!! related TS2728 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:17: 'baz' is declared here. +!!! annotated symbol 0 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:12:11 +!!! annotated symbol 1 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:12:11 +!!! annotated symbol 5 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:16:11 +!!! annotated symbol 7 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:12:11 +!!! annotated symbol 9 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:12:11 +!!! annotated symbol 11 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 12 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 13 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 thingOfInterfaces = c; ~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type 'A | B | C'. -!!! error TS2322: Type 'C' is not assignable to type 'C'. -!!! error TS2322: Property 'kwah' is missing in type 'Foo' but required in type 'Kwah'. +!!! error TS2322: Type '{|C|0|}<{|Foo|1|}>' is not assignable to type '{|A|2|}<{|Bar|3|}> | {|B|4|}<{|Baz|5|}> | {|C|6|}<{|Kwah|7|}>'. +!!! error TS2322: Type '{|C|8|}<{|Foo|9|}>' is not assignable to type '{|C|10|}<{|Kwah|11|}>'. +!!! error TS2322: Property 'kwah' is missing in type '{|Foo|12|}' but required in type '{|Kwah|13|}'. !!! related TS2728 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:18: 'kwah' is declared here. +!!! annotated symbol 0 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:16:11 +!!! annotated symbol 1 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:8:11 +!!! annotated symbol 3 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:12:11 +!!! annotated symbol 5 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:16:11 +!!! annotated symbol 7 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:16:11 +!!! annotated symbol 9 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:16:11 +!!! annotated symbol 11 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 12 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 13 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 //////// @@ -83,16 +125,58 @@ tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(50,1): error TS2322: Typ thingOfTypeAliases = x; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'X' is not assignable to type 'X | Y | Z'. -!!! error TS2322: Type 'X' is not assignable to type 'X'. -!!! error TS2322: Type 'Foo' is not assignable to type 'Bar'. +!!! error TS2322: Type '{|X|0|}<{|Foo|1|}>' is not assignable to type '{|X|2|}<{|Bar|3|}> | {|Y|4|}<{|Baz|5|}> | {|Z|6|}<{|Kwah|7|}>'. +!!! error TS2322: Type '{|X|8|}<{|Foo|9|}>' is not assignable to type '{|X|10|}<{|Bar|11|}>'. +!!! error TS2322: Type '{|Foo|12|}' is not assignable to type '{|Bar|13|}'. +!!! annotated symbol 0 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:31:6 +!!! annotated symbol 1 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:31:6 +!!! annotated symbol 3 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:35:6 +!!! annotated symbol 5 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:39:6 +!!! annotated symbol 7 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:31:6 +!!! annotated symbol 9 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:31:6 +!!! annotated symbol 11 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 12 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 13 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 thingOfTypeAliases = y; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Y' is not assignable to type 'X | Y | Z'. -!!! error TS2322: Type 'Y' is not assignable to type 'Y'. -!!! error TS2322: Type 'Foo' is not assignable to type 'Baz'. +!!! error TS2322: Type '{|Y|0|}<{|Foo|1|}>' is not assignable to type '{|X|2|}<{|Bar|3|}> | {|Y|4|}<{|Baz|5|}> | {|Z|6|}<{|Kwah|7|}>'. +!!! error TS2322: Type '{|Y|8|}<{|Foo|9|}>' is not assignable to type '{|Y|10|}<{|Baz|11|}>'. +!!! error TS2322: Type '{|Foo|12|}' is not assignable to type '{|Baz|13|}'. +!!! annotated symbol 0 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:35:6 +!!! annotated symbol 1 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:31:6 +!!! annotated symbol 3 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:35:6 +!!! annotated symbol 5 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:39:6 +!!! annotated symbol 7 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:35:6 +!!! annotated symbol 9 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:35:6 +!!! annotated symbol 11 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 12 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 13 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 thingOfTypeAliases = z; ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'Z' is not assignable to type 'X | Y | Z'. -!!! error TS2322: Type 'Z' is not assignable to type 'Z'. -!!! error TS2322: Type 'Foo' is not assignable to type 'Kwah'. \ No newline at end of file +!!! error TS2322: Type '{|Z|0|}<{|Foo|1|}>' is not assignable to type '{|X|2|}<{|Bar|3|}> | {|Y|4|}<{|Baz|5|}> | {|Z|6|}<{|Kwah|7|}>'. +!!! error TS2322: Type '{|Z|8|}<{|Foo|9|}>' is not assignable to type '{|Z|10|}<{|Kwah|11|}>'. +!!! error TS2322: Type '{|Foo|12|}' is not assignable to type '{|Kwah|13|}'. +!!! annotated symbol 0 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:39:6 +!!! annotated symbol 1 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 2 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:31:6 +!!! annotated symbol 3 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:11 +!!! annotated symbol 4 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:35:6 +!!! annotated symbol 5 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:11 +!!! annotated symbol 6 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:39:6 +!!! annotated symbol 7 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 8 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:39:6 +!!! annotated symbol 9 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 10 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:39:6 +!!! annotated symbol 11 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 +!!! annotated symbol 12 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:1:11 +!!! annotated symbol 13 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:11 \ No newline at end of file diff --git a/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction2.errors.txt b/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction2.errors.txt index 1bd7a693966f9..7e9968ce9135d 100644 --- a/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction2.errors.txt +++ b/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction2.errors.txt @@ -33,19 +33,41 @@ tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts(20,1): error TS2 var p: Property; c = p; ~ -!!! error TS2322: Type 'Property' is not assignable to type 'Class'. +!!! error TS2322: Type '{|Property|0|}' is not assignable to type '{|Class|1|}'. !!! error TS2322: Types of property 'parent' are incompatible. -!!! error TS2322: Type 'Module | Class' is not assignable to type 'Namespace'. -!!! error TS2322: Property 'members' is missing in type 'Class' but required in type 'Namespace'. +!!! error TS2322: Type '{|Module|2|} | {|Class|3|}' is not assignable to type '{|Namespace|4|}'. +!!! error TS2322: Property 'members' is missing in type '{|Class|5|}' but required in type '{|Namespace|6|}'. !!! related TS2728 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:6:12: 'members' is declared here. +!!! annotated symbol 0 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:13:7 +!!! annotated symbol 1 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 2 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:1:7 +!!! annotated symbol 3 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 4 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:5:7 +!!! annotated symbol 5 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 6 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:5:7 p = c; ~ -!!! error TS2322: Type 'Class' is not assignable to type 'Property'. +!!! error TS2322: Type '{|Class|0|}' is not assignable to type '{|Property|1|}'. !!! error TS2322: Types of property 'parent' are incompatible. -!!! error TS2322: Type 'Namespace' is not assignable to type 'Module | Class'. -!!! error TS2322: Type 'Namespace' is not assignable to type 'Module'. +!!! error TS2322: Type '{|Namespace|2|}' is not assignable to type '{|Module|3|} | {|Class|4|}'. +!!! error TS2322: Type '{|Namespace|5|}' is not assignable to type '{|Module|6|}'. !!! error TS2322: Types of property 'members' are incompatible. -!!! error TS2322: Type '(Class | Property)[]' is not assignable to type 'Class[]'. -!!! error TS2322: Type 'Class | Property' is not assignable to type 'Class'. -!!! error TS2322: Type 'Property' is not assignable to type 'Class'. +!!! error TS2322: Type '({|Class|7|} | {|Property|8|})[]' is not assignable to type '{|Class|9|}[]'. +!!! error TS2322: Type '{|Class|10|} | {|Property|11|}' is not assignable to type '{|Class|12|}'. +!!! error TS2322: Type '{|Property|13|}' is not assignable to type '{|Class|14|}'. +!!! annotated symbol 0 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 1 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:13:7 +!!! annotated symbol 2 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:5:7 +!!! annotated symbol 3 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:1:7 +!!! annotated symbol 4 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 5 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:5:7 +!!! annotated symbol 6 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:1:7 +!!! annotated symbol 7 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 8 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:13:7 +!!! annotated symbol 9 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 10 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 11 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:13:7 +!!! annotated symbol 12 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 +!!! annotated symbol 13 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:13:7 +!!! annotated symbol 14 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction2.ts:9:7 \ No newline at end of file diff --git a/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction3.errors.txt b/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction3.errors.txt index 279119e679acf..d6ecb500d566e 100644 --- a/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction3.errors.txt +++ b/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction3.errors.txt @@ -9,6 +9,10 @@ tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts(5,5): error TS23 var b: T27; var s: string = b; ~ -!!! error TS2322: Type '{ prop: number; } | { prop: { prop: number; } | any; }' is not assignable to type 'string'. -!!! error TS2322: Type '{ prop: number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|prop|0|}: number; } | { {|prop|1|}: { {|prop|2|}: number; } | any; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ {|prop|3|}: number; }' is not assignable to type 'string'. +!!! annotated symbol 0 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts:1:12 +!!! annotated symbol 1 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts:1:31 +!!! annotated symbol 2 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts:1:12 +!!! annotated symbol 3 tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts:1:12 \ No newline at end of file diff --git a/tests/baselines/reference/unionTypesAssignability.errors.txt b/tests/baselines/reference/unionTypesAssignability.errors.txt index 5affcf89ea57c..87aaca9439a1b 100644 --- a/tests/baselines/reference/unionTypesAssignability.errors.txt +++ b/tests/baselines/reference/unionTypesAssignability.errors.txt @@ -52,21 +52,35 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTyp d = d; d = e; ~ -!!! error TS2741: Property 'foo1' is missing in type 'E' but required in type 'D'. +!!! error TS2741: Property 'foo1' is missing in type '{|E|0|}' but required in type '{|D|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:21: 'foo1' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 d = unionDE; // error e is not assignable to d ~ -!!! error TS2322: Type 'D | E' is not assignable to type 'D'. -!!! error TS2322: Type 'E' is not assignable to type 'D'. +!!! error TS2322: Type '{|D|0|} | {|E|1|}' is not assignable to type '{|D|2|}'. +!!! error TS2322: Type '{|E|3|}' is not assignable to type '{|D|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 e = d; ~ -!!! error TS2741: Property 'foo2' is missing in type 'D' but required in type 'E'. +!!! error TS2741: Property 'foo2' is missing in type '{|D|0|}' but required in type '{|E|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:21: 'foo2' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 e = e; e = unionDE; // error d is not assignable to e ~ -!!! error TS2322: Type 'D | E' is not assignable to type 'E'. -!!! error TS2322: Type 'D' is not assignable to type 'E'. +!!! error TS2322: Type '{|D|0|} | {|E|1|}' is not assignable to type '{|E|2|}'. +!!! error TS2322: Type '{|D|3|}' is not assignable to type '{|E|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 num = num; num = str; ~~~ @@ -87,24 +101,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTyp // A type T is assignable to a union type U if T is assignable to any type in U d = c; ~ -!!! error TS2741: Property 'foo1' is missing in type 'C' but required in type 'D'. +!!! error TS2741: Property 'foo1' is missing in type '{|C|0|}' but required in type '{|D|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:21: 'foo1' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 e = c; ~ -!!! error TS2741: Property 'foo2' is missing in type 'C' but required in type 'E'. +!!! error TS2741: Property 'foo2' is missing in type '{|C|0|}' but required in type '{|E|1|}'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:21: 'foo2' is declared here. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 unionDE = c; // error since C is not assinable to either D or E ~~~~~~~ -!!! error TS2322: Type 'C' is not assignable to type 'D | E'. -!!! error TS2322: Type 'C' is not assignable to type 'E'. +!!! error TS2322: Type '{|C|0|}' is not assignable to type '{|D|1|} | {|E|2|}'. +!!! error TS2322: Type '{|C|3|}' is not assignable to type '{|E|4|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:2:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:2:7 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 d = d; e = d; ~ -!!! error TS2322: Type 'D' is not assignable to type 'E'. +!!! error TS2322: Type '{|D|0|}' is not assignable to type '{|E|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 unionDE = d; // ok d = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'D'. +!!! error TS2322: Type '{|E|0|}' is not assignable to type '{|D|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:4:7 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:3:7 e = e; unionDE = e; // ok num = num; @@ -137,27 +164,61 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTyp function foo(t: T, u: U) { t = u; // error ~ -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{|T|1|}'. +!!! error TS2322: '{|U|2|}' is assignable to the constraint of type '{|T|3|}', but '{|T|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 u = t; // error ~ -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{|U|1|}'. +!!! error TS2322: '{|T|2|}' is assignable to the constraint of type '{|U|3|}', but '{|U|4|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 var x : T | U; x = t; // ok x = u; // ok x = undefined; t = x; // error U not assignable to T ~ -!!! error TS2322: Type 'T | U' is not assignable to type 'T'. -!!! error TS2322: 'T | U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|} | {|U|1|}' is not assignable to type '{|T|2|}'. +!!! error TS2322: '{|T|3|} | {|U|4|}' is assignable to the constraint of type '{|T|5|}', but '{|T|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|U|7|}' is not assignable to type '{|T|8|}'. +!!! error TS2322: '{|U|9|}' is assignable to the constraint of type '{|T|10|}', but '{|T|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 u = x; // error T not assignable to U ~ -!!! error TS2322: Type 'T | U' is not assignable to type 'U'. -!!! error TS2322: 'T | U' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|0|} | {|U|1|}' is not assignable to type '{|U|2|}'. +!!! error TS2322: '{|T|3|} | {|U|4|}' is assignable to the constraint of type '{|U|5|}', but '{|U|6|}' could be instantiated with a different subtype of constraint '{}'. +!!! error TS2322: Type '{|T|7|}' is not assignable to type '{|U|8|}'. +!!! error TS2322: '{|T|9|}' is assignable to the constraint of type '{|U|10|}', but '{|U|11|}' could be instantiated with a different subtype of constraint '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 2 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 3 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 4 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 5 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 6 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 7 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 8 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 9 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:14 +!!! annotated symbol 10 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 +!!! annotated symbol 11 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/unionTypesAssignability.ts:63:17 } \ No newline at end of file diff --git a/tests/baselines/reference/unknownType1.errors.txt b/tests/baselines/reference/unknownType1.errors.txt index 93e2a8660f65e..941f134d6c59b 100644 --- a/tests/baselines/reference/unknownType1.errors.txt +++ b/tests/baselines/reference/unknownType1.errors.txt @@ -187,8 +187,9 @@ tests/cases/conformance/types/unknown/unknownType1.ts(180,5): error TS2322: Type function f23(x: T) { let y: object = x; // Error ~ -!!! error TS2322: Type 'T' is not assignable to type 'object'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type 'object'. !!! error TS2322: Type 'unknown' is not assignable to type 'object'. +!!! annotated symbol 0 tests/cases/conformance/types/unknown/unknownType1.ts:119:14 } // Anything fresh but primitive assignable to { [x: string]: unknown } @@ -251,8 +252,9 @@ tests/cases/conformance/types/unknown/unknownType1.ts(180,5): error TS2322: Type let x: {} = t; let y: {} = u; ~ -!!! error TS2322: Type 'U' is not assignable to type '{}'. +!!! error TS2322: Type '{|U|0|}' is not assignable to type '{}'. !!! error TS2322: Type 'unknown' is not assignable to type '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/unknown/unknownType1.ts:168:17 } // Repro from #26796 @@ -264,7 +266,8 @@ tests/cases/conformance/types/unknown/unknownType1.ts(180,5): error TS2322: Type function oops(arg: T): {} { return arg; // Error ~~~~~~~~~~~ -!!! error TS2322: Type 'T' is not assignable to type '{}'. +!!! error TS2322: Type '{|T|0|}' is not assignable to type '{}'. !!! error TS2322: Type 'unknown' is not assignable to type '{}'. +!!! annotated symbol 0 tests/cases/conformance/types/unknown/unknownType1.ts:179:15 } \ No newline at end of file diff --git a/tests/baselines/reference/unknownType2.errors.txt b/tests/baselines/reference/unknownType2.errors.txt index 5f08804b9e048..c5e4070842c4d 100644 --- a/tests/baselines/reference/unknownType2.errors.txt +++ b/tests/baselines/reference/unknownType2.errors.txt @@ -220,8 +220,10 @@ tests/cases/conformance/types/unknown/unknownType2.ts(216,13): error TS2322: Typ case 'maybe': return x; // error ~~~~~~~~~ -!!! error TS2322: Type '"yes" | "no" | "maybe"' is not assignable to type 'SomeResponse'. -!!! error TS2322: Type '"maybe"' is not assignable to type 'SomeResponse'. +!!! error TS2322: Type '"yes" | "no" | "maybe"' is not assignable to type '{|SomeResponse|0|}'. +!!! error TS2322: Type '"maybe"' is not assignable to type '{|SomeResponse|1|}'. +!!! annotated symbol 0 tests/cases/conformance/types/unknown/unknownType2.ts:4:6 +!!! annotated symbol 1 tests/cases/conformance/types/unknown/unknownType2.ts:4:6 default: throw new Error('Can you repeat the question?'); } diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt index e7f5fc99136bd..767c088ef8146 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.errors.txt @@ -28,8 +28,10 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(41,4): error TS2 class C implements Function { ~ -!!! error TS2420: Class 'C' incorrectly implements interface 'Function'. +!!! error TS2420: Class '{|C|0|}' incorrectly implements interface '{|Function|1|}'. !!! error TS2420: Type 'C' is missing the following properties from type 'Function': apply, call, bind +!!! annotated symbol 0 tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts:10:7 +!!! annotated symbol 1 /.ts/lib.es5.d.ts:272:11 prototype = null; length = 1; arguments = null; diff --git a/tests/baselines/reference/vararg.errors.txt b/tests/baselines/reference/vararg.errors.txt index 2e64f957134f8..86931017f3ed6 100644 --- a/tests/baselines/reference/vararg.errors.txt +++ b/tests/baselines/reference/vararg.errors.txt @@ -46,7 +46,8 @@ tests/cases/compiler/vararg.ts(33,17): error TS2345: Argument of type 'C' is not var result=""; result+=x.f(x,3,3); // bad first param ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type 'string'. +!!! annotated symbol 0 tests/cases/compiler/vararg.ts:2:18 result+=x.f(3,"hello",3); // bad second param ~ !!! error TS2345: Argument of type '3' is not assignable to parameter of type 'string'. @@ -57,7 +58,8 @@ tests/cases/compiler/vararg.ts(33,17): error TS2345: Argument of type 'C' is not !!! error TS2345: Argument of type '3' is not assignable to parameter of type 'string'. result+=x.fonly(x); // bad param ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '{|C|0|}' is not assignable to parameter of type 'string'. +!!! annotated symbol 0 tests/cases/compiler/vararg.ts:2:18 result+=x.fonly("a"); // ok result+=x.fonly("a","b","c","d"); //ok diff --git a/tests/baselines/reference/weakType.errors.txt b/tests/baselines/reference/weakType.errors.txt index 4ea859a82dd09..dd1e2e8bd125a 100644 --- a/tests/baselines/reference/weakType.errors.txt +++ b/tests/baselines/reference/weakType.errors.txt @@ -92,9 +92,16 @@ tests/cases/compiler/weakType.ts(62,5): error TS2322: Type '{ properties: { wron } let weak: Weak & Spoiler = unknown ~~~~ -!!! error TS2322: Type '{ properties: { wrong: string; }; }' is not assignable to type 'Weak & Spoiler'. -!!! error TS2322: Type '{ properties: { wrong: string; }; }' is not assignable to type 'Weak'. +!!! error TS2322: Type '{ {|properties|0|}: { {|wrong|1|}: string; }; }' is not assignable to type '{|Weak|2|} & {|Spoiler|3|}'. +!!! error TS2322: Type '{ {|properties|4|}: { {|wrong|5|}: string; }; }' is not assignable to type '{|Weak|6|}'. !!! error TS2322: Types of property 'properties' are incompatible. !!! error TS2322: Type '{ wrong: string; }' has no properties in common with type '{ b?: number; }'. +!!! annotated symbol 0 tests/cases/compiler/weakType.ts:58:5 +!!! annotated symbol 1 tests/cases/compiler/weakType.ts:59:9 +!!! annotated symbol 2 tests/cases/compiler/weakType.ts:51:6 +!!! annotated symbol 3 tests/cases/compiler/weakType.ts:50:6 +!!! annotated symbol 4 tests/cases/compiler/weakType.ts:58:5 +!!! annotated symbol 5 tests/cases/compiler/weakType.ts:59:9 +!!! annotated symbol 6 tests/cases/compiler/weakType.ts:51:6 \ No newline at end of file diff --git a/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt b/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt index 47e8e6ff4f295..9127e92911785 100644 --- a/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt +++ b/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt @@ -16,4 +16,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursi var r = c.foo(''); var r2 = r({ length: 3, charAt: (x: number) => { '' } }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '{ length: number; charAt: (x: number) => void; }' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type '{ {|length|0|}: number; {|charAt|1|}: (x: number) => void; }' is not assignable to parameter of type 'string'. +!!! annotated symbol 0 tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints4.ts:13:14 +!!! annotated symbol 1 tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints4.ts:13:25 \ No newline at end of file diff --git a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt index ad3353f64cc67..7cdc43c96e35d 100644 --- a/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt +++ b/tests/baselines/reference/wrappedRecursiveGenericType.errors.txt @@ -17,7 +17,9 @@ tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2322: Type '5 x.a.val = 5; // val -> number x.a.b.val = 5; // val -> X (This should be an error) ~~~~~~~~~ -!!! error TS2322: Type '5' is not assignable to type 'X'. +!!! error TS2322: Type '5' is not assignable to type '{|X|0|}'. +!!! annotated symbol 0 tests/cases/compiler/wrappedRecursiveGenericType.ts:1:11 x.a.b.a.val = 5; // val -> X (This should be an error) ~~~~~~~~~~~ -!!! error TS2322: Type '5' is not assignable to type 'X'. \ No newline at end of file +!!! error TS2322: Type '5' is not assignable to type '{|X|0|}'. +!!! annotated symbol 0 tests/cases/compiler/wrappedRecursiveGenericType.ts:1:11 \ No newline at end of file diff --git a/tests/cases/compiler/deepReadonlyAssignabilityError.ts b/tests/cases/compiler/deepReadonlyAssignabilityError.ts new file mode 100644 index 0000000000000..9da406ddd87c8 --- /dev/null +++ b/tests/cases/compiler/deepReadonlyAssignabilityError.ts @@ -0,0 +1,18 @@ +type DeepReadonly = { + readonly [K in keyof T]: DeepReadonly; +} + +declare function f2(x: DeepReadonly): (x: T) => void; + +/** + * This produces a function whose argument type is a deeply recursive reverse mapped type + */ +const result = f2({ x: { y: { z: { a: { b: { c: 12 } } } } } }); + +result({ + x: { + y: { + + } + } +});