Segmentation Fault: 11 during compilation

Originator:michaelgwelch
Number:rdar://34747985 Date Originated:9/29/2017
Status:DUPLICATE OF 34522739 OPEN Resolved:No
Product:XCode Swift Product Version:XCode 9
Classification: Reproducible:Yes
 
Summary:
I made a mistake in my types and rather than getting useful compiler errors, I started getting Segmentation Fault: 11 errors.

Steps to Reproduce:
I had much more code but the following snipped illustrates the issue

    func badTypes() {

        let sequence:AnySequence  = AnySequence() { AnyIterator() { [3] }}
        let array = [Int](sequence)

    }

I was trying to create an array out of Sequence but had mixed up my types and sequence was actually a sequence of [Int] rather than Int.


Expected Results:
The second line should generate a compiler error something along the lines of "The type [Int] can't be converted to type Int" or "AnySequence  can't be converted to AnySequence "

Actual Results:
Seg Fault: 11

Version/Build:
XCode Version 9.0 (9A235)

Configuration:
macOS High Sierra 10.13

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!