>
> https://github.com/apple/swift-evolution/blob/master/proposals/0068-universal-self.md
I'm not totally clear what's being proposed here.
Is this valid?
class Foo {
static func bar() { … }
func baz(other: Foo) {
Self.bar()
}
}
Is this valid?
struct Foo { // note: not class
static func bar() { … }
func baz(other: Foo) {
Self.bar()
}
}
Is this valid?
class Foo {
static func bar() { … }
func baz(other: Foo) {
other.Self.bar() // note: not self
}
}
Is this valid?
struct Foo { // note: not class
static func bar() { … }
func baz(other: Foo) {
other.Self.bar() // note: not self
}
}
Can a class have a variable (inside a method) of type Self? A return value? A
parameter? A property?
Can a value type have a variable (inside a method) of type Self? A return
value? A parameter? A property?
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution