“Ambiguous use of ‘propertyName'” error given overridden property with didSet observer

I was able to work around this in my case by casting to the base class:

(employee as Person).name = "Sally"

This still appears to do the proper dispatch to the subclass. For instance:

class Person {
    var name: String {
            return "person"
    }
}

class Employee: Person {
    override var name: String {
        return "employee"
    }
}

let bob = Person()
let alice = Employee()

println((alice as Person).name) // prints "employee"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)