Skip to content

Commit

Permalink
Accept new baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Jan 17, 2021
1 parent 07d6b1d commit db46250
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(7,9): error TS7027: Unreachable code detected.
tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error TS2367: This condition will always return 'false' since the types '"a" | "b"' and '"c"' have no overlap.
tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error TS2367: This condition will always return 'false' since the types 'keyof O' and '"c"' have no overlap.


==== tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts (2 errors) ====
Expand Down Expand Up @@ -241,7 +241,7 @@ tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error
}
k === 'c'; // Error
~~~~~~~~~
!!! error TS2367: This condition will always return 'false' since the types '"a" | "b"' and '"c"' have no overlap.
!!! error TS2367: This condition will always return 'false' since the types 'keyof O' and '"c"' have no overlap.
return o[k];
}

4 changes: 2 additions & 2 deletions tests/baselines/reference/exhaustiveSwitchStatements1.types
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,12 @@ function ff(o: O, k: K) {
}
k === 'c'; // Error
>k === 'c' : boolean
>k : "a" | "b"
>k : keyof O
>'c' : "c"

return o[k];
>o[k] : number
>o : O
>k : "a" | "b"
>k : keyof O
}

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace jsx {
>css : string

export type LibraryManagedAttributes<C, P> = WithCSSProp<P>
>LibraryManagedAttributes : WithCSSProp<P>
>LibraryManagedAttributes : LibraryManagedAttributes<C, P>

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ function asObservable(input: string | ObservableInput<string>): Observable<strin
>input : string
>from(input) : Observable<string>
>from : <O extends ObservableInput<any>>(input: O) => Observable<ObservedValueOf<O>>
>input : Subscribable<never> | Subscribable<string>
>input : ObservableInput<string>
}

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function fail(s: Shapes) {
if (s.kind === "circle") {
>s.kind === "circle" : boolean
>s.kind : "square" | "circle"
>s : Square | Circle
>s : Shape
>kind : "square" | "circle"
>"circle" : "circle"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ foo1 = [...Array.isArray(foo2) ? foo2 : [foo2]];
>isArray : (arg: any) => arg is any[]
>foo2 : Foo
>foo2 : FooArray
>[foo2] : (string | false)[]
>foo2 : string | false
>[foo2] : FooBase[]
>foo2 : FooBase

2 changes: 1 addition & 1 deletion tests/baselines/reference/stringLiteralCheckedInIf02.types
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function f(foo: T) {
>foo : T

return foo;
>foo : "a" | "b"
>foo : S
}
else {
return foo[0];
Expand Down

0 comments on commit db46250

Please sign in to comment.