Files
swift-mirror/test/Serialization/Inputs/use_imported_enums.swift
Doug Gregor c8b435757d [AST] Teach NormalProtocolConformance to resolve known, synthesized witnesses.
There are a number of type witnesses that are introduced by the Clang
importer. Immediately resolve those witnesses *without* going through
the type checker, because there are cases (i.e., deserialized SIL)
where the conformance is created but there is no type checker around.

Fixes rdar://problem/30364905, rdar://problem/31053701,
rdar://problem/31565413 / SR-4565.
2017-04-13 15:49:34 -07:00

10 lines
256 B
Swift

import Foundation
@inline(__always) @_transparent public func compareToSelf<T: Equatable>(_ t: T) -> Bool {
return t == t
}
@inline(__always) @_transparent public func compareImportedEnumToSelf(_ e: NSRuncingMode) -> Bool {
return compareToSelf(e)
}