We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Assume we have a type:
interface A { c: int; f: forall T . (T) => T; }
Then for doing the subtyping:
A <: { f: (int) => int }
we'd have to first unfold A into
{ c: number; f: forall T . (T) => T; }
Then deeply instantiate all quantified types:
{ c: number; f: (T0) => T0; }
Unify: T0 := int
T0 := int
Finally, do the subtyping:
{ c: number; f: (T0) => T0; } [T0: int] <: { f: (int) => int; } ~> UPCAST
Example: https://github.com/UCSD-PL/RefScript/blob/poly-subt/tests/pos/simple/contextual.ts
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Assume we have a type:
Then for doing the subtyping:
we'd have to first unfold A into
Then deeply instantiate all quantified types:
Unify:
T0 := int
Finally, do the subtyping:
{ c: number; f: (T0) => T0; } [T0: int] <: { f: (int) => int; } ~> UPCAST
Example:
https://github.com/UCSD-PL/RefScript/blob/poly-subt/tests/pos/simple/contextual.ts
The text was updated successfully, but these errors were encountered: