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
SR-11176 Covariant 'Self' type cannot be referenced from a stored property initializer
Issue Description:
actorFoo{init(bar:Int){...}letbar:Int// error: Covariant 'Self' or 'Self?' can only appear as the type of a property, subscript or method result; did you mean 'Foo'?// fix-it: Replace 'Self' with 'Foo'func printFoo(foo:Self){print(foo.bar)}}extensionFoo:Equatable{// error: Covariant 'Self' or 'Self?' can only appear as the type of a property, subscript or method result; did you mean 'Foo'?// fix-it: Replace 'Self' with 'Foo'staticfunc==(lhs:Self, rhs:Self)->Bool{
lhs.bar == rhs.bar
}}
It should be legal to use Self as function parameter type in actors, in my opinion.
The text was updated successfully, but these errors were encountered:
Environment
macOS 12.0.1 (21A558)
2021-10-27 development toolchain
Additional Detail from JIRA
md5: 53142994a90b8134469f7159831a33e4
relates to:
Issue Description:
It should be legal to use
Self
as function parameter type in actors, in my opinion.The text was updated successfully, but these errors were encountered: