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, arguably 'self' should have DynamicSelfType in all class methods, not just those returning self. Right now this cannot be enabled without introducing performance regressions, because of optimizer limitations. I'm going to re-title this bug because finally somebody cares about this issue (yay!). It's a lot more general than just properties.
@belkadan Hmm. So 'let foo = bar' in type context is type checked like 'let foo = C.bar', not 'let foo = type(of: self).bar'. The latter would be more consistent behavior if we also change methods to have a dynamic 'self' type.
Environment
Swift version 4.1-dev (LLVM fe49d8f2ca, Clang 839070845c, Swift 76ea3a2)
Target: x86_64-apple-darwin17.2.0
Additional Detail from JIRA
md5: 2df450011114c0bdf1e6f6a7bba3ac45
is duplicated by:
Issue Description:
The following code outputs "C":
Despite the fact that it's a D instance being constructed.
This also prevents overrides of
class
members from working:The text was updated successfully, but these errors were encountered: