Enum with a case with an associated value of type [T] in a switch statement won't compile

Originator:scoartastefan
Number:rdar://21673750 Date Originated:04-Jul-2015 12:32 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A121l)
Classification:Serious Bug Reproducible:Not Applicable
 
Summary:
Swiftc failed with exit code 1

Steps to Reproduce:
1.Run the current scheme from the project attached,using the simulator,for the same error messages,on a device would be different because the architecture is different
Update{
1.Have an enum that has a case with an associated value of type [T]
2.Switch a value of that enum(and use that case)
3.Try to build }

Expected Results:
Compile and run in the simulator

Actual Results:
Build failed,with 5 errors:

1.Compile Swift source files:
Command /Applications/Xcode-beta 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

a.Compile SerachViewController:
Terminator found in the middle of a basic block!
label %50
LLVM ERROR: Broken function found, compilation aborted!
b.Compile LandscapeViewController:
Terminator found in the middle of a basic block!
label %71
LLVM ERROR: Broken function found, compilation aborted!

2.Copy StoreSearch-Swift.h:
ditto: can't get real path for source '/Users/stefanscoarta/Library/Developer/Xcode/DerivedData/StoreSearch-bglwyjsstzqwkkfikpujpnmnbdxf/Build/Intermediates/StoreSearch.build/Debug-iphonesimulator/StoreSearch.build/Objects-normal/x86_64/StoreSearch-Swift.h'
Command /usr/bin/ditto failed with exit code 1

3.Link Users/stefanscoarta/Library/Developer/Xcode/DerivedData/StoreSearch-bglwyjsstzqwkkfikpujpnmnbdxf/Build/Products/Debug-iphonesimulator/StoreSearch.app/StoreSearch(my path is here):
ld: file too small (length=0) file '/Users/stefanscoarta/Library/Developer/Xcode/DerivedData/StoreSearch-bglwyjsstzqwkkfikpujpnmnbdxf/Build/Intermediates/StoreSearch.build/Debug-iphonesimulator/StoreSearch.build/Objects-normal/x86_64/SearchViewController.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

4.Copy x86_64.swiftmoudule:
ditto: can't get real path for source '/Users/stefanscoarta/Library/Developer/Xcode/DerivedData/StoreSearch-bglwyjsstzqwkkfikpujpnmnbdxf/Build/Intermediates/StoreSearch.build/Debug-iphonesimulator/StoreSearch.build/Objects-normal/x86_64/StoreSearch.swiftmodule'
Command /usr/bin/ditto failed with exit code 1

5.Copy x86_64.swiftdoc:
ditto: can't get real path for source '/Users/stefanscoarta/Library/Developer/Xcode/DerivedData/StoreSearch-bglwyjsstzqwkkfikpujpnmnbdxf/Build/Intermediates/StoreSearch.build/Debug-iphonesimulator/StoreSearch.build/Objects-normal/x86_64/StoreSearch.swiftdoc'
Command /usr/bin/ditto failed with exit code 1

Version:
Xcode 7 Build:7A121l
OS X El Capitan Build:15A204h

Notes:
I think that all other 4 errors will disappear if the first error will be fixed
It works if you an enum with a case with an associated value of type Set<T>

Configuration:

Xcode Project.zip - configuration file has been successfully uploaded.

Attachments:
'Xcode Project.zip' was successfully uploaded.

You can see the source code on stack overflow at:
http://stackoverflow.com/questions/31201116/terminator-found-in-the-middle-of-a-basic-block/31217781#31217781

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!