Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant