Strangeness in interaction between record openness, optionality and subtyping #301
Labels
design/usability
Design does not work well for some tasks
lang
Relates to the Ballerina language specification
There is also a complication in the interaction between openness and optionality. Suppose we have
Then
ClosedDate
is a proper subtype ofExClosedDate
, butExOpenDate
is a proper subtype ofOpenDate
. It feels rather unintuitive that the subtyping relationship gets swapped in this way.The text was updated successfully, but these errors were encountered: