Skip to content

Commit fea7878

Browse files
committed
Auto-apply the new generic parameter fix-it during migration.
Last bit of rdar://problem/27087345.
1 parent 1d7ad9e commit fea7878

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ class JSONFixitWriter : public DiagnosticConsumer {
650650
Info.ID == diag::deprecated_protocol_composition.ID ||
651651
Info.ID == diag::deprecated_protocol_composition_single.ID ||
652652
Info.ID == diag::deprecated_any_composition.ID ||
653-
Info.ID == diag::deprecated_operator_body.ID)
653+
Info.ID == diag::deprecated_operator_body.ID ||
654+
Info.ID == diag::unbound_generic_parameter_explicit_fix.ID)
654655
return true;
655656

656657
return false;

test/FixCode/fixits-apply.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ var graph: Graph3
189189

190190
class Graph4<NodeType : SomeProt> {}
191191
var graph: Graph4
192+
var graphAgain = Graph4()
192193

193194
class GraphCombo<NodeType : SomeProt & ObjCProt> {}
194195
var graph: GraphCombo

test/FixCode/fixits-apply.swift.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ var graph: Graph3<ObjCProt>
192192

193193
class Graph4<NodeType : SomeProt> {}
194194
var graph: Graph4<<#NodeType: SomeProt#>>
195+
var graphAgain = Graph4<<#NodeType: SomeProt#>>()
195196

196197
class GraphCombo<NodeType : SomeProt & ObjCProt> {}
197198
var graph: GraphCombo<<#NodeType: ObjCProt & SomeProt#>>

0 commit comments

Comments
 (0)