Xcode 6.2 & 6.3 cannot detect duplicate variable names

Originator:andhieka.putra
Number:rdar://20529106 Date Originated:
Status:Open Resolved:
Product:Xcode Product Version:6.3
Classification:Bug Reproducible:Always
 
When writing in Swift, Xcode up to 6.3 cannot detect error where there are a "class var" and a "var" with the same name. It will indicate errors in other parts of the code but not at the core of the problem.

To reproduce:

protocol Barrable {
   var bar: String { get }
}

class Foo: Barrable {
   var bar: String { return Foo.bar };
   class var bar: String { return "important_string" }
}

// error: class Foo does not confirm to protocol Barrable

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!