XCTFail not closing control-flow with do/try/catch

Originator:eli.j.perkins
Number:rdar://21409580 Date Originated:16-Jun-2015 05:24 PM
Status:Closed (Duplicate) Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:Yes
 
Summary:
XCTFail seems to not close the control-flow for a do/try/catch.

See also, this conversation: https://twitter.com/jckarter/status/610915030553374720

Steps to Reproduce:
1. git clone https://github.com/eliperkins/JSONCodable/ from this commit: bd4aa07e9c8b964a7a6c3ab0178a38cc52b31faa
2. See JSONCodableTests.swift
3. Note how accessing `dict` later causes errors with accessing an uninitialized variable

Expected Results:
I can access dict after the do/try/catch since XCTFail

Actual Results:
I can't access dict without adding fatalError to close the control path. Adding fatalError() inside the catch will suppress any errors.

Version:
Xcode Version 7.0 beta (7A120f)
OS X Yosemite 10.10.4 (14E33b)

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!