mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add test case for https://github.com/apple/swift/issues/56636 / rdar://problem/74794074
This commit is contained in:
6
test/ClangImporter/Inputs/issue-56636.h
Normal file
6
test/ClangImporter/Inputs/issue-56636.h
Normal file
@@ -0,0 +1,6 @@
|
||||
@import Foundation;
|
||||
|
||||
typedef NS_ENUM( uint32_t, Letter ) {
|
||||
a,
|
||||
b,
|
||||
};
|
||||
13
test/ClangImporter/issue-56636.swift
Normal file
13
test/ClangImporter/issue-56636.swift
Normal file
@@ -0,0 +1,13 @@
|
||||
// RUN: %target-typecheck-verify-swift -import-objc-header %S/Inputs/issue-56636.h
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
extension Letter: Strideable {
|
||||
public func distance(to other: Self) -> RawValue.Stride {
|
||||
self.rawValue.distance( to: other.rawValue )
|
||||
}
|
||||
|
||||
public func advanced(by n: RawValue.Stride) -> Self {
|
||||
Self( rawValue: self.rawValue.advanced( by: n ) )!
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user