The declaration of value
below
import Foundation
class AAA: NSObject {
func test2() {
self.dynamicType
}
}
extension AAA {
stat
You can mark it as private to prevent this error. If you want to expose it, you can wrap it in a public function:
extension AAA {
private static let value = 111
public func getDatValue() -> Int {
return AAA.value
}
}
In my case, I only referenced the property in the extension itself, so there was no need to expose it.