Consider this example
class Foo {
private let bar = "bar"
lazy var baz : String = {
return "baz \(bar)"
}()
}
Unfortunately this won't compile and give the following error
'Foo.Type' does not have a member named 'bar'
I really do not want to declare bar outside the class (globally). Is there no other way to keep this inside the class and why isn't bar accessible in the first place?