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
any function that accepts a parameter of type T can be assigned to a variable typed as a function that accepts a parameter of type U as long as T is a subtype of U
any function that returns type T can assigned to variable typed as a function that returns type U as long as U is a subtype of T
any function that is phase-independent can be assigned to a variable typed as an inflight function as long as the rest of the signatures match
any function that is phase-independent can be assigned to a variable typed as a preflight function as long as the rest of the signatures match
Examples of function subtyping in action:
The subtyping logic is currently located here:
wing/libs/wingc/src/type_check.rs
Line 249 in c3a9534
The text was updated successfully, but these errors were encountered: