Add type inference for static members with Self type in classes

Now it is impossible to init shared items by leading dot syntax.

However, in this case ( if I marked class as "final" ), type inference is obvious.
Class doesn't have any subclasses and everything is clear for Self.

Is it possible to add this functionality in next versions?

final class Abc {
  required init() {}
  static let/var shared: Self = .init() // 
}
3 Likes
Terms of Service

Privacy Policy

Cookie Policy