Skip to content

Commit 8b42212

Browse files
committed
Merge remote-tracking branch 'benlangmuir/fixit-protocol-comp'
Conflicts: lib/FrontendTool/FrontendTool.cpp test/FixCode/fixits-apply.swift test/FixCode/fixits-apply.swift.result
2 parents 008a57f + ec539d6 commit 8b42212

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,10 @@ class JSONFixitWriter : public DiagnosticConsumer {
636636
Info.ID == diag::selector_literal_deprecated_suggest.ID ||
637637
Info.ID == diag::attr_noescape_deprecated.ID ||
638638
Info.ID == diag::attr_autoclosure_escaping_deprecated.ID ||
639-
Info.ID == diag::any_as_anyobject_fixit.ID)
639+
Info.ID == diag::any_as_anyobject_fixit.ID ||
640+
Info.ID == diag::deprecated_protocol_composition.ID ||
641+
Info.ID == diag::deprecated_protocol_composition_single.ID ||
642+
Info.ID == diag::deprecated_any_composition.ID)
640643
return true;
641644

642645
return false;

test/FixCode/fixits-apply.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,9 @@ func testEnumRename() { _ = E.Abc }
240240
func testAnyToAnyObject(x: Any) {
241241
x.instMeth(p: 1)
242242
}
243+
244+
func testProtocolCompositionSyntax() {
245+
var _: protocol<>
246+
var _: protocol<Prot1>
247+
var _: protocol<Prot1, Prot2>
248+
}

test/FixCode/fixits-apply.swift.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,9 @@ func testEnumRename() { _ = E.Abc }
243243
func testAnyToAnyObject(x: Any) {
244244
(x as AnyObject).instMeth(p: 1)
245245
}
246+
247+
func testProtocolCompositionSyntax() {
248+
var _: Any
249+
var _: Prot1
250+
var _: Prot1 & Prot2
251+
}

0 commit comments

Comments
 (0)