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
Nothing in an `@_objcImplementation` block—including Swift-only declarations—should ever require a vtable entry. Diagnose any such members.
The diagnostic emitted here is intended to be a fallback that will be used when a vtable entry is needed but we don’t know the specific reason. A future commit will add a more specific diagnostic for Swift-only non-convenience inits.
Copy file name to clipboardExpand all lines: test/decl/ext/objc_implementation.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -203,11 +203,11 @@ protocol EmptySwiftProto {}
203
203
}
204
204
205
205
@nonobjcpublicinit(notFromHeader4:CInt){
206
-
// FIXME: Should be an error; requires a vtable entry
206
+
// expected-warning@-1 {{initializer 'init(notFromHeader4:)' is not valid in an '@_objcImplementation' extension because it is an overridable Swift-only initializer}}
207
207
}
208
208
209
209
@nonobjcpublicrequiredinit(notFromHeader5:CInt){
210
-
// FIXME: Should be an error; requires a vtable entry
210
+
// expected-warning@-1 {{initializer 'init(notFromHeader5:)' is not valid in an '@_objcImplementation' extension because it is an overridable Swift-only initializer}}
0 commit comments