File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name CurrentModule -D CURRENT_MODULE | %FileCheck %s --check-prefix=CHECK-SAMEMAJOR --check-prefix=CHECK-DIFFMAJOR
2
+
3
+ @available ( OSX 10 . 8 , * )
4
+ @_originallyDefinedIn ( module: " OriginalModule " , macOS 10 . 10 )
5
+ public struct Entity {
6
+ public func addEntity( _ e: Entity ) { }
7
+ public func removeEntity( _ e: Entity ) { }
8
+ }
9
+
10
+ // CHECK-SAMEMAJOR: $ld$hide$os10.8$_$s14OriginalModule6EntityVN
11
+ // CHECK-SAMEMAJOR: $ld$hide$os10.9$_$s14OriginalModule6EntityVN
12
+ // CHECK-SAMEMAJOR-NOT: $ld$hide$os10.10$_$s14OriginalModule6EntityVN
13
+
14
+ @available ( OSX 9 . 8 , * )
15
+ @_originallyDefinedIn ( module: " OriginalModule " , macOS 10 . 10 )
16
+ public struct OldEntity {
17
+ public func addEntity( _ e: Entity ) { }
18
+ public func removeEntity( _ e: Entity ) { }
19
+ }
20
+
21
+ // CHECK-DIFFMAJOR: $ld$hide$os9.9$_$s14OriginalModule9OldEntityVN
22
+ // CHECK-DIFFMAJOR: $ld$hide$os9.13$_$s14OriginalModule9OldEntityVN
23
+ // CHECK-DIFFMAJOR: $ld$hide$os9.30$_$s14OriginalModule9OldEntityVN
24
+ // CHECK-DIFFMAJOR: $ld$hide$os10.8$_$s14OriginalModule9OldEntityVN
25
+ // CHECK-DIFFMAJOR: $ld$hide$os10.9$_$s14OriginalModule9OldEntityVN
26
+ // CHECK-DIFFMAJOR-NOT: $ld$hide$os10.10$_$s14OriginalModule9OldEntityVN
Original file line number Diff line number Diff line change 3
3
4
4
#if CURRENT_MODULE
5
5
6
+ @available ( OSX 10 . 8 , * )
6
7
@_originallyDefinedIn ( module: " OriginalModule " , macOS 10 . 15 )
7
8
public struct Entity {
8
9
public func addEntity( _ e: Entity ) { }
9
10
public func removeEntity( _ e: Entity ) { }
10
11
}
11
12
13
+ @available ( OSX 10 . 8 , * )
12
14
@_originallyDefinedIn ( module: " OriginalModule " , macOS 10 . 15 )
13
15
public protocol Movable {
14
16
func MovableFuncFoo( )
15
17
}
16
18
17
19
public protocol Unmoveable { }
18
20
21
+ @available ( OSX 10 . 8 , * )
19
22
@_originallyDefinedIn ( module: " OriginalModule " , macOS 10 . 15 )
20
23
public class MovedClass : Movable , Unmoveable {
21
24
public func MovableFuncFoo( ) { }
You can’t perform that action at this time.
0 commit comments