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 { }
88
99public struct Z : P { }
1010
11+ infix operator <<<
12+ infix operator >>>
13+ infix operator <>
14+
1115extension X {
1216 public func XinA( ) { }
17+
18+ public static func << < ( a: Self , b: Self ) -> Self { a }
1319}
1420
1521extension Y {
1622 public func YinA( ) { }
23+
24+ public static func << < ( a: Self , b: Self ) -> Self { a }
1725}
Original file line number Diff line number Diff line change 11import extensions_A
22
3+
34extension X {
45 public func XinB( ) { }
6+
7+ public static func >>> ( a: Self , b: Self ) -> Self { b }
58}
69
710extension Y {
811 public func YinB( ) { }
12+
13+ public static func >>> ( a: Self , b: Self ) -> Self { b }
914}
1015
Original file line number Diff line number Diff line change 11@_exported import extensions_A
22import extensions_B
33
4+
45extension X {
56 public func XinC( ) { }
7+
8+ public static func <> ( a: Self , b: Self ) -> Self { a }
69}
710
811extension Y {
912 public func YinC( ) { }
10- }
1113
14+ public static func <> ( a: Self , b: Self ) -> Self { a }
15+ }
Original file line number Diff line number Diff line change 77import extensions_C
88// expected-note 2{{add import of module 'extensions_B'}}{{1-1=import extensions_B\n}}
99func test( x: X , y: Y < Z > ) {
10+ // Declared in extensions_A
1011 x. XinA ( )
1112 y. YinA ( )
13+ _ = x <<< x
14+ _ = y <<< y
1215
16+ // Declared in extensions_B
1317 x. XinB ( ) // expected-error{{instance method 'XinB()' is not available due to missing import of defining module 'extensions_B'}}
1418 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}}
1521
22+ // Declared in extensions_C
1623 x. XinC ( )
1724 y. YinC ( )
25+ _ = x <> x
26+ _ = y <> y
1827}
You can’t perform that action at this time.
0 commit comments