Strange generics behavior

Things get weird with existentials during these transitional times, even more so with metatypes.

Regardless that it should work better, what you've got there looks unwieldy. Why are you not using an associated type instead of a property?

protocol GDecodable {
  associatedtype Replacement: GDecodable = Self
}

class Example<T: GDecodable>: GDecodable {
  typealias Replacement = T
}
1 Like