You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From last part of comment above it seems you imply that master branch after #19671 merge get this right, but this is not the case. Am I missing something?
I can confirm that if C is not an empty object type Typescript 2.6.1 compile the source without errors.
@abramobagnara I meant that with the approach we introduced in #19671 we can, but currently don't, get it right even when C is an empty class type (as in your example). You are correct that it used to work when C is not an empty class. Both issues are fixed by #20142 that I just put up.
TypeScript Version: 2.7.0-dev.201xxxxx
Code
Expected behavior:
No compile errors:
Actual behavior:
p.ts(5,11): error TS2322: Type 'string | T' is not assignable to type 'T'.
Type 'string' is not assignable to type 'T'.
The text was updated successfully, but these errors were encountered: