Swift: Crash when nesting type within extension of generic type

Originator:rix.rob
Number:rdar://19349215 Date Originated:26-Dec-2014 10:23 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.1.1 (6A2008a)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Normally when you nest a type within a generic type you get this error:

error: type 'S' nested in generic type 'Foo' is not allowed

If you do it within an extension, it crashes instead.


Steps to Reproduce:
1. This:

enum Foo<T> {
	case Bar(T)
}
extension Foo {
	struct S {}
}


or equivalently, this:

extension Optional {
	struct S {}
}



Expected Results:
I expected the error (or else for it to compile because that restriction is just terrible).


Actual Results:
Crash.


Regression:
N/A


Notes:
N/A

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!