Xcode-beta (7A120f): Guard statement issue in top-level playground
| Originator: | owensd | ||
| Number: | rdar://21295773 | Date Originated: | |
| Status: | Resolved: | ||
| Product: | Product Version: | ||
| Classification: | Reproducible: |
The guard statement doesn’t work top-level in a playground.
— code —
enum MyCustomError : ErrorType {
case BadError
case GoodError
}
let items = [1 : "hi", 2 : "bye", 3 : "hello" , 4 : "goodbye"]
guard let item = items[3] else { throw MyCustomError.GoodError }
item
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!