Swift 2.0b4: Mutually recursive protocols cause swiftc to infinite loop and crash

Originator:rix.rob
Number:rdar://22064783 Date Originated:29-Jul-2015 09:52 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A165t)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
So, y’all use recursion too!

Steps to Reproduce:
This code:
protocol A {
	typealias O : B
}
protocol B {
	typealias O : A
}

Expected Results:
should not crash swiftc

Actual Results:
but totally does:
510 swift                         	0x0000000103a1c8bf swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource) + 655
511 swift                         	0x0000000103a1c8bf swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource) + 655


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!