You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes how we import from just protocol<> to the proper Any
type. This means that uses of AnyObject will either implicitly cast up
to Any, or must be explicitly cast through a temporary if used as an
lvalue. id as Any is still predicated on the id-as-any flags.
Copy file name to clipboardExpand all lines: test/ClangModules/objc_id_as_any.swift
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,12 @@ struct ArbitraryThing {}
15
15
idLover.takesId(ArbitraryThing())
16
16
17
17
varx:AnyObject=NSObject()
18
-
idLover.takesArray(ofId:&x)
18
+
idLover.takesArray(ofId:&x) // expected-error{{cannot pass immutable value as inout argument: implicit conversion from 'AnyObject' to 'Any' requires a temporary}}
0 commit comments