mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
10 lines
256 B
Swift
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)
|
|
}
|