File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,17 @@ class JSONFixitWriter : public DiagnosticConsumer {
569
569
if (Info.ID == diag::objc_witness_selector_mismatch.ID ||
570
570
Info.ID == diag::witness_non_objc.ID )
571
571
return false ;
572
+ // The following interact badly with the swift migrator by removing @IB*
573
+ // attributes when there is some unrelated type issue.
574
+ if (Info.ID == diag::invalid_iboutlet.ID ||
575
+ Info.ID == diag::iboutlet_nonobjc_class.ID ||
576
+ Info.ID == diag::iboutlet_nonobjc_protocol.ID ||
577
+ Info.ID == diag::iboutlet_nonobject_type.ID ||
578
+ Info.ID == diag::iboutlet_only_mutable.ID ||
579
+ Info.ID == diag::invalid_ibdesignable_extension.ID ||
580
+ Info.ID == diag::invalid_ibinspectable.ID ||
581
+ Info.ID == diag::invalid_ibaction_decl.ID )
582
+ return false ;
572
583
573
584
if (Kind == DiagnosticKind::Error)
574
585
return true ;
Original file line number Diff line number Diff line change @@ -180,3 +180,18 @@ func evilCommas(s: String) {
180
180
181
181
import Empty
182
182
func testGenericSig( x: Empty < Int > ) -> Empty < String > { }
183
+
184
+ class NonObjC { }
185
+ protocol NonObjCProtocol { }
186
+ @objc class IBIssues {
187
+ @IBOutlet static private var ibout1 : IBIssues !
188
+ @IBOutlet private var ibout2 : NonObjC !
189
+ @IBOutlet private var ibout3 : NonObjCProtocol !
190
+ @IBOutlet private let ibout4 : IBIssues !
191
+ @IBOutlet private var ibout5 : [ [ IBIssues ] ] !
192
+ @IBOutlet private var ibout6 : [ String : String ] !
193
+ @IBInspectable static private var ibinspect1 : IBIssues !
194
+ @IBAction static func ibact( ) { }
195
+ }
196
+
197
+ @IBDesignable extension SomeProt { }
Original file line number Diff line number Diff line change @@ -183,3 +183,18 @@ func evilCommas(s: String) {
183
183
184
184
import Empty
185
185
func testGenericSig(x: Empty<Int>) -> Empty<String> {}
186
+
187
+ class NonObjC {}
188
+ protocol NonObjCProtocol {}
189
+ @objc class IBIssues {
190
+ @IBOutlet static private var ibout1: IBIssues!
191
+ @IBOutlet private var ibout2: NonObjC!
192
+ @IBOutlet private var ibout3: NonObjCProtocol!
193
+ @IBOutlet private let ibout4: IBIssues!
194
+ @IBOutlet private var ibout5: [[IBIssues]]!
195
+ @IBOutlet private var ibout6: [String:String]!
196
+ @IBInspectable static private var ibinspect1: IBIssues!
197
+ @IBAction static func ibact() {}
198
+ }
199
+
200
+ @IBDesignable extension SomeProt {}
You can’t perform that action at this time.
0 commit comments