Hi, I'm facing curious situation like below
struct A<Element> {
var value: [Element]
}
extension A {
var value: [Element] { return [] }
}
this code make stopped on SIL generation. I'm expect redeclaration error or multimatching parameter but why just stopped SIL generate process. this code make An internal error occured. Source editor functionality is limited. Attempting to restore...
to your Xcode.
It is possible to get a clear error by specifying the generic type.
extension A where Element == Int
it make clear redeclaration error message.
or
A protocol declaration can also cause a proper error.
protocol P {
associatedtype Element
var value: [Element] { get }
}
struct A<Element>: P {
var value: [Element]
}
extension A {
var value: [Element] { return [] }
}
it make clear multiple matching error.
What problems of first codes make SIL generate crash? I seek your advice.
Best Regards,