Type inference fails verifying protocol vars

Testing on on 8.3.93.1987

public protocol MyProto
{
    var x: Int { get }
}

public class MyClass: MyProto
{
    // This compiles
    //public let x: Int = 4
    // This does not
    // error E181: Property "x: Int" getter not implemented as required for interface "MyProto"
    public let x = 4
}

Test project: ProtocolGetterIssue.zip (332.1 KB)

When implementing protocol or overriding using the types is required.

Okay, thanks. It works without the type in Xcode 7.3.1 so there may be small compatibility issues but at least it is easy to fix.

Thanks, logged as bugs://75558

I’ll log a bug for this, but it’s going to be a tricky one.

bugs://75558 got closed with status fixed.

Logged as bugs://i63525.

bugs://i63525 was closed as fixed.