Specify function subtyping #28
Labels
Area/Lang
Relates to the Ballerina language specification
design/incomplete
Part of design not yet worked out
Milestone
The spec does not specify exactly how function subtyping should work.
Basic principle is that functions should be covariant in return type and contravariant in parameter types. Default values should not affect subtyping.
Ideally we want to define this in terms of shapes (ie type denotes set of shapes, and subtype means subset of denoted set of shapes).
Relates to #27
The text was updated successfully, but these errors were encountered: