From f54d63477f580a9c1640302e1c78eec4712a6526 Mon Sep 17 00:00:00 2001 From: Panos Vekris Date: Wed, 24 Apr 2024 15:50:15 -0700 Subject: [PATCH] [flow] remove stale comment from flowlib Summary: The change is in core.js. Type-guards are enabled by default. Changelog: [internal] Reviewed By: gkz Differential Revision: D56506510 fbshipit-source-id: a6114936f7daeb4e2c018c838425037b3a7331d1 --- lib/core.js | 8 - tests/arraylib/arraylib.exp | 20 +-- tests/arrows/arrows.exp | 4 +- tests/async/async.exp | 36 ++--- tests/async_iteration/async_iteration.exp | 4 +- .../babel_loose_array_spread.exp | 12 +- tests/bigint/bigint.exp | 24 +-- tests/computed_props/computed_props.exp | 4 +- tests/contextual_typing/contextual_typing.exp | 24 +-- tests/core_tests/core_tests.exp | 148 +++++++++--------- tests/date/date.exp | 80 +++++----- tests/enums/enums.exp | 128 +++++++-------- tests/fetch/fetch.exp | 40 ++--- tests/forof/forof.exp | 8 +- tests/function/function.exp | 52 +++--- tests/generators/generators.exp | 20 +-- tests/generic_escape/generic_escape.exp | 4 +- tests/generic_zeroed/generic_zeroed.exp | 8 +- tests/get_def_enums/get_def_enums.exp | 4 +- tests/interface/interface.exp | 4 +- tests/iterable/iterable.exp | 44 +++--- tests/lib/lib.exp | 4 +- .../local_inference_annotations.exp | 8 +- .../lti_friendly_errors.exp | 8 +- .../lti_implicit_instantiation.exp | 16 +- .../mapped_type_utilities.exp | 4 +- tests/meta_property/meta_property.exp | 16 +- tests/new_env/new_env.exp | 10 +- tests/new_merge/new_merge.exp | 4 +- tests/object_api/object_api.exp | 24 +-- tests/overload/overload.exp | 28 ++-- .../predicates_declared.exp | 4 +- .../predicates_inferred.exp | 4 +- tests/promises/promises.exp | 40 ++--- tests/react_16_6/react_16_6.exp | 8 +- .../react_abstract_component.exp | 4 +- tests/refinements/refinements.exp | 4 +- tests/regexp/regexp.exp | 4 +- tests/resolved_env/resolved_env.exp | 8 +- tests/return/return.exp | 4 +- tests/template/template.exp | 16 +- tests/tuples/tuples.exp | 4 +- tests/type_guards/type_guards.exp | 16 +- tests/union_new/union_new.exp | 4 +- 44 files changed, 455 insertions(+), 463 deletions(-) diff --git a/lib/core.js b/lib/core.js index 815e778dd62..7eee354291d 100644 --- a/lib/core.js +++ b/lib/core.js @@ -737,10 +737,6 @@ declare class $ReadOnlyArray<+T> { * @param callbackfn A predicate function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. * @returns An array whose type is specified by the predicate function passed as callbackfn. - * - * NOTE: type-guards are not enabled by default. - * As such, this overload will not be used by default in source files. Support for type guards can be enabled - * everywhere with the use of the `type_guards=true` flag. */ filter(callbackfn: (this: This, value: T, index: number, array: $ReadOnlyArray) => value is S, thisArg: This): Array; /** @@ -992,10 +988,6 @@ declare class Array extends $ReadOnlyArray { * @param callbackfn A predicate function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. * @returns An array whose type is specified by the predicate function passed as callbackfn. - * - * NOTE: type-guards are not enabled by default. - * As such, this overload will not be used by default in source files. Support for type guards can be enabled - * everywhere with the use of the `type_guards=true` flag. */ filter(callbackfn: (this: This, value: T, index: number, array: $ReadOnlyArray) => value is S, thisArg: This): Array; /** diff --git a/tests/arraylib/arraylib.exp b/tests/arraylib/arraylib.exp index bfb9db7560d..68d212bd50f 100644 --- a/tests/arraylib/arraylib.exp +++ b/tests/arraylib/arraylib.exp @@ -107,8 +107,8 @@ References: array_lib.js:55:4 55| [''].reduce((acc, str) => acc * str.length); // error, string ~> number ^^ [1] - /core.js:1374:13 - 1374| length: number; + /core.js:1366:13 + 1366| length: number; ^^^^^^ [2] @@ -124,8 +124,8 @@ References: array_lib.js:56:4 56| [''].reduceRight((acc, str) => acc * str.length); // error, string ~> number ^^ [1] - /core.js:1374:13 - 1374| length: number; + /core.js:1366:13 + 1366| length: number; ^^^^^^ [2] @@ -139,8 +139,8 @@ Cannot cast `Array.from(...)` to array type because string [1] is incompatible w ^^^^^^^^^^^^^^^^^^ References: - /core.js:1147:37 - 1147| static from(str: string): Array; + /core.js:1139:37 + 1139| static from(str: string): Array; ^^^^^^ [1] array_lib.js:68:31 68| Array.from('abcd') as Array; // ERROR @@ -364,8 +364,8 @@ Cannot assign `arr3.flat(...)` to `result3_2` because mixed [1] is incompatible ^^^^^^^^^^^^ References: - /core.js:862:32 - 862| flat(depth: number): Array; + /core.js:858:32 + 858| flat(depth: number): Array; ^^^^^ [1] flat.js:20:24 20| const result3_2: Array = arr3.flat(2); // Error - don't support this @@ -382,8 +382,8 @@ Cannot assign `arr2.flat(...)` to `result2_6` because mixed [1] is incompatible ^^^^^^^^^^^^ References: - /core.js:862:32 - 862| flat(depth: number): Array; + /core.js:858:32 + 858| flat(depth: number): Array; ^^^^^ [1] flat.js:25:24 25| const result2_6: Array = arr2.flat(x); // Error - don't support this diff --git a/tests/arrows/arrows.exp b/tests/arrows/arrows.exp index e7ba9ac600b..73bf535f559 100644 --- a/tests/arrows/arrows.exp +++ b/tests/arrows/arrows.exp @@ -42,8 +42,8 @@ return value. [incompatible-call] ^^^^^^^^^^^^^^^^^^^^^^^^ [1] References: - /core.js:1100:38 - 1100| sort(compareFn?: (a: T, b: T) => number): Array; + /core.js:1092:38 + 1092| sort(compareFn?: (a: T, b: T) => number): Array; ^^^^^^ [2] diff --git a/tests/async/async.exp b/tests/async/async.exp index 1f11338fbf6..b18493255b9 100644 --- a/tests/async/async.exp +++ b/tests/async/async.exp @@ -10,8 +10,8 @@ References: async.js:9:30 9| async function f1(): Promise { ^^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -31,8 +31,8 @@ References: async.js:28:48 28| async function f4(p: Promise): Promise { ^^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -99,8 +99,8 @@ undefined in type argument `R` [2]. [incompatible-return] ^^^^^^ [1] References: - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [2] @@ -142,8 +142,8 @@ References: async_return_void.js:1:32 1| async function foo1(): Promise { ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -160,8 +160,8 @@ References: async_return_void.js:5:32 5| async function foo2(): Promise { ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -181,8 +181,8 @@ References: async_return_void.js:9:32 9| async function foo3(): Promise { ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -223,8 +223,8 @@ References: generator.js:22:31 22| yield* await Promise.all(["a"]); // error string ~> number ^^^ [2] - /core.js:1784:27 - 1784| interface AsyncGenerator<+Yield,+Return,-Next> { + /core.js:1776:27 + 1776| interface AsyncGenerator<+Yield,+Return,-Next> { ^^^^^ [3] @@ -243,8 +243,8 @@ References: generator.js:21:45 21| async function *genError1(): AsyncGenerator { ^^^^^^ [2] - /core.js:1784:27 - 1784| interface AsyncGenerator<+Yield,+Return,-Next> { + /core.js:1776:27 + 1776| interface AsyncGenerator<+Yield,+Return,-Next> { ^^^^^ [3] @@ -258,8 +258,8 @@ Cannot yield `1` because number [1], a primitive, cannot be used as a subtype of ^ [1] References: - /core.js:1797:7 - 1797| : $Iterable; + /core.js:1789:7 + 1789| : $Iterable; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] diff --git a/tests/async_iteration/async_iteration.exp b/tests/async_iteration/async_iteration.exp index 4a8fa0c93f9..7e73a170bc4 100644 --- a/tests/async_iteration/async_iteration.exp +++ b/tests/async_iteration/async_iteration.exp @@ -113,8 +113,8 @@ Cannot cast `result.value` to string because undefined [1] is incompatible with ^^^^^^^^^^^^ References: - /core.js:1742:14 - 1742| +value?: Return, + /core.js:1734:14 + 1734| +value?: Return, ^^^^^^ [1] return.js:20:20 20| (result.value: string); // error: number | void ~> string diff --git a/tests/babel_loose_array_spread/babel_loose_array_spread.exp b/tests/babel_loose_array_spread/babel_loose_array_spread.exp index bf49fa81a0a..7f8dae251e1 100644 --- a/tests/babel_loose_array_spread/babel_loose_array_spread.exp +++ b/tests/babel_loose_array_spread/babel_loose_array_spread.exp @@ -10,13 +10,13 @@ References: apply.js:3:11 3| const it: Iterable = [7,8,9]; ^^^^^^^^^^^^^^^^ [1] - /core.js:1155:22 + /core.js:1147:22 v---------- - 1155| type $ArrayLike = interface { - 1156| +[indexer: number]: T; - 1157| @@iterator(): Iterator; - 1158| length: number; - 1159| } + 1147| type $ArrayLike = interface { + 1148| +[indexer: number]: T; + 1149| @@iterator(): Iterator; + 1150| length: number; + 1151| } ^ [2] diff --git a/tests/bigint/bigint.exp b/tests/bigint/bigint.exp index 31f32926d0f..f35e3ecd271 100644 --- a/tests/bigint/bigint.exp +++ b/tests/bigint/bigint.exp @@ -30,23 +30,23 @@ Cannot call `BigInt` with `null` bound to `value` because: [incompatible-call] ^^^^ [1] References: - /core.js:2738:18 - 2738| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; + /core.js:2730:18 + 2730| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; ^^^^^^^ [2] - /core.js:2738:28 - 2738| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; + /core.js:2730:28 + 2730| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; ^^^^^^ [3] - /core.js:2738:37 - 2738| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; + /core.js:2730:37 + 2730| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; ^^^^^^ [4] - /core.js:2738:46 - 2738| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; + /core.js:2730:46 + 2730| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; ^^^^^^ [5] - /core.js:2738:55 - 2738| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; + /core.js:2730:55 + 2730| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; ^^^^^^^^^^^^ [6] - /core.js:2738:70 - 2738| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; + /core.js:2730:70 + 2730| static (value: boolean | string | number | bigint | interface {} | $ReadOnlyArray): bigint; ^^^^^^^^^^^^^^^^^^^^^ [7] diff --git a/tests/computed_props/computed_props.exp b/tests/computed_props/computed_props.exp index 30562dd7ed0..eee9a8ff7dc 100644 --- a/tests/computed_props/computed_props.exp +++ b/tests/computed_props/computed_props.exp @@ -198,8 +198,8 @@ Cannot assign `arr[0]()` to `y` because number [1] is incompatible with string [ ^^^^^^^^ References: - /core.js:1109:13 - 1109| length: number; + /core.js:1101:13 + 1101| length: number; ^^^^^^ [1] test7.js:5:10 5| const y: string = arr[0](); // error: number ~> string diff --git a/tests/contextual_typing/contextual_typing.exp b/tests/contextual_typing/contextual_typing.exp index cc1ca7d6d08..97c2b946dc1 100644 --- a/tests/contextual_typing/contextual_typing.exp +++ b/tests/contextual_typing/contextual_typing.exp @@ -22,8 +22,8 @@ expression to your expected type. [underconstrained-implicit-instantiation] ^^^ References: - /core.js:1895:19 - 1895| declare class Set extends $ReadOnlySet { + /core.js:1887:19 + 1887| declare class Set extends $ReadOnlySet { ^ [1] arr_rest.js:9:16 9| const [...y] = new Set() // still error @@ -322,8 +322,8 @@ Property `@@iterator` is missing in function [1] but exists in `$Iterable` [2]. ^^^^^^^^^^^ [1] References: - /core.js:1757:11 - 1757| interface $Iterable<+Yield,+Return,-Next> { + /core.js:1749:11 + 1749| interface $Iterable<+Yield,+Return,-Next> { ^^^^^^^^^ [2] @@ -461,8 +461,8 @@ References: implicit_instantiation.js:150:11 150| (a: Set); // error Set ~> Set ^^^^^ [2] - /core.js:1895:19 - 1895| declare class Set extends $ReadOnlySet { + /core.js:1887:19 + 1887| declare class Set extends $ReadOnlySet { ^ [3] @@ -481,8 +481,8 @@ References: implicit_instantiation.js:151:11 151| (b: Set); // error Set ~> Set ^^^^^ [2] - /core.js:1895:19 - 1895| declare class Set extends $ReadOnlySet { + /core.js:1887:19 + 1887| declare class Set extends $ReadOnlySet { ^ [3] @@ -736,8 +736,8 @@ References: lits.js:52:27 52| s2.values() as Iterator; // error number ~> string ^^^^^^ [2] - /core.js:1755:16 - 1755| type Iterator<+T> = $Iterator; + /core.js:1747:16 + 1747| type Iterator<+T> = $Iterator; ^ [3] @@ -1046,8 +1046,8 @@ defined. [method-unbinding] ^^^^^^ [1] References: - /core.js:989:5 - 989| filter(callbackfn: typeof Boolean): Array<$NonMaybeType>; + /core.js:985:5 + 985| filter(callbackfn: typeof Boolean): Array<$NonMaybeType>; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] diff --git a/tests/core_tests/core_tests.exp b/tests/core_tests/core_tests.exp index 6e8d314a4fb..b6fde59f6a5 100644 --- a/tests/core_tests/core_tests.exp +++ b/tests/core_tests/core_tests.exp @@ -7,33 +7,33 @@ Cannot use `new` on object type [1]. Only classes can be constructed. [invalid-c ^^^^ References: - /core.js:1711:19 + /core.js:1703:19 v- - 1711| declare var JSON: {| - 1712| /** - 1713| * Converts a JavaScript Object Notation (JSON) string into an object. - 1714| * @param text A valid JSON string. - 1715| * @param reviver A function that transforms the results. This function is called for each member of the object. - 1716| * If a member contains nested objects, the nested objects are transformed before the parent object is. - 1717| */ - 1718| +parse: (text: string, reviver?: (key: any, value: any) => any) => any, - 1719| /** - 1720| * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - 1721| * @param value A JavaScript value, usually an object or array, to be converted. - 1722| * @param replacer A function that transforms the results or an array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. - 1723| * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - 1724| */ - 1725| +stringify: (( - 1726| value: null | string | number | boolean | interface {} | $ReadOnlyArray, - 1727| replacer?: ?((key: string, value: any) => any) | Array, - 1728| space?: string | number - 1729| ) => string) & - 1730| ( - 1731| value: mixed, - 1732| replacer?: ?((key: string, value: any) => any) | Array, - 1733| space?: string | number - 1734| ) => string | void, - 1735| |}; + 1703| declare var JSON: {| + 1704| /** + 1705| * Converts a JavaScript Object Notation (JSON) string into an object. + 1706| * @param text A valid JSON string. + 1707| * @param reviver A function that transforms the results. This function is called for each member of the object. + 1708| * If a member contains nested objects, the nested objects are transformed before the parent object is. + 1709| */ + 1710| +parse: (text: string, reviver?: (key: any, value: any) => any) => any, + 1711| /** + 1712| * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. + 1713| * @param value A JavaScript value, usually an object or array, to be converted. + 1714| * @param replacer A function that transforms the results or an array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. + 1715| * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + 1716| */ + 1717| +stringify: (( + 1718| value: null | string | number | boolean | interface {} | $ReadOnlyArray, + 1719| replacer?: ?((key: string, value: any) => any) | Array, + 1720| space?: string | number + 1721| ) => string) & + 1722| ( + 1723| value: mixed, + 1724| replacer?: ?((key: string, value: any) => any) | Array, + 1725| space?: string | number + 1726| ) => string | void, + 1727| |}; -^ [1] @@ -54,8 +54,8 @@ Cannot cast `JSON.stringify(...)` to string because undefined [1] is incompatibl ^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1734:21 - 1734| ) => string | void, + /core.js:1726:21 + 1726| ) => string | void, ^^^^ [1] json_stringify.js:7:24 7| (JSON.stringify(bad1): string); @@ -75,11 +75,11 @@ References: map.js:21:22 21| let x = new Map(['foo', 123]); // error ^^^^^ [1] - /core.js:1823:38 - 1823| constructor(iterable?: ?Iterable<[K, V]>): void; + /core.js:1815:38 + 1815| constructor(iterable?: ?Iterable<[K, V]>): void; ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -96,11 +96,11 @@ References: map.js:21:29 21| let x = new Map(['foo', 123]); // error ^^^ [1] - /core.js:1823:38 - 1823| constructor(iterable?: ?Iterable<[K, V]>): void; + /core.js:1815:38 + 1815| constructor(iterable?: ?Iterable<[K, V]>): void; ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -120,8 +120,8 @@ References: map.js:22:16 22| let y: Map = new Map([['foo', 123]]); // error ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -141,8 +141,8 @@ References: map.js:22:24 22| let y: Map = new Map([['foo', 123]]); // error ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -155,8 +155,8 @@ Cannot cast `x.get(...)` to boolean because undefined [1] is incompatible with b ^^^^^^^^^^^^ References: - /core.js:1831:22 - 1831| get(key: K): V | void; + /core.js:1823:22 + 1823| get(key: K): V | void; ^^^^ [1] map.js:27:20 27| (x.get('foo'): boolean); // error, string | void @@ -204,8 +204,8 @@ since `z` is not a member of the set. [invalid-charset-type-arg] ^^^ [1] References: - /core.js:1161:21 - 1161| type RegExp$flags = $CharSet<"gimsuy">; + /core.js:1153:21 + 1153| type RegExp$flags = $CharSet<"gimsuy">; ^^^^^^^^^^^^^^^^^^ [2] @@ -219,8 +219,8 @@ since `z` is not a member of the set. [invalid-charset-type-arg] ^^^ [1] References: - /core.js:1161:21 - 1161| type RegExp$flags = $CharSet<"gimsuy">; + /core.js:1153:21 + 1153| type RegExp$flags = $CharSet<"gimsuy">; ^^^^^^^^^^^^^^^^^^ [2] @@ -236,11 +236,11 @@ Cannot call `WeakRef` because in type argument `T`: [incompatible-call] ^^^^ [1] References: - /core.js:1854:26 - 1854| declare class WeakRef> { + /core.js:1846:26 + 1846| declare class WeakRef> { ^^^^^^^^^^^^ [2] - /core.js:1854:41 - 1854| declare class WeakRef> { + /core.js:1846:41 + 1846| declare class WeakRef> { ^^^^^^^^^^^^^^^^^^^^^ [3] @@ -256,11 +256,11 @@ Cannot call `WeakRef` because in type argument `T`: [incompatible-call] ^^^ [1] References: - /core.js:1854:26 - 1854| declare class WeakRef> { + /core.js:1846:26 + 1846| declare class WeakRef> { ^^^^^^^^^^^^ [2] - /core.js:1854:41 - 1854| declare class WeakRef> { + /core.js:1846:41 + 1846| declare class WeakRef> { ^^^^^^^^^^^^^^^^^^^^^ [3] @@ -276,11 +276,11 @@ Cannot call `WeakRef` because in type argument `T`: [incompatible-call] ^^^^^^^^^^^^^^^ [1] References: - /core.js:1854:26 - 1854| declare class WeakRef> { + /core.js:1846:26 + 1846| declare class WeakRef> { ^^^^^^^^^^^^ [2] - /core.js:1854:41 - 1854| declare class WeakRef> { + /core.js:1846:41 + 1846| declare class WeakRef> { ^^^^^^^^^^^^^^^^^^^^^ [3] @@ -296,11 +296,11 @@ Cannot call `WeakSet` because in type argument `T`: [incompatible-call] ^ [1] References: - /core.js:1924:26 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:26 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^ [2] - /core.js:1924:41 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:41 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^^^^^^^^^^ [3] @@ -316,11 +316,11 @@ Cannot call `WeakSet` because in type argument `T`: [incompatible-call] ^ [1] References: - /core.js:1924:26 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:26 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^ [2] - /core.js:1924:41 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:41 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^^^^^^^^^^ [3] @@ -336,11 +336,11 @@ Cannot call `WeakSet` because in type argument `T`: [incompatible-call] ^ [1] References: - /core.js:1924:26 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:26 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^ [2] - /core.js:1924:41 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:41 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^^^^^^^^^^ [3] @@ -359,11 +359,11 @@ References: weakset.js:27:31 27| function* numbers(): Iterable { ^^^^^^ [1] - /core.js:1924:26 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:26 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^ [2] - /core.js:1924:41 - 1924| declare class WeakSet> extends $ReadOnlyWeakSet { + /core.js:1916:41 + 1916| declare class WeakSet> extends $ReadOnlyWeakSet { ^^^^^^^^^^^^^^^^^^^^^ [3] diff --git a/tests/date/date.exp b/tests/date/date.exp index fd60b87b0ea..981fea2f011 100644 --- a/tests/date/date.exp +++ b/tests/date/date.exp @@ -7,8 +7,8 @@ Cannot assign `d.getTime()` to `x` because number [1] is incompatible with strin ^^^^^^^^^^^ References: - /core.js:1471:16 - 1471| getTime(): number; + /core.js:1463:16 + 1463| getTime(): number; ^^^^^^ [1] date.js:2:7 2| var x:string = d.getTime(); // expect error @@ -46,11 +46,11 @@ References: date.js:18:10 18| new Date({}); ^^ [1] - /core.js:1453:23 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:23 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:33 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:33 + 1444| constructor(value: number | Date | string): void; ^^^^ [3] @@ -68,11 +68,11 @@ References: date.js:19:16 19| new Date(2015, '6'); ^^^ [1] - /core.js:1453:38 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:38 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -90,11 +90,11 @@ References: date.js:20:19 20| new Date(2015, 6, '18'); ^^^^ [1] - /core.js:1453:52 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:52 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -112,11 +112,11 @@ References: date.js:21:23 21| new Date(2015, 6, 18, '11'); ^^^^ [1] - /core.js:1453:67 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:67 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -134,11 +134,11 @@ References: date.js:22:27 22| new Date(2015, 6, 18, 11, '55'); ^^^^ [1] - /core.js:1453:84 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:84 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -156,11 +156,11 @@ References: date.js:23:31 23| new Date(2015, 6, 18, 11, 55, '42'); ^^^^ [1] - /core.js:1453:101 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:101 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -178,11 +178,11 @@ References: date.js:24:35 24| new Date(2015, 6, 18, 11, 55, 42, '999'); ^^^^^ [1] - /core.js:1453:123 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:123 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -198,14 +198,14 @@ Cannot call `Date` because: [incompatible-call] ^^^^ References: - /core.js:1451:5 - 1451| constructor(): void; + /core.js:1443:5 + 1443| constructor(): void; ^^^^^^^^^^^^^^^^^^^ [1] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] - /core.js:1453:5 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:5 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -223,11 +223,11 @@ References: date.js:26:10 26| new Date('2015', 6); ^^^^^^ [1] - /core.js:1453:23 - 1453| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; + /core.js:1445:23 + 1445| constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; ^^^^^^ [2] - /core.js:1452:5 - 1452| constructor(value: number | Date | string): void; + /core.js:1444:5 + 1444| constructor(value: number | Date | string): void; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] diff --git a/tests/enums/enums.exp b/tests/enums/enums.exp index 16d16f2bab2..a4a22e1d835 100644 --- a/tests/enums/enums.exp +++ b/tests/enums/enums.exp @@ -48,20 +48,20 @@ Cannot instantiate `EnumValue` because in type argument `TRepresentationType`: [ ^^^^^^^^ [1] References: - /core.js:2820:32 - 2820| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; + /core.js:2812:32 + 2812| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; ^^^^^^ [2] - /core.js:2820:41 - 2820| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; + /core.js:2812:41 + 2812| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; ^^^^^^ [3] - /core.js:2820:50 - 2820| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; + /core.js:2812:50 + 2812| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; ^^^^^^ [4] - /core.js:2820:59 - 2820| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; + /core.js:2812:59 + 2812| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; ^^^^^^^ [5] - /core.js:2820:69 - 2820| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; + /core.js:2812:69 + 2812| type EnumRepresentationTypes = string | number | symbol | boolean | bigint; ^^^^^^ [6] @@ -143,8 +143,8 @@ Cannot cast `x` to `EnumValue` because number [1] is incompatible with boolean [ ^ References: - /core.js:2834:16 - 2834| > = $EnumValue; + /core.js:2826:16 + 2826| > = $EnumValue; ^^^^^^^^^^^^^^^^^^^ [1] abstract-enum-value.js:35:18 35| x as EnumValue; // ERROR @@ -161,8 +161,8 @@ Cannot cast `x` to `EnumValue` because string [1] is incompatible with boolean [ ^ References: - /core.js:2834:16 - 2834| > = $EnumValue; + /core.js:2826:16 + 2826| > = $EnumValue; ^^^^^^^^^^^^^^^^^^^ [1] abstract-enum-value.js:35:18 35| x as EnumValue; // ERROR @@ -232,8 +232,8 @@ Cannot instantiate `Enum` because boolean [1] is incompatible with `EnumValue` [ ^^^^^^^ [1] References: - /core.js:2851:24 - 2851| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; + /core.js:2843:24 + 2843| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; ^^^^^^^^^^^ [2] @@ -270,11 +270,11 @@ References: abstract-enum.js:19:23 19| x as Enum>; // ERROR ^^^^^^^ [2] - /core.js:2833:4 - 2833| +TRepresentationType: EnumRepresentationTypes = EnumRepresentationTypes + /core.js:2825:4 + 2825| +TRepresentationType: EnumRepresentationTypes = EnumRepresentationTypes ^^^^^^^^^^^^^^^^^^^ [3] - /core.js:2851:12 - 2851| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; + /core.js:2843:12 + 2843| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; ^^^^^^^^^^ [4] @@ -294,8 +294,8 @@ References: abstract-enum.js:20:13 20| x as Enum; // ERROR ^ [2] - /core.js:2851:12 - 2851| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; + /core.js:2843:12 + 2843| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; ^^^^^^^^^^ [3] @@ -338,8 +338,8 @@ Cannot call `f` because boolean [1] is incompatible with `EnumValue` [2] in type ^^^^ [1] References: - /core.js:2851:24 - 2851| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; + /core.js:2843:24 + 2843| type Enum<+TEnumValue: EnumValue<> = EnumValue<>> = $Enum; ^^^^^^^^^^^ [2] @@ -1629,8 +1629,8 @@ implicitly-returned undefined in type argument `Return` [2]. [incompatible-retur ^^^^^^ [1] References: - /core.js:1762:29 - 1762| interface Generator<+Yield,+Return,-Next> { + /core.js:1754:29 + 1754| interface Generator<+Yield,+Return,-Next> { ^^^^^^ [2] @@ -1659,8 +1659,8 @@ undefined in type argument `R` [2]. [incompatible-return] ^^^^^^ [1] References: - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [2] @@ -1794,8 +1794,8 @@ References: exhaustive-check.js:3:6 3| enum E { ^ [2] - /core.js:2623:3 - 2623| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, + /core.js:2615:3 + 2615| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] @@ -2471,15 +2471,15 @@ Cannot get `E.nonExistent` because property `nonExistent` is missing in `$EnumPr ^^^^^^^^^^^ References: - /core.js:2620:59 + /core.js:2612:59 v- - 2620| type $EnumProto = {| - 2621| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, - 2622| getName(this: TEnum, input: TEnumValue): string, - 2623| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, - 2624| members(this: TEnum): Iterator, - 2625| __proto__: null, - 2626| |} + 2612| type $EnumProto = {| + 2613| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, + 2614| getName(this: TEnum, input: TEnumValue): string, + 2615| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, + 2616| members(this: TEnum): Iterator, + 2617| __proto__: null, + 2618| |} -^ [1] @@ -2492,15 +2492,15 @@ Cannot call `E.nonExistent` because property `nonExistent` is missing in `$EnumP ^^^^^^^^^^^ References: - /core.js:2620:59 + /core.js:2612:59 v- - 2620| type $EnumProto = {| - 2621| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, - 2622| getName(this: TEnum, input: TEnumValue): string, - 2623| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, - 2624| members(this: TEnum): Iterator, - 2625| __proto__: null, - 2626| |} + 2612| type $EnumProto = {| + 2613| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, + 2614| getName(this: TEnum, input: TEnumValue): string, + 2615| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, + 2616| members(this: TEnum): Iterator, + 2617| __proto__: null, + 2618| |} -^ [1] @@ -2527,15 +2527,15 @@ Cannot call `E.A` because property `A` is missing in `$EnumProto` [1]. [prop-mis ^ References: - /core.js:2620:59 + /core.js:2612:59 v- - 2620| type $EnumProto = {| - 2621| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, - 2622| getName(this: TEnum, input: TEnumValue): string, - 2623| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, - 2624| members(this: TEnum): Iterator, - 2625| __proto__: null, - 2626| |} + 2612| type $EnumProto = {| + 2613| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, + 2614| getName(this: TEnum, input: TEnumValue): string, + 2615| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, + 2616| members(this: TEnum): Iterator, + 2617| __proto__: null, + 2618| |} -^ [1] @@ -2548,15 +2548,15 @@ Cannot call `E.toString` because property `toString` is missing in `$EnumProto` ^^^^^^^^ References: - /core.js:2620:59 + /core.js:2612:59 v- - 2620| type $EnumProto = {| - 2621| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, - 2622| getName(this: TEnum, input: TEnumValue): string, - 2623| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, - 2624| members(this: TEnum): Iterator, - 2625| __proto__: null, - 2626| |} + 2612| type $EnumProto = {| + 2613| cast(this: TEnum, input: ?TRepresentationType): void | TEnumValue, + 2614| getName(this: TEnum, input: TEnumValue): string, + 2615| isValid(this: TEnum, input: ?TRepresentationType | TEnumValue): input is TEnumValue, + 2616| members(this: TEnum): Iterator, + 2617| __proto__: null, + 2618| |} -^ [1] @@ -2569,8 +2569,8 @@ Cannot cast `E.getName(...)` to boolean because string [1] is incompatible with ^^^^^^^^^^^^^^ References: - /core.js:2622:44 - 2622| getName(this: TEnum, input: TEnumValue): string, + /core.js:2614:44 + 2614| getName(this: TEnum, input: TEnumValue): string, ^^^^^^ [1] methods.js:50:19 50| E.getName(E.B) as boolean; // Error - wrong type diff --git a/tests/fetch/fetch.exp b/tests/fetch/fetch.exp index ddccbcd4037..f44b62fd5f3 100644 --- a/tests/fetch/fetch.exp +++ b/tests/fetch/fetch.exp @@ -14,8 +14,8 @@ References: fetch.js:12:18 12| const b: Promise = fetch(myRequest); // incorrect ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -35,8 +35,8 @@ References: /bom.js:1710:76 1710| declare function fetch(input: RequestInfo, init?: RequestOptions): Promise; ^^^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -564,8 +564,8 @@ References: request.js:24:15 24| h.text().then((t: Buffer) => t); // incorrect ^^^^^^^^^^^^^^^^ [3] - /core.js:1957:18 - 1957| onFulfill: null | void, + /core.js:1949:18 + 1949| onFulfill: null | void, ^^^^^^^^^^^ [4] @@ -589,8 +589,8 @@ References: request.js:26:22 26| h.arrayBuffer().then((ab: Buffer) => ab); // incorrect ^^^^^^^^^^^^^^^^^^ [3] - /core.js:1957:18 - 1957| onFulfill: null | void, + /core.js:1949:18 + 1949| onFulfill: null | void, ^^^^^^^^^^^ [4] @@ -721,17 +721,17 @@ References: /bom.js:1614:62 1614| type BodyInit = string | URLSearchParams | FormData | Blob | ArrayBuffer | $ArrayBufferView | ReadableStream; ^^^^^^^^^^^ [5] - /core.js:2065:20 - 2065| type $TypedArray = $TypedArrayNumber | BigInt64Array | BigUint64Array; + /core.js:2057:20 + 2057| type $TypedArray = $TypedArrayNumber | BigInt64Array | BigUint64Array; ^^^^^^^^^^^^^^^^^ [6] - /core.js:2065:40 - 2065| type $TypedArray = $TypedArrayNumber | BigInt64Array | BigUint64Array; + /core.js:2057:40 + 2057| type $TypedArray = $TypedArrayNumber | BigInt64Array | BigUint64Array; ^^^^^^^^^^^^^ [7] - /core.js:2065:56 - 2065| type $TypedArray = $TypedArrayNumber | BigInt64Array | BigUint64Array; + /core.js:2057:56 + 2057| type $TypedArray = $TypedArrayNumber | BigInt64Array | BigUint64Array; ^^^^^^^^^^^^^^ [8] - /core.js:2061:39 - 2061| type $ArrayBufferView = $TypedArray | DataView; + /core.js:2053:39 + 2053| type $ArrayBufferView = $TypedArray | DataView; ^^^^^^^^ [9] /bom.js:1614:95 1614| type BodyInit = string | URLSearchParams | FormData | Blob | ArrayBuffer | $ArrayBufferView | ReadableStream; @@ -758,8 +758,8 @@ References: response.js:42:15 42| h.text().then((t: Buffer) => t); // incorrect ^^^^^^^^^^^^^^^^ [3] - /core.js:1957:18 - 1957| onFulfill: null | void, + /core.js:1949:18 + 1949| onFulfill: null | void, ^^^^^^^^^^^ [4] @@ -783,8 +783,8 @@ References: response.js:44:22 44| h.arrayBuffer().then((ab: Buffer) => ab); // incorrect ^^^^^^^^^^^^^^^^^^ [3] - /core.js:1957:18 - 1957| onFulfill: null | void, + /core.js:1949:18 + 1949| onFulfill: null | void, ^^^^^^^^^^^ [4] diff --git a/tests/forof/forof.exp b/tests/forof/forof.exp index 5cbf631b3a2..6f14f059ce8 100644 --- a/tests/forof/forof.exp +++ b/tests/forof/forof.exp @@ -45,8 +45,8 @@ References: forof.js:23:26 23| function testString(str: string): void { ^^^^^^ [1] - /core.js:1757:11 - 1757| interface $Iterable<+Yield,+Return,-Next> { + /core.js:1749:11 + 1749| interface $Iterable<+Yield,+Return,-Next> { ^^^^^^^^^ [2] @@ -59,8 +59,8 @@ Cannot cast `elem` to number because tuple type [1] is incompatible with number ^^^^ References: - /core.js:1822:28 - 1822| @@iterator(): Iterator<[K, V]>; + /core.js:1814:28 + 1814| @@iterator(): Iterator<[K, V]>; ^^^^^^ [1] forof.js:32:13 32| elem as number; // Error - tuple ~> number diff --git a/tests/function/function.exp b/tests/function/function.exp index 8aa05693156..4dc02a4c7fd 100644 --- a/tests/function/function.exp +++ b/tests/function/function.exp @@ -24,13 +24,13 @@ it into an object and attempt to use it as a subtype of an interface. [incompati ^^^^^ [1] References: - /core.js:1155:22 + /core.js:1147:22 v---------- - 1155| type $ArrayLike = interface { - 1156| +[indexer: number]: T; - 1157| @@iterator(): Iterator; - 1158| length: number; - 1159| } + 1147| type $ArrayLike = interface { + 1148| +[indexer: number]: T; + 1149| @@iterator(): Iterator; + 1150| length: number; + 1151| } ^ [2] @@ -93,16 +93,16 @@ Property `length` is missing in `Generator` [1] but exists in `$ArrayLike` [2]. ^^^^^ References: - /core.js:1762:11 - 1762| interface Generator<+Yield,+Return,-Next> { + /core.js:1754:11 + 1754| interface Generator<+Yield,+Return,-Next> { ^^^^^^^^^ [1] - /core.js:1155:22 + /core.js:1147:22 v---------- - 1155| type $ArrayLike = interface { - 1156| +[indexer: number]: T; - 1157| @@iterator(): Iterator; - 1158| length: number; - 1159| } + 1147| type $ArrayLike = interface { + 1148| +[indexer: number]: T; + 1149| @@iterator(): Iterator; + 1150| length: number; + 1151| } ^ [2] @@ -118,13 +118,13 @@ References: apply-array-like.js:16:17 16| function * gen() { ^ [1] - /core.js:1155:22 + /core.js:1147:22 v---------- - 1155| type $ArrayLike = interface { - 1156| +[indexer: number]: T; - 1157| @@iterator(): Iterator; - 1158| length: number; - 1159| } + 1147| type $ArrayLike = interface { + 1148| +[indexer: number]: T; + 1149| @@iterator(): Iterator; + 1150| length: number; + 1151| } ^ [2] @@ -210,13 +210,13 @@ it into an object and attempt to use it as a subtype of an interface. [incompati ^^^^^^^^^^^ [1] References: - /core.js:1155:22 + /core.js:1147:22 v---------- - 1155| type $ArrayLike = interface { - 1156| +[indexer: number]: T; - 1157| @@iterator(): Iterator; - 1158| length: number; - 1159| } + 1147| type $ArrayLike = interface { + 1148| +[indexer: number]: T; + 1149| @@iterator(): Iterator; + 1150| length: number; + 1151| } ^ [2] diff --git a/tests/generators/generators.exp b/tests/generators/generators.exp index f2b84f1e1fd..eeada8ce1e4 100644 --- a/tests/generators/generators.exp +++ b/tests/generators/generators.exp @@ -42,8 +42,8 @@ References: class.js:23:39 23| *stmt_return_err(): Generator { ^^^^^^ [2] - /core.js:1762:29 - 1762| interface Generator<+Yield,+Return,-Next> { + /core.js:1754:29 + 1754| interface Generator<+Yield,+Return,-Next> { ^^^^^^ [3] @@ -125,14 +125,14 @@ of property `@@iterator`. [incompatible-type-arg] ^^ References: - /core.js:1755:38 - 1755| type Iterator<+T> = $Iterator; + /core.js:1747:38 + 1747| type Iterator<+T> = $Iterator; ^^^^ [1] class.js:71:71 71| *delegate_next_iterable(xs: Array): Generator { ^^^^^^ [2] - /core.js:1751:37 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:37 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^ [3] @@ -374,8 +374,8 @@ References: generators.js:22:46 22| function *stmt_return_err(): Generator { ^^^^^^ [2] - /core.js:1762:29 - 1762| interface Generator<+Yield,+Return,-Next> { + /core.js:1754:29 + 1754| interface Generator<+Yield,+Return,-Next> { ^^^^^^ [3] @@ -679,8 +679,8 @@ Cannot cast `refuse_return_result.value` to string because undefined [1] is inco ^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1742:14 - 1742| +value?: Return, + /core.js:1734:14 + 1734| +value?: Return, ^^^^^^ [1] return.js:20:32 20| (refuse_return_result.value: string); // error: number | void ~> string diff --git a/tests/generic_escape/generic_escape.exp b/tests/generic_escape/generic_escape.exp index 7e10556746f..76181410fea 100644 --- a/tests/generic_escape/generic_escape.exp +++ b/tests/generic_escape/generic_escape.exp @@ -431,8 +431,8 @@ the expression to your expected type. [underconstrained-implicit-instantiation] ^^^^^ References: - /core.js:950:21 - 950| declare class Array extends $ReadOnlyArray { + /core.js:946:21 + 946| declare class Array extends $ReadOnlyArray { ^ [1] misc.js:3:9 3| var e = new Array(10); diff --git a/tests/generic_zeroed/generic_zeroed.exp b/tests/generic_zeroed/generic_zeroed.exp index b6c74b5ac22..50c1140b83e 100644 --- a/tests/generic_zeroed/generic_zeroed.exp +++ b/tests/generic_zeroed/generic_zeroed.exp @@ -77,11 +77,11 @@ References: reduce.js:7:22 7| return nums.reduce( ^ [2] - /core.js:1063:5 + /core.js:1055:5 v------ - 1063| reduce( - 1064| callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: Array) => T, - 1065| ): T; + 1055| reduce( + 1056| callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: Array) => T, + 1057| ): T; ---^ [3] diff --git a/tests/get_def_enums/get_def_enums.exp b/tests/get_def_enums/get_def_enums.exp index 65629387b56..5effa78cbb6 100644 --- a/tests/get_def_enums/get_def_enums.exp +++ b/tests/get_def_enums/get_def_enums.exp @@ -28,9 +28,9 @@ library.js:4:3,4:5 main.js:27:13 Flags: -[LIB] core.js:2621:3,2621:6 +[LIB] core.js:2613:3,2613:6 main.js:30:13 Flags: -[LIB] core.js:2623:3,2623:9 +[LIB] core.js:2615:3,2615:9 diff --git a/tests/interface/interface.exp b/tests/interface/interface.exp index 38bbe7c4181..0f5cfc99080 100644 --- a/tests/interface/interface.exp +++ b/tests/interface/interface.exp @@ -855,8 +855,8 @@ References: string.js:1:18 1| declare const s: string; ^^^^^^ [1] - /core.js:1757:11 - 1757| interface $Iterable<+Yield,+Return,-Next> { + /core.js:1749:11 + 1749| interface $Iterable<+Yield,+Return,-Next> { ^^^^^^^^^ [2] diff --git a/tests/iterable/iterable.exp b/tests/iterable/iterable.exp index 963ef7beb17..785865b3339 100644 --- a/tests/iterable/iterable.exp +++ b/tests/iterable/iterable.exp @@ -14,8 +14,8 @@ References: array.js:7:20 7| ['hi'] as Iterable; // Error string ~> number ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -35,8 +35,8 @@ References: array.js:8:23 8| ['hi', 1] as Iterable; // Error number ~> string ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -56,8 +56,8 @@ References: caching_bug.js:21:62 21| function miss_the_cache(x: Array): Iterable { return x; } ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -86,13 +86,13 @@ Cannot return object literal because property `value` is missing in object liter ^^^^^^^^ [1] References: - /core.js:1745:5 + /core.js:1737:5 v - 1745| | { - 1746| done: false, - 1747| +value: Yield, - 1748| ... - 1749| }; + 1737| | { + 1738| done: false, + 1739| +value: Yield, + 1740| ... + 1741| }; ^ [2] @@ -106,14 +106,14 @@ value of property `@@iterator`. [incompatible-return] ^^^ References: - /core.js:1822:28 - 1822| @@iterator(): Iterator<[K, V]>; + /core.js:1814:28 + 1814| @@iterator(): Iterator<[K, V]>; ^^^^^^ [1] map.js:13:55 13| function mapTest4(map: Map): Iterable { ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -133,8 +133,8 @@ References: set.js:13:47 13| function setTest4(set: Set): Iterable { ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] @@ -148,14 +148,14 @@ Cannot cast `new String(...)` to `Iterable` because string [1] is incompatible w ^^^^^^^^^^^^^^^^ References: - /core.js:1177:28 - 1177| @@iterator(): Iterator; + /core.js:1169:28 + 1169| @@iterator(): Iterator; ^^^^^^ [1] string.js:3:29 3| (new String("hi"): Iterable); // Error - string is a Iterable ^^^^^^ [2] - /core.js:1751:22 - 1751| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { + /core.js:1743:22 + 1743| interface $Iterator<+Yield,+Return,-Next> extends $Iterable { ^^^^^ [3] diff --git a/tests/lib/lib.exp b/tests/lib/lib.exp index 1010511bfe3..375da1f5d68 100644 --- a/tests/lib/lib.exp +++ b/tests/lib/lib.exp @@ -41,8 +41,8 @@ Cannot assign `(new TypeError()).name` to `z` because string [1] is incompatible ^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1657:11 - 1657| name: string; + /core.js:1649:11 + 1649| name: string; ^^^^^^ [1] libtest.js:3:7 3| var z:number = new TypeError().name; diff --git a/tests/local_inference_annotations/local_inference_annotations.exp b/tests/local_inference_annotations/local_inference_annotations.exp index d6b8e1bd57d..6961209d80b 100644 --- a/tests/local_inference_annotations/local_inference_annotations.exp +++ b/tests/local_inference_annotations/local_inference_annotations.exp @@ -63,8 +63,8 @@ Property `@@iterator` is missing in function [1] but exists in `$Iterable` [2]. ^^^^^^^^ [1] References: - /core.js:1757:11 - 1757| interface $Iterable<+Yield,+Return,-Next> { + /core.js:1749:11 + 1749| interface $Iterable<+Yield,+Return,-Next> { ^^^^^^^^^ [2] @@ -528,8 +528,8 @@ Property `@@iterator` is missing in function [1] but exists in `$Iterable` [2]. ^^^^^^^^ [1] References: - /core.js:1757:11 - 1757| interface $Iterable<+Yield,+Return,-Next> { + /core.js:1749:11 + 1749| interface $Iterable<+Yield,+Return,-Next> { ^^^^^^^^^ [2] diff --git a/tests/lti_friendly_errors/lti_friendly_errors.exp b/tests/lti_friendly_errors/lti_friendly_errors.exp index ca7a3e303c8..766b80cec54 100644 --- a/tests/lti_friendly_errors/lti_friendly_errors.exp +++ b/tests/lti_friendly_errors/lti_friendly_errors.exp @@ -8,14 +8,14 @@ in type argument `R` [3]. [incompatible-cast] ^ References: - /core.js:1937:28 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:28 + 1929| declare class Promise<+R = mixed> { ^^^^^ [1] reason_of_inferred_targs.js:2:13 2| (p: Promise); // error ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] diff --git a/tests/lti_implicit_instantiation/lti_implicit_instantiation.exp b/tests/lti_implicit_instantiation/lti_implicit_instantiation.exp index 93156f3970f..691aa4eac9b 100644 --- a/tests/lti_implicit_instantiation/lti_implicit_instantiation.exp +++ b/tests/lti_implicit_instantiation/lti_implicit_instantiation.exp @@ -8,8 +8,8 @@ expression to your expected type. [underconstrained-implicit-instantiation] ^^^^^^^^^^^ [2] References: - /core.js:2046:25 - 2046| declare function $await(p: Promise | T): T; + /core.js:2038:25 + 2038| declare function $await(p: Promise | T): T; ^ [1] @@ -301,8 +301,8 @@ the expression to your expected type. [underconstrained-implicit-instantiation] ^^^^^ References: - /core.js:950:21 - 950| declare class Array extends $ReadOnlyArray { + /core.js:946:21 + 946| declare class Array extends $ReadOnlyArray { ^ [1] underconstrained_class_constructor.js:18:1 18| new Array(1); // Error @@ -820,8 +820,8 @@ Cannot get `r1.bad` because property `bad` is missing in `Array` [1]. [prop-miss ^^^ References: - /core.js:950:15 - 950| declare class Array extends $ReadOnlyArray { + /core.js:946:15 + 946| declare class Array extends $ReadOnlyArray { ^^^^^ [1] @@ -868,8 +868,8 @@ Cannot get `r2.bad` because property `bad` is missing in `Array` [1]. [prop-miss ^^^ References: - /core.js:950:15 - 950| declare class Array extends $ReadOnlyArray { + /core.js:946:15 + 946| declare class Array extends $ReadOnlyArray { ^^^^^ [1] diff --git a/tests/mapped_type_utilities/mapped_type_utilities.exp b/tests/mapped_type_utilities/mapped_type_utilities.exp index 34cf34b6af2..914bc1dbb7e 100644 --- a/tests/mapped_type_utilities/mapped_type_utilities.exp +++ b/tests/mapped_type_utilities/mapped_type_utilities.exp @@ -85,8 +85,8 @@ Cannot cast `pickedO1.bar` to string because undefined [1] is incompatible with ^^^^^^^^^^^^ References: - /core.js:2796:62 - 2796| type Pick> = {[key in Keys]: O[key]}; + /core.js:2788:62 + 2788| type Pick> = {[key in Keys]: O[key]}; ^^^^^^ [1] pick.js:9:16 9| (pickedO1.bar: string); // ERROR bar is optional diff --git a/tests/meta_property/meta_property.exp b/tests/meta_property/meta_property.exp index eeeafd64283..afe6c9d4202 100644 --- a/tests/meta_property/meta_property.exp +++ b/tests/meta_property/meta_property.exp @@ -8,13 +8,13 @@ Cannot cast `import.meta` to number literal `1` because `Import$Meta` [1] is inc ^^^^^^^^^^^ References: - /core.js:2731:20 + /core.js:2723:20 v - 2731| type Import$Meta = { - 2732| [string]: mixed, - 2733| url?: string, - 2734| ... - 2735| }; + 2723| type Import$Meta = { + 2724| [string]: mixed, + 2725| url?: string, + 2726| ... + 2727| }; ^ [1] import_meta.js:5:15 5| (import.meta: 1); // Error @@ -31,8 +31,8 @@ Cannot cast `import.meta.XXX` to number literal `1` because mixed [1] is incompa ^^^^^^^^^^^^^^^ References: - /core.js:2732:13 - 2732| [string]: mixed, + /core.js:2724:13 + 2724| [string]: mixed, ^^^^^ [1] import_meta.js:6:19 6| (import.meta.XXX: 1); // Error diff --git a/tests/new_env/new_env.exp b/tests/new_env/new_env.exp index 9c0b2b9f0de..d18e09dad3b 100644 --- a/tests/new_env/new_env.exp +++ b/tests/new_env/new_env.exp @@ -205,12 +205,12 @@ Cannot call `Promise` because function [1] requires another argument. [incompati ^^^^^^^ References: - /core.js:1938:5 + /core.js:1930:5 v---------------------- - 1938| constructor(callback: ( - 1939| resolve: (result: Promise | R) => void, - 1940| reject: (error: any) => void - 1941| ) => mixed): void; + 1930| constructor(callback: ( + 1931| resolve: (result: Promise | R) => void, + 1932| reject: (error: any) => void + 1933| ) => mixed): void; ----------------^ [1] diff --git a/tests/new_merge/new_merge.exp b/tests/new_merge/new_merge.exp index eb8d806c571..4633e34d30b 100644 --- a/tests/new_merge/new_merge.exp +++ b/tests/new_merge/new_merge.exp @@ -282,8 +282,8 @@ Cannot cast `f15()` to empty because `Promise` [1] is incompatible with empty [2 ^^^^^ References: - /core.js:1937:15 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:15 + 1929| declare class Promise<+R = mixed> { ^^^^^^^ [1] main.js:58:10 58| f15() as empty; diff --git a/tests/object_api/object_api.exp b/tests/object_api/object_api.exp index dd63476d4dd..03a32073f7c 100644 --- a/tests/object_api/object_api.exp +++ b/tests/object_api/object_api.exp @@ -979,8 +979,8 @@ Cannot assign `x.valueOf` to `xValueOf` because function type [1] is incompatibl ^^^^^^^^^ References: - /core.js:1612:5 - 1612| valueOf(): number; + /core.js:1604:5 + 1604| valueOf(): number; ^^^^^^^^^^^^^^^^^ [1] object_prototype.js:122:16 122| var xValueOf : number = x.valueOf; // error @@ -997,8 +997,8 @@ Cannot get `x.valueOf` because property `valueOf` [1] cannot be unbound from the ^^^^^^^ [1] References: - /core.js:1612:5 - 1612| valueOf(): number; + /core.js:1604:5 + 1604| valueOf(): number; ^^^^^^^^^^^^^^^^^ [2] @@ -1074,8 +1074,8 @@ Cannot assign `x.toLocaleString` to `xToLocaleString` because function type [1] ^^^^^^^^^^^^^^^^ References: - /core.js:1600:5 - 1600| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; + /core.js:1592:5 + 1592| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] object_prototype.js:150:23 150| var xToLocaleString : number = x.toLocaleString; // error @@ -1092,8 +1092,8 @@ defined. [method-unbinding] ^^^^^^^^^^^^^^ [1] References: - /core.js:1600:5 - 1600| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; + /core.js:1592:5 + 1592| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] @@ -1107,8 +1107,8 @@ value. [incompatible-type] ^^^^^^^^^^^^^^^^ References: - /core.js:1600:93 - 1600| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; + /core.js:1592:93 + 1592| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; ^^^^^^ [1] object_prototype.js:151:30 151| var xToLocaleString2 : () => number = x.toLocaleString; // error @@ -1125,8 +1125,8 @@ defined. [method-unbinding] ^^^^^^^^^^^^^^ [1] References: - /core.js:1600:5 - 1600| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; + /core.js:1592:5 + 1592| toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] diff --git a/tests/overload/overload.exp b/tests/overload/overload.exp index f00bf90fff0..ba88e3bc0a1 100644 --- a/tests/overload/overload.exp +++ b/tests/overload/overload.exp @@ -29,8 +29,8 @@ Cannot assign `"".match(...)[0]` to `x1` because string [1] is incompatible with ^^^^^^^^^^^^^^ References: - /core.js:1162:33 - 1162| type RegExp$matchResult = Array & { + /core.js:1154:33 + 1154| type RegExp$matchResult = Array & { ^^^^^^ [1] overload.js:7:9 7| var x1: number = "".match(0)[0]; @@ -46,8 +46,8 @@ Cannot get `"".match(...)[0]` because null [1] does not have properties. [incomp ^ References: - /core.js:1258:58 - 1258| match(regexp: string | RegExp): RegExp$matchResult | null; + /core.js:1250:58 + 1250| match(regexp: string | RegExp): RegExp$matchResult | null; ^^^^ [1] @@ -62,11 +62,11 @@ Cannot call `"".match` with `0` bound to `regexp` because: [incompatible-call] ^ [1] References: - /core.js:1258:19 - 1258| match(regexp: string | RegExp): RegExp$matchResult | null; + /core.js:1250:19 + 1250| match(regexp: string | RegExp): RegExp$matchResult | null; ^^^^^^ [2] - /core.js:1258:28 - 1258| match(regexp: string | RegExp): RegExp$matchResult | null; + /core.js:1250:28 + 1250| match(regexp: string | RegExp): RegExp$matchResult | null; ^^^^^^ [3] @@ -79,8 +79,8 @@ Cannot assign `"".match(...)[0]` to `x2` because string [1] is incompatible with ^^^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1162:33 - 1162| type RegExp$matchResult = Array & { + /core.js:1154:33 + 1154| type RegExp$matchResult = Array & { ^^^^^^ [1] overload.js:8:9 8| var x2: number = "".match(/pattern/)[0]; @@ -96,8 +96,8 @@ Cannot get `"".match(...)[0]` because null [1] does not have properties. [incomp ^ References: - /core.js:1258:58 - 1258| match(regexp: string | RegExp): RegExp$matchResult | null; + /core.js:1250:58 + 1250| match(regexp: string | RegExp): RegExp$matchResult | null; ^^^^ [1] @@ -110,8 +110,8 @@ Cannot assign `"".split(...)[0]` to `x4` because string [1] is incompatible with ^^^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1331:63 - 1331| split(separator?: string | RegExp, limit?: number): Array; + /core.js:1323:63 + 1323| split(separator?: string | RegExp, limit?: number): Array; ^^^^^^ [1] overload.js:10:9 10| var x4: number = "".split(/pattern/)[0]; diff --git a/tests/predicates_declared/predicates_declared.exp b/tests/predicates_declared/predicates_declared.exp index 4a419815eb2..c1f91be0525 100644 --- a/tests/predicates_declared/predicates_declared.exp +++ b/tests/predicates_declared/predicates_declared.exp @@ -95,8 +95,8 @@ Cannot return `Array.isArray(...)` because boolean [1] is incompatible with stri ^^^^^^^^^^^^^^^^ References: - /core.js:1111:33 - 1111| static isArray(obj: mixed): boolean; + /core.js:1103:33 + 1103| static isArray(obj: mixed): boolean; ^^^^^^^ [1] sanity-return-type.js:1:32 1| declare function f2(x: mixed): string %checks(Array.isArray(x)); diff --git a/tests/predicates_inferred/predicates_inferred.exp b/tests/predicates_inferred/predicates_inferred.exp index 12f394588a0..9964605d858 100644 --- a/tests/predicates_inferred/predicates_inferred.exp +++ b/tests/predicates_inferred/predicates_inferred.exp @@ -56,8 +56,8 @@ Cannot access object with computed property using string [1]. [invalid-computed- ^^^ References: - /core.js:1331:63 - 1331| split(separator?: string | RegExp, limit?: number): Array; + /core.js:1323:63 + 1323| split(separator?: string | RegExp, limit?: number): Array; ^^^^^^ [1] diff --git a/tests/promises/promises.exp b/tests/promises/promises.exp index a48e2e2e75a..90c2e40a3c0 100644 --- a/tests/promises/promises.exp +++ b/tests/promises/promises.exp @@ -109,8 +109,8 @@ Cannot call `Promise.all` because function [1] requires another argument. [incom ^^^ References: - /core.js:2012:5 - 2012| static all>(promises: T): Promise<$TupleMap>; + /core.js:2004:5 + 2004| static all>(promises: T): Promise<$TupleMap>; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] @@ -138,8 +138,8 @@ Cannot call `Promise.allSettled` because function [1] requires another argument. ^^^^^^^^^^ References: - /core.js:2019:5 - 2019| static allSettled>(promises: T): Promise<$TupleMap(p: Promise | T) => $SettledPromiseResult>>; + /core.js:2011:5 + 2011| static allSettled>(promises: T): Promise<$TupleMap(p: Promise | T) => $SettledPromiseResult>>; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] @@ -168,8 +168,8 @@ Cannot cast `first.status` to empty because string literal `rejected` [1] is inc ^^^^^^^^^^^^ References: - /core.js:2041:12 - 2041| +status: 'rejected', + /core.js:2033:12 + 2033| +status: 'rejected', ^^^^^^^^^^ [1] allSettled.js:34:22 34| (first.status: empty) // Error: 'rejected' case was not covered @@ -200,8 +200,8 @@ expected type. [underconstrained-implicit-instantiation] ^^^^^ References: - /core.js:2046:25 - 2046| declare function $await(p: Promise | T): T; + /core.js:2038:25 + 2038| declare function $await(p: Promise | T): T; ^ [1] allSettled.js:44:5 44| return (second.status: empty); // Spurious underconstrained-implicit-instantiation error in LTI due to lack of empty propagation @@ -217,8 +217,8 @@ Cannot use function type [1] with fewer than 2 type arguments. [missing-type-arg ^^^^^^^^^^^ References: - /core.js:2034:15 - 2034| static any | T>(promises: Iterable): Promise; + /core.js:2026:15 + 2026| static any | T>(promises: Iterable): Promise; ^^^^^^^^^^^^^^^^^^^^^^^^^ [1] @@ -231,8 +231,8 @@ Cannot call `Promise.any` because function [1] requires another argument. [incom ^^^ References: - /core.js:2034:5 - 2034| static any | T>(promises: Iterable): Promise; + /core.js:2026:5 + 2026| static any | T>(promises: Iterable): Promise; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] @@ -245,8 +245,8 @@ Cannot use function type [1] with fewer than 2 type arguments. [missing-type-arg ^^^^^^^^^^^ References: - /core.js:2034:15 - 2034| static any | T>(promises: Iterable): Promise; + /core.js:2026:15 + 2026| static any | T>(promises: Iterable): Promise; ^^^^^^^^^^^^^^^^^^^^^^^^^ [1] @@ -261,8 +261,8 @@ an interface. [incompatible-type] ^ [1] References: - /core.js:2034:51 - 2034| static any | T>(promises: Iterable): Promise; + /core.js:2026:51 + 2026| static any | T>(promises: Iterable): Promise; ^^^^^^^^^^^^^^ [2] @@ -647,8 +647,8 @@ References: resolve_void.js:1:29 1| (Promise.resolve(): Promise); // error ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -665,8 +665,8 @@ References: resolve_void.js:3:38 3| (Promise.resolve(undefined): Promise); // error ^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] diff --git a/tests/react_16_6/react_16_6.exp b/tests/react_16_6/react_16_6.exp index ec9a98b080c..3407b6ed885 100644 --- a/tests/react_16_6/react_16_6.exp +++ b/tests/react_16_6/react_16_6.exp @@ -76,8 +76,8 @@ References: /react.js:607:32 607| component: () => Promise<{ default: React$AbstractComponent, ... }>, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] @@ -97,8 +97,8 @@ References: /react.js:607:32 607| component: () => Promise<{ default: React$AbstractComponent, ... }>, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [3] diff --git a/tests/react_abstract_component/react_abstract_component.exp b/tests/react_abstract_component/react_abstract_component.exp index 82313c0247c..f2966f75ba6 100644 --- a/tests/react_abstract_component/react_abstract_component.exp +++ b/tests/react_abstract_component/react_abstract_component.exp @@ -114,8 +114,8 @@ Cannot return `x` because `$Iterable` [1] does not render number [2]. [incompati ^ References: - /core.js:1760:21 - 1760| type Iterable<+T> = $Iterable; + /core.js:1752:21 + 1752| type Iterable<+T> = $Iterable; ^^^^^^^^^^^^^^^^^^^^^^ [1] arity.js:25:43 25| ): React$AbstractComponent { diff --git a/tests/refinements/refinements.exp b/tests/refinements/refinements.exp index 70de0bd7741..ec6786cf579 100644 --- a/tests/refinements/refinements.exp +++ b/tests/refinements/refinements.exp @@ -3040,8 +3040,8 @@ expected type. [underconstrained-implicit-instantiation] ^^^^^^^^^^^^^^^^^^ References: - /core.js:2046:25 - 2046| declare function $await(p: Promise | T): T; + /core.js:2038:25 + 2038| declare function $await(p: Promise | T): T; ^ [1] issue-7104.js:20:7 20| return (box: empty).value; // underconstrained-implicit-instantiation error in LTI due to lack of empty propagation diff --git a/tests/regexp/regexp.exp b/tests/regexp/regexp.exp index 4424aa346fb..0fff01d661f 100644 --- a/tests/regexp/regexp.exp +++ b/tests/regexp/regexp.exp @@ -7,8 +7,8 @@ Cannot assign `patt.test(...)` to `match` because boolean [1] is incompatible wi ^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1444:27 - 1444| test(string: string): boolean; + /core.js:1436:27 + 1436| test(string: string): boolean; ^^^^^^^ [1] regexp.js:2:11 2| var match:number = patt.test("Hello world!"); diff --git a/tests/resolved_env/resolved_env.exp b/tests/resolved_env/resolved_env.exp index 2fe1c31b298..6ad32775950 100644 --- a/tests/resolved_env/resolved_env.exp +++ b/tests/resolved_env/resolved_env.exp @@ -36,8 +36,8 @@ expression to your expected type. [underconstrained-implicit-instantiation] ^^^^^^^^^^^^^^^^^ [2] References: - /core.js:2046:25 - 2046| declare function $await(p: Promise | T): T; + /core.js:2038:25 + 2038| declare function $await(p: Promise | T): T; ^ [1] @@ -51,8 +51,8 @@ Cannot yield `42` because number [1], a primitive, cannot be used as a subtype o ^^ [1] References: - /core.js:1797:7 - 1797| : $Iterable; + /core.js:1789:7 + 1789| : $Iterable; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] diff --git a/tests/return/return.exp b/tests/return/return.exp index cb25b8fabcb..50624323047 100644 --- a/tests/return/return.exp +++ b/tests/return/return.exp @@ -40,8 +40,8 @@ undefined in type argument `R` [2]. [incompatible-return] ^^^^^^ [1] References: - /core.js:1937:24 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:24 + 1929| declare class Promise<+R = mixed> { ^ [2] diff --git a/tests/template/template.exp b/tests/template/template.exp index 838d4f3fe8f..9e453474afd 100644 --- a/tests/template/template.exp +++ b/tests/template/template.exp @@ -49,8 +49,8 @@ Cannot cast `quasis.raw` to empty because read-only array type [1] is incompatib ^^^^^^^^^^ References: - /core.js:1170:9 - 1170| +raw: $ReadOnlyArray; + /core.js:1162:9 + 1162| +raw: $ReadOnlyArray; ^^^^^^^^^^^^^^^^^^^^^^ [1] tagged_template.js:25:18 25| (quasis.raw: empty); // ERROR @@ -66,8 +66,8 @@ Cannot cast `x` to empty because string [1] is incompatible with empty [2]. [inc ^ References: - /core.js:1391:110 - 1391| static raw(callSite: interface {+raw: $ReadOnlyArray}, ...substitutions: $ReadOnlyArray): string; + /core.js:1383:110 + 1383| static raw(callSite: interface {+raw: $ReadOnlyArray}, ...substitutions: $ReadOnlyArray): string; ^^^^^^ [1] tagged_template.js:34:7 34| (x: empty); // ERROR @@ -85,8 +85,8 @@ subtype of an interface. [incompatible-type] ^^^^^ [1] References: - /core.js:1391:26 - 1391| static raw(callSite: interface {+raw: $ReadOnlyArray}, ...substitutions: $ReadOnlyArray): string; + /core.js:1383:26 + 1383| static raw(callSite: interface {+raw: $ReadOnlyArray}, ...substitutions: $ReadOnlyArray): string; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2] @@ -99,8 +99,8 @@ Cannot cast `x` to empty because string [1] is incompatible with empty [2]. [inc ^ References: - /core.js:1391:110 - 1391| static raw(callSite: interface {+raw: $ReadOnlyArray}, ...substitutions: $ReadOnlyArray): string; + /core.js:1383:110 + 1383| static raw(callSite: interface {+raw: $ReadOnlyArray}, ...substitutions: $ReadOnlyArray): string; ^^^^^^ [1] tagged_template.js:45:7 45| (x: empty); // ERROR diff --git a/tests/tuples/tuples.exp b/tests/tuples/tuples.exp index bf1f3fb699b..4b8591a152c 100644 --- a/tests/tuples/tuples.exp +++ b/tests/tuples/tuples.exp @@ -955,8 +955,8 @@ Cannot call `readOnlyRef.push` because property `push` is missing in `$ReadOnlyA ^^^^ References: - /core.js:797:77 - 797| forEach(callbackfn: (this : This, value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg: This): void; + /core.js:793:77 + 793| forEach(callbackfn: (this : This, value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg: This): void; ^^^^^^^^^^^^^^^^^ [1] diff --git a/tests/type_guards/type_guards.exp b/tests/type_guards/type_guards.exp index 706cc3d37e2..90b557534ba 100644 --- a/tests/type_guards/type_guards.exp +++ b/tests/type_guards/type_guards.exp @@ -804,8 +804,8 @@ Error -------------------------------------------------------------------------- ^^^^^^^^^^^ [2] References: - /core.js:1762:11 - 1762| interface Generator<+Yield,+Return,-Next> { + /core.js:1754:11 + 1754| interface Generator<+Yield,+Return,-Next> { ^^^^^^^^^ [1] @@ -819,8 +819,8 @@ it into an object and attempt to use it as a subtype of an interface. [incompati ^^^^^^^^^^^ [1] References: - /core.js:1757:11 - 1757| interface $Iterable<+Yield,+Return,-Next> { + /core.js:1749:11 + 1749| interface $Iterable<+Yield,+Return,-Next> { ^^^^^^^^^ [2] @@ -833,8 +833,8 @@ Cannot return `(typeof x) == "number"` because `Generator` [1] is incompatible w ^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1762:11 - 1762| interface Generator<+Yield,+Return,-Next> { + /core.js:1754:11 + 1754| interface Generator<+Yield,+Return,-Next> { ^^^^^^^^^ [1] invalid.js:19:32 19| function *generator(x: mixed): x is number { // error @@ -875,8 +875,8 @@ Cannot return `(typeof x) == "number"` because `Promise` [1] is incompatible wit ^^^^^^^^^^^^^^^^^^^^ References: - /core.js:1937:15 - 1937| declare class Promise<+R = mixed> { + /core.js:1929:15 + 1929| declare class Promise<+R = mixed> { ^^^^^^^ [1] invalid.js:28:33 28| async function async(x: mixed): x is number { // error diff --git a/tests/union_new/union_new.exp b/tests/union_new/union_new.exp index e5a20ea2228..d77836550a7 100644 --- a/tests/union_new/union_new.exp +++ b/tests/union_new/union_new.exp @@ -175,8 +175,8 @@ References: test20.js:14:2 14| [""].reduce((acc,str) => acc * str.length); ^^ [1] - /core.js:1374:13 - 1374| length: number; + /core.js:1366:13 + 1366| length: number; ^^^^^^ [2]