Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
line 4, 8, 12 extra: by-design spec §2.2 `this` is valid only inside class method and constructor bodies and field initializers, so not in a parameter default
line 16 missed: artifact we report the use of `this` before `super()` at the `super()` call, tsc at the use
line 17 extra: artifact we report the use of `this` before `super()` at the `super()` call, tsc at the use
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 31 extra: by-design spec §2.2 a `super(...)` must be a statement of its own
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 8 missed: artifact we report the use of `this` before `super()` at the `super()` call, tsc at the use (here a `super` member)
line 9 extra: artifact we report the use of `this` before `super()` at the `super()` call, tsc at the use (here a `super` member)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 5, 15 extra: by-design spec §2.2 field initializers run before parameter properties are assigned, as under `useDefineForClassFields`, so an initializer can't read one
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
line 55, 70, 85 extra: artifact the test relies on the DOM library's `window`, which Submilli doesn't provide
line 42 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 27 type: bug SUB-1617 a defaulted parameter that a closure assigns reads with `undefined`, where tsc removes it
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
line 38, 111 type: bug SUB-1609 destructured variables miss narrowings tsc applies (a `switch` default)
line 93, 96 type: bug SUB-1609 destructured variables miss narrowings tsc applies (a source whose field a guard narrowed)
line 93, 96 extra: bug SUB-1609 destructured variables miss narrowings tsc applies (a source whose field a guard narrowed)
line 357, 362 type: bug SUB-1609 destructured variables miss narrowings tsc applies (tuple elements)
line 411, 434 extra: bug SUB-1609 destructured variables miss narrowings tsc applies (tuples of different lengths)
line 412, 413, 415, 416, 418, 419, 422, 425, 428, 435 type: bug SUB-1609 destructured variables miss narrowings tsc applies (tuples of different lengths)
2 changes: 2 additions & 0 deletions crates/conformance/typescript/es2020/es2020IntlAPIs.triage
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 20, 28, 34, 35, 48, 53, 55, 56, 57, 58, 59 extra: by-design spec §Excluded-Features `Intl`, `SharedArrayBuffer` and `globalThis` aren't provided
line 22, 25, 30, 37, 40, 55, 57, 59 type: by-design spec §Excluded-Features `Intl`, `SharedArrayBuffer` and `globalThis` aren't provided
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 8 missed: bug SUB-1614 a binding named `arguments` is accepted, where strict mode rejects it
line 9 type: bug SUB-1616 a closure returned into a union return type keeps its literal return type, where tsc widens it
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 8 missed: bug SUB-1614 a binding named `arguments` is accepted, where strict mode rejects it
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 7, 9 missed: bug SUB-1614 a binding named `arguments` is accepted, where strict mode rejects it
line 10 type: bug SUB-1616 a closure returned into a union return type keeps its literal return type, where tsc widens it
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 7 missed: bug SUB-1614 a binding named `arguments` is accepted, where strict mode rejects it
line 9 extra: bug SUB-1615 indexing a string with brackets is rejected
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
line 6, 7, 12, 13 type: bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
line 26 type: bug SUB-1610 `x ?? []` checks the empty literal against the left operand's tuple type
line 26 extra: bug SUB-1610 `x ?? []` checks the empty literal against the left operand's tuple type
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
line 17, 26 type: by-design spec §1.6 `&&` keeps `number` and `boolean` whole in its falsy part, where tsc narrows to `0` or `false`
line 43 type: bug SUB-1609 destructured variables miss narrowings tsc applies (an optional element the initializer leaves out)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 6, 7, 12, 13 extra: bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
line 18, 19 type: bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
line 27 type: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple
line 30 type: artifact the type comes from code tsc rejects, and each side's recovery type differs
line 33 type: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple; also artifact the type comes from code tsc rejects, and each side's recovery type differs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 30 type: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple
line 33 type: artifact the type comes from code tsc rejects, and each side's recovery type differs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ line 18 extra: by-design spec §1.2 arrays are homogeneous, so an array literal'
line 30 extra: by-design spec §1.2 tuples have no rest elements, so an array literal that spreads an array is an array, whose elements must share one type
line 18 type: by-design spec §1.2 arrays are homogeneous, so an array literal's elements must share one type
line 30 type: by-design spec §1.2 tuples have no rest elements, so an array literal that spreads an array is an array, whose elements must share one type
line 11 type: artifact the runner reads a module-level pattern binding from its global slot, which is typed before the default applies; reads and writes use the defaulted type; also bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
line 12 type: artifact the runner reads a module-level pattern binding from its global slot, which is typed before the default applies; reads and writes use the defaulted type
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
line 5, 6, 7, 11, 12 type: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple
line 5, 6, 10, 11 missed: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple
line 7, 12, 17, 25, 30 extra: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple
line 10, 15, 16, 17, 23, 24, 25, 28, 30 type: bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple; also bug SUB-1555 a destructured binding's default keeps its literal type where tsc widens it
line 29 type: bug SUB-1555 a destructured binding's default keeps its literal type where tsc widens it; also bug SUB-1607 a parameter default that an array pattern takes apart is typed as an array, where tsc types it as a tuple
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 2 type: bug SUB-1500 a literal inside an array literal passed to `new Map(...)` widens where tsc keeps it
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
line 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 type: bug SUB-1612 a template literal with a bitwise interpolation is `string`, where tsc folds it to a literal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 47, 48, 49, 50, 51, 52, 53, 54, 74, 75, 76, 77, 78, 79, 80, 81, 101, 102, 103, 104, 105, 106, 107, 108 type: bug SUB-1612 a template literal with a bitwise interpolation is `string`, where tsc folds it to a literal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 13, 21, 28 type: bug SUB-1613 `typeof x` used as a value is `string`, where tsc gives the union of the tag strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 13, 14, 21, 28 type: bug SUB-1613 `typeof x` used as a value is `string`, where tsc gives the union of the tag strings
line 14 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 13, 14, 21, 28 type: bug SUB-1613 `typeof x` used as a value is `string`, where tsc gives the union of the tag strings
line 14 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 13, 14, 21, 28 type: bug SUB-1613 `typeof x` used as a value is `string`, where tsc gives the union of the tag strings
line 14 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 9 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
line 17, 18, 26, 27, 35, 37, 38, 39 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
line 21 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 28, 29, 30, 31 extra: by-design spec §1.6 `+` adds two numbers or concatenates two strings, it never coerces the other operand
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
line 23, 25, 28, 31, 33, 36, 40, 42, 45, 48, 50, 53, 57, 59, 62, 65, 67, 70, 74, 76, 79, 82, 84, 87, 91, 93, 96, 99, 101, 104, 108, 110, 113, 116, 118, 121, 125, 127, 130, 133, 135, 138, 142, 144, 147, 150, 152, 155 extra: by-design spec §1.6 `<`, `>`, `<=`, `>=` compare only two numbers or two strings
line 26, 43, 60, 77, 94, 111, 128, 145 extra: by-design spec §1.6 `<`, `>`, `<=`, `>=` compare only two numbers or two strings
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
line 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 141, 142, 143, 144, 145, 146, 147, 148, 149, 151 extra: by-design spec §1.6 `<`, `>`, `<=`, `>=` compare only two numbers or two strings
line 56, 69, 83, 96, 110, 123, 137, 150 extra: by-design spec §1.6 `<`, `>`, `<=`, `>=` compare only two numbers or two strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line 22, 24, 25, 26, 27, 28, 29, 31, 32, 34, 35, 36, 37, 38, 40, 41, 42, 44, 45, 46, 47, 58, 59, 60, 61, 64, 67, 68, 69, 70, 71, 72, 74, 76, 78, 79, 82 type: by-design spec §1.6 `a && b` is `falsy_part(a) | b`, even when `a` is always falsy
line 53 type: by-design spec §1.1 a `void` result may hold any value, since a value-returning function stored as a `void` one returns it (so truthiness doesn't narrow a `void` to `never`)
line 62, 80 type: by-design spec §1.6 `a && b` is `falsy_part(a) | b`, even when `a` is always falsy (`undefined | void` prints as `void`)
line 77 type: bug SUB-1623 a variable an always-falsy `z` was built from reads as `never` in the right operand of `z && …`
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
line 36, 37, 47, 48, 58, 59, 91, 92, 102, 103, 113, 114, 124, 125 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
line 30, 52, 85, 96, 107, 118 type: by-design spec §1.6 `&&` keeps `number` whole in its falsy part, where tsc narrows to `0`
line 36, 37, 47, 48, 58, 59, 91, 92, 102, 103 type: by-design spec §1.6 `a && b` is `falsy_part(a) | b`, even when `a` is always falsy
line 63 type: by-design spec §1.6 `&&` keeps `number` whole in its falsy part, where tsc narrows to `0`
line 65 type: by-design spec §1.1 a `void` result may hold any value, since a value-returning function stored as a `void` one returns it (so truthiness doesn't narrow a `void` to `never`)
line 69, 114, 124 type: by-design spec §1.6 `a && b` is `falsy_part(a) | b`, even when `a` is always falsy
line 69, 70 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
line 70 type: by-design spec §1.6 `a && b` is `falsy_part(a) | b`, even when `a` is always falsy (`undefined | void` prints as `void`)
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
line 38, 39, 49, 50, 60, 61, 93, 94, 104, 105, 115, 116, 126, 127 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
line 36, 37, 47, 48, 58, 59, 92, 102, 113, 114, 124, 125 type: by-design spec §1.6 the result of `||` or `??` includes the right operand's type, even when the left can't fall through to it
line 69, 70 type: by-design spec §1.6 the result of `||` or `??` includes the right operand's type, even when the left can't fall through to it
line 71, 72 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line 24 extra: by-design spec §2.2 `never` is not a valid type argument to a generic class
line 25 type: artifact we reject `X<never>` on line 24, so `xNever` is an error type and its call isn't checked
line 25 missed: artifact we reject `X<never>` on line 24, so `xNever` is an error type and its call isn't checked
line 36, 37, 49, 67, 68, 69 extra: bug SUB-1611 a trailing `void` parameter must still be passed, where tsc lets a call omit it
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 28 type: bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 19, 20 extra: bug SUB-1620 a union with an empty object literal isn't normalized, so `(o || {}).a` is rejected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 16 extra: by-design spec §2.2 a `super(...)` must be a statement of its own
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line 14 type: by-design spec §1.6 a `toString` member must return a string, since `String(x)` and interpolation call it
line 14 extra: by-design spec §1.6 a `toString` member must return a string, since `String(x)` and interpolation call it
line 18, 19, 20, 21 type: artifact both compilers reject the `new Array(...)` on line 17; tsc goes on checking `a` as `(boolean | null | undefined)[]`, where ours is an error type
line 18, 19, 20, 21 missed: artifact both compilers reject the `new Array(...)` on line 17; tsc goes on checking `a` as `(boolean | null | undefined)[]`, where ours is an error type
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
line 47, 48, 49, 51, 52, 53, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 88, 89 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
line 105, 106, 107, 108, 110, 111, 112, 113 type: by-design spec §Excluded-Features there is no `any`, so `let b = null` is `null`, where tsc makes it an evolving `any`
line 135, 136, 137, 138 type: by-design spec §Excluded-Features there is no `any`, so an unannotated `let x = []` is `never[]`, where tsc makes it an evolving `any[]`
line 160 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 13 type: bug SUB-1433 a literal checked against an expected type takes that type, where tsc keeps its own
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
line 94, 97 extra: by-design spec §1.2 arrays are homogeneous, so an array literal's elements must share one type
line 94, 97 type: by-design spec §1.2 arrays are homogeneous, so an array literal's elements must share one type
line 179 type: artifact one side prints a type alias (or `keyof`) by name and the other expands it
line 103, 104 type: bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
line 15 extra: by-design spec §1.5 a case must end with `break` or `return`, no fallthrough
line 19 type: by-design spec §1.5 a case must end with `break` or `return`, no fallthrough
line 27 type: artifact the runner pairs tsc's entry with a node we synthesize (a read of `s` that ends its narrowing, at the `undefined` branch)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 11, 12, 13, 14 type: bug SUB-1608 a pattern's defaults don't shape the initializer literal, where tsc makes defaulted members optional and allows missing ones
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line 15, 42, 47 extra: by-design spec §2.2 a method reference without a call is not a value
line 48 type: by-design spec §2.2 a method reference without a call is not a value (we reject `x.h` in the condition, so the call's type is lost)
line 48 extra: by-design spec §2.2 a method reference without a call is not a value (we reject `x.h` in the condition, so the call's type is lost)
line 58 extra: bug SUB-1621 an optional class method is a field, so a subclass can't override it with a method
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 19 extra: bug SUB-1437 a primitive isn't assignable to `{}` or `Object` (nor to an object type with only a `toString` method)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 69, 74 extra: by-design spec §2.2 classes are nominal, so `instanceof` a class unrelated to the operand's is always false and rejected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 31 type: artifact the type comes from code tsc rejects, and each side's recovery type differs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
line 14, 16 missed: bug SUB-1153 a property a later spread always overwrites

line 22 type: bug SUB-1209 a union of `{}` and an all-optional object type isn't reduced to the object type
line 17, 21 type: bug SUB-1618 spreading an optional field declared `?: T | undefined` keeps `undefined`, where tsc treats it as `?: T`
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 23, 28, 33 type: by-design spec §1.6 after an assignment the variable has the assigned value's type, where tsc keeps the declared one
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 12, 15, 16, 17, 22, 23, 24, 25, 28, 29, 32, 33, 34, 41, 45 extra: by-design spec §1.4 a function type with a rest parameter is only satisfied by another rest function with as many parameters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
line 70 extra: by-design spec §1.2 a class or a whole enum is a type, not a value, so `typeof` has nothing to take
line 71, 72 type: artifact we reject `typeof c` on line 70, so `ac` is an error type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 11, 23, 27, 31, 41, 45, 49, 53, 65, 69, 75, 79, 83, 107, 123 extra: by-design spec §1.4 a function type with a rest parameter is only satisfied by another rest function with as many parameters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 21, 22, 23, 25, 26, 27 missed: bug SUB-1154 tsc rejects a condition that is always truthy or always falsy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
line 4 type: by-design spec §Excluded-Features there is no `any`, so `let b = null` is `null`, where tsc makes it an evolving `any`
line 5 type: by-design spec §Excluded-Features there is no `any`, so `let b = null` is `null`, where tsc makes it an evolving `any` (here `let a2 = undefined` is `undefined`)
line 8 type: by-design spec §Excluded-Features there is no `any`, so an unannotated `let x = []` is `never[]`, where tsc makes it an evolving `any[]`
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 12 extra: bug SUB-1619 calling a union of function types is rejected when a member has a rest parameter
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 14, 15, 16, 19, 20, 21, 25 extra: bug SUB-1619 calling a union of function types is rejected when a member has a rest parameter
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
line 5, 6, 7, 11, 12, 13 type: bug SUB-1622 a conditional of two object types isn't subtype-reduced, where tsc keeps the wider one
line 12 extra: bug SUB-1622 a conditional of two object types isn't subtype-reduced, where tsc keeps the wider one
line 51, 52 type: bug SUB-1598 a method read on a union of objects reduces to the wider method type, where tsc keeps the union
line 61 type: by-design spec §2.3 a literal checked against an interface with methods is typed as the interface, which a plain object type isn't assignable to
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ line 366, 375 type: by-design spec §1.6 `==` is an alias for `===`, so `x == y`

line 86, 92, 119, 125, 173, 176 extra: by-design spec §1.6 `==` and `!=` against `null` or `undefined` are rejected, since they compare like `===` and would miss the other nullish value
line 90, 96 type: by-design spec §1.6 `!=` against `null` or `undefined` is rejected and checked as `!==`, so the equality branch contains only the tested nullish value
line 23, 24, 25 extra: bug SUB-1437 a primitive isn't assignable to `{}` or `Object` (so `unknown` isn't assignable to `{} | null | undefined`)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line 117 extra: bug SUB-1437 a primitive isn't assignable to `{}` or `Object` (so `unknown` isn't assignable to `{} | null | undefined`)
Loading
Loading