File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,11 @@ func basicSubtyping(
99
99
let _ = Unrelated ( ) as? Derived & P2 // expected-warning {{always fails}}
100
100
let _ = baseAndP2 as Unrelated // expected-error {{cannot convert value of type 'Base<Int> & P2' to type 'Unrelated' in coercion}}
101
101
let _ = baseAndP2 as? Unrelated // expected-warning {{always fails}}
102
- let _ = Unrelated ( ) as AnyObject
103
- let _ = Unrelated ( ) as? AnyObject // expected-warning {{always succeeds}}
102
+
103
+ // Different behavior on Linux vs Darwin because of id-as-Any.
104
+ // let _ = Unrelated() as AnyObject
105
+ // let _ = Unrelated() as? AnyObject
106
+
104
107
let _ = anyObject as Unrelated // expected-error {{'AnyObject' is not convertible to 'Unrelated'; did you mean to use 'as!' to force downcast?}}
105
108
let _ = anyObject as? Unrelated
106
109
You can’t perform that action at this time.
0 commit comments