mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Improve the diagnostic message when using an existential
This commit is contained in:
@@ -13,6 +13,6 @@ public typealias AnyObject = Builtin.AnyObject
|
||||
precedencegroup AssignmentPrecedence { assignment: true }
|
||||
|
||||
public func foo(_ x: AnyObject) {
|
||||
_ = type(of: x) // expected-error {{existential can cause metadata allocation or locks}}
|
||||
_ = type(of: x) // expected-error {{Existential type 'AnyObject' is unavailable in embedded Swift}}
|
||||
// expected-note@-1 {{called from here}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user