-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Closed
Copy link
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfimprovementruntimeThe Swift RuntimeThe Swift Runtime
Description
Previous ID | SR-4744 |
Radar | None |
Original Reporter | garricn (JIRA User) |
Type | Improvement |
Status | Resolved |
Resolution | Won't Do |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Improvement, Runtime |
Assignee | None |
Priority | Medium |
md5: f63bdf0f8e3527e2918ab4f55f8dc55b
duplicates:
Issue Description:
According to https://twitter.com/garricn/status/858489431270936577 the following code should compile:
Apparently, this is a known issue:
import Foundation
@objc protocol SomeProtocol {}
extension SomeProtocol {
@objc func someFunction() {}
}
However, this code produces the following error at the second use of @objc:
@objc can only be used with members of classes, @objc protocols, and concrete extensions of classes
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfimprovementruntimeThe Swift RuntimeThe Swift Runtime