File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,18 @@ extension Y: P where T: P { }
8
8
9
9
public struct Z : P { }
10
10
11
+ infix operator <<<
12
+ infix operator >>>
13
+ infix operator <>
14
+
11
15
extension X {
12
16
public func XinA( ) { }
17
+
18
+ public static func << < ( a: Self , b: Self ) -> Self { a }
13
19
}
14
20
15
21
extension Y {
16
22
public func YinA( ) { }
23
+
24
+ public static func << < ( a: Self , b: Self ) -> Self { a }
17
25
}
Original file line number Diff line number Diff line change 1
1
import extensions_A
2
2
3
+
3
4
extension X {
4
5
public func XinB( ) { }
6
+
7
+ public static func >>> ( a: Self , b: Self ) -> Self { b }
5
8
}
6
9
7
10
extension Y {
8
11
public func YinB( ) { }
12
+
13
+ public static func >>> ( a: Self , b: Self ) -> Self { b }
9
14
}
10
15
Original file line number Diff line number Diff line change 1
1
@_exported import extensions_A
2
2
import extensions_B
3
3
4
+
4
5
extension X {
5
6
public func XinC( ) { }
7
+
8
+ public static func <> ( a: Self , b: Self ) -> Self { a }
6
9
}
7
10
8
11
extension Y {
9
12
public func YinC( ) { }
10
- }
11
13
14
+ public static func <> ( a: Self , b: Self ) -> Self { a }
15
+ }
Original file line number Diff line number Diff line change 7
7
import extensions_C
8
8
// expected-note 2{{add import of module 'extensions_B'}}{{1-1=import extensions_B\n}}
9
9
func test( x: X , y: Y < Z > ) {
10
+ // Declared in extensions_A
10
11
x. XinA ( )
11
12
y. YinA ( )
13
+ _ = x <<< x
14
+ _ = y <<< y
12
15
16
+ // Declared in extensions_B
13
17
x. XinB ( ) // expected-error{{instance method 'XinB()' is not available due to missing import of defining module 'extensions_B'}}
14
18
y. YinB ( ) // expected-error{{instance method 'YinB()' is not available due to missing import of defining module 'extensions_B'}}
19
+ _ = x >>> x // expected-error{{cannot find operator '>>>' in scope}}
20
+ _ = y >>> y // expected-error{{cannot find operator '>>>' in scope}}
15
21
22
+ // Declared in extensions_C
16
23
x. XinC ( )
17
24
y. YinC ( )
25
+ _ = x <> x
26
+ _ = y <> y
18
27
}
You can’t perform that action at this time.
0 commit comments