LYR-SEM0135
a conformance the compiler cannot synthesize, or Identity on a value
An interface that is normally synthesized ('Equatable', 'Hashable', 'Default', 'Identity' …) cannot be synthesized for the type: 'Identity' on a struct or an enum, a 'Default' of an enum, a field whose type gives no such member; also a 'comptime for' over 'Variants' of an enum whose variants carry a payload.
Explanation
Some interfaces in the list after :: are synthesized: the compiler writes the members from the fields or variants. That needs a form for each field: a hash of a field whose type is not Hashable has none, and an enum has no single default value. Identity belongs to objects only: a struct or an enum is a value, compared by its contents, and has no identity.
Write the member yourself in the type or a conformance block, change the field's type, or drop the interface.
Wrong
struct Point :: [Identity] {
x: int,
}
fn main(): void {
}
Right
class Point :: [Identity] {
x: int,
}
fn main(): void {
}