You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I think it's reasonable to expect that in a final class, Self should be a synonym for the class type, just like in structs and enums.
To make this work 100% we also want an implicit conversion from the class type to the dynamic Self type, since the latter will still appear if you, eg, override a Self-returning method from the base class.
@slavapestov Shouldn't it behave the same with non-final classes too, e.g., be a synonym for the class type? `Self` is a painkiller for all of these annoyances, but stored properties are completely missing out on them. It sounds kind of self-imposing that using `Self` with a stored property initialization can't refer to anything else but the current class – since no inheriting classes are initialized yet.
Environment
Apple Swift version 5.1 (swiftlang-1100.0.257.2 clang-1100.0.31.3)
Target: x86_64-apple-darwin19.0.0
Additional Detail from JIRA
md5: 7afacc92e505425e8d597bd8233c41f2
is duplicated by:
relates to:
Self
as function parameter type in actorsIssue Description:
Shouldn't this be possible on a final class?
The text was updated successfully, but these errors were encountered: