Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requires an actual type operation.(2322 extra error) #1090

Open
sunrabbit123 opened this issue Sep 17, 2023 · 0 comments
Open

Requires an actual type operation.(2322 extra error) #1090

sunrabbit123 opened this issue Sep 17, 2023 · 0 comments

Comments

@sunrabbit123
Copy link
Collaborator

// @strict: true
// @declaration: true

function f2<T extends string | undefined>(x: T, y: NonNullable<T>) {
    x = y;
    y = x;  // Error
    let s1: string = x;  // Not error, because `actual_type` of `x` is `string` from `x = y`
    let s2: string = y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant