flint
flint copied to clipboard
Support Self references in traits
This a subtask of #107 and #338.
Is this done? We have protection blocks with self
, and function calls don't need it. Without adding properties I can't think of any other uses.
It's for parameters, where you don't want to support arbitrary traits conforming to it, but specifically the one that is being initialised e.g.
struct trait Asset {
associatedtype RawType
// Create the asset by transferring a given amount of asset's contents.
init(from other: inout Self, amount: RawType)
}