Xcode6-Beta (6A215l): Design-time compiler doesn't flag this error; Swift report of error is confusing

Originator:adam
Number:rdar://17336481 Date Originated:17-Jun-2014 10:59 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode6-Beta (6A215l)
Classification:Other Bug Reproducible:Always
 
Summary:

var adhocLocDB = Array<CLVisit>()
NSUserDefaults.standardUserDefaults().setObject(adhocLocDB, forKey: "visits")

causes no design-time error but produces a confusing Swift toolchain error

Steps to Reproduce:


Expected Results:
It seems like valid syntax, it should build and run or else provide a useful compile error - this doesn’t highlight in the editor or anything

Actual Results:
Swift error: Bitcast requires both operands to be pointer or neither
  %37 = bitcast i32 %36 to %objc_object*, !dbg !273
LLVM ERROR: Broken function found, compilation aborted!

Regression:

Notes:

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!