class A {
static let superA = "a"
func foo() {
// Doesn't compile
_ = superA
// Compiles
_ = A.superA
}
class Inner {
func foo() {
// Compiles
_ = superA
}
}
}
I'm quite used to the non-compiling behaviour, as func foo works at instance-scope, and superA is defined at type scope, so that's not surprising.
I don't know if it's something that we want to revise (allowing instance scopes to access type scopes implicitly) as it might be confusing when shadowing is in place.
Though I don't understand why the instance scope of Inner should be able to access superA...