mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Otherwise, when a file contains a local enum, the decl for its synthesized == ends up disappearing, and we get a dangling XREF. rdar://problem/20429123 Swift SVN r28131
31 lines
496 B
Swift
31 lines
496 B
Swift
// Do not put any classes in this file. It's part of the test that no classes
|
|
// get serialized here.
|
|
|
|
enum TheEnum {
|
|
case A, B, C(MyClass)
|
|
}
|
|
|
|
enum EquatableEnum {
|
|
case A
|
|
}
|
|
|
|
|
|
@inline(never)
|
|
func useEquatable<T: Equatable>(_: T) {}
|
|
|
|
public func hasLocal() {
|
|
enum LocalEnum : Int {
|
|
case A, B
|
|
}
|
|
|
|
struct Wrapper {
|
|
enum LocalEnum : Int {
|
|
case A, B
|
|
}
|
|
}
|
|
|
|
// Make sure we can handle the == of local enums.
|
|
useEquatable(LocalEnum.A)
|
|
useEquatable(Wrapper.LocalEnum.A)
|
|
}
|