-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[SR-7629] Wrong fixit when the type doesn't conform to a public protocol #50171
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
access controlFeature → modifiers: Access control and access levelsFeature → modifiers: Access control and access levelsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfconformancesFeature → protocol: protocol conformancesFeature → protocol: protocol conformancesdiagnostics qualityBug: The quality of compiler diagnosticsBug: The quality of compiler diagnosticsfix-itsFeature: diagnostic fix-itsFeature: diagnostic fix-itsgood first issueGood for newcomersGood for newcomersmemberwise initFeature: Memberwise structure initializersFeature: Memberwise structure initializerstype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Metadata
Metadata
Assignees
Labels
access controlFeature → modifiers: Access control and access levelsFeature → modifiers: Access control and access levelsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfconformancesFeature → protocol: protocol conformancesFeature → protocol: protocol conformancesdiagnostics qualityBug: The quality of compiler diagnosticsBug: The quality of compiler diagnosticsfix-itsFeature: diagnostic fix-itsFeature: diagnostic fix-itsgood first issueGood for newcomersGood for newcomersmemberwise initFeature: Memberwise structure initializersFeature: Memberwise structure initializerstype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Environment
Xcode 9.3, Swift 4.1
Additional Detail from JIRA
md5: 54986872b23e84cdf4f86614e935c40e
Issue Description:
This is my code without the protocol conformance
The error message -
Initializer 'init(rawValue:)' must be declared public because it matches a requirement in public protocol 'OptionSet'is correct, but the fixit inserts 'public' after 'struct' like this -