Files
swift-mirror/test/Serialization/Inputs/multi-file-2.swift
Jordan Rose 3cf2915dd0 [serialization] Force-serialize derived decls for local types too.
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
2015-05-04 21:57:00 +00:00

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)
}