You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-75 Referencing a protocol function crashes the compiler
Issue Description:
This crashes if you try to compile it with swiftc:
protocolTestProtocol {
funcprotocolFunction()
}
structImplementation: TestProtocol {
funcprotocolFunction() {
// no-op
}
}
letinstanceInArray = [Implementation()]
// If this line is included, compiler crashes.letresult = instanceInArray.compactMap(TestProtocol.protocolFunction)
// This line works and is what I was trying to write.// let result = instanceInArray.compactMap({ $0.protocolFunction() })// Just for comparison, this line doesn't crash.// let result = instanceInArray.compactMap(Implementation.protocolFunction)
Additional Detail from JIRA
md5: bd2967232bac84b265d95a3301317415
duplicates:
Issue Description:
This crashes if you try to compile it with swiftc:
Crashes without any options to swiftc:
swiftc version info:
The crash stack trace looks similar to SR-10343, but this crash can be reproduced without the optimization flag
-O
.The text was updated successfully, but these errors were encountered: