Invalid protocol extension crashes compiler functionality

Originator:bas
Number:rdar://22003394 Date Originated:27-07-2015
Status:Open Resolved:No
Product:Xcode Product Version:Version 7.0 beta 4 (7A165t)
Classification:Other bugs Reproducible:Always
 
Summary:
In a protocol extension, limiting the extension to 'Self: SomeProtocol' where 'SomeProtocol' is undeclared crashes the compiler functionality.

Steps to Reproduce:
1. Create a protocol with a required var. (ex.: RawStringRepresentable)
2. Extend the protocol with a where clause, giving an invalid Protocol (ex.: extension RawStringRepresentable where Self: Gibberish)
3. Fill out the required var (ex.: var string: String { return "" }
4. The compiler functionality should now crash.

See example in screenshot + playground

Expected Results:


Actual Results:
Compiler functionality crashes.

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!