Skip to content

Commit 515ffc6

Browse files
authored
Merge pull request #65514 from slavapestov/regression-test-rdar74794074
Add test case for #56636 / rdar://problem/74794074
2 parents 4182792 + c11371b commit 515ffc6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@import Foundation;
2+
3+
typedef NS_ENUM( uint32_t, Letter ) {
4+
a,
5+
b,
6+
};

test/ClangImporter/issue-56636.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %target-typecheck-verify-swift -import-objc-header %S/Inputs/issue-56636.h
2+
3+
// REQUIRES: objc_interop
4+
5+
extension Letter: Strideable {
6+
public func distance(to other: Self) -> RawValue.Stride {
7+
self.rawValue.distance( to: other.rawValue )
8+
}
9+
10+
public func advanced(by n: RawValue.Stride) -> Self {
11+
Self( rawValue: self.rawValue.advanced( by: n ) )!
12+
}
13+
}

0 commit comments

Comments
 (0)