In Silver (Elements 9.2),
protocol MyProtocol {
var readOnlyValue : Int { get }
}
class MyClass : MyProtocol {
var readOnlyValue = 64
}
gives error E179 (Method "MyProtocol!. readOnlyValue -> Int" not implemented as required for interface "MyProtocol"
). The expected behavior is to make property readOnlyValue
read-only by giving it the default getter and no setter.