Avatar
swiftbot BOT 2/1/2020 3:15 PM
Author icon
kishikawakatsumi
class Foo { private var fooPrivate = "private property" } extension Foo { func bar() -> String { return fooPrivate } } print(Foo().bar())
Version:
swift-3.0.1-RELEASE
Output:
Error:
/usercode/main.swift:7:16: error: 'fooPrivate' is inaccessible due to 'private' protection level return fooPrivate ^ /usercode/main.swift:2:17: note: 'fooPrivate' declared here private var fooPrivate = "private property" ^