File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
lib/ASTGen/Sources/ASTGen Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -554,12 +554,15 @@ func expandAttachedMacroIPC(
554554
555555 // Map the macro role.
556556 let macroRole : PluginMessage . MacroRole
557- switch MacroRole ( rawValue: rawMacroRole) {
557+ switch MacroRole ( rawValue: rawMacroRole) ! {
558558 case . Accessor: macroRole = . accessor
559559 case . Member: macroRole = . member
560560 case . MemberAttribute: macroRole = . memberAttribute
561561 case . Peer: macroRole = . peer
562- default :
562+ case . Conformance: macroRole = . conformance
563+ case
564+ . Expression,
565+ . FreestandingDeclaration:
563566 preconditionFailure ( " unhandled macro role for attached macro " )
564567 }
565568
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ internal enum PluginToHostMessage: Codable {
4040}
4141
4242/*namespace*/ internal enum PluginMessage {
43- static var PROTOCOL_VERSION_NUMBER : Int { 1 }
43+ static var PROTOCOL_VERSION_NUMBER : Int { 2 } // Added 'MacroRole.conformance'
4444
4545 struct PluginCapability : Codable {
4646 var protocolVersion : Int
@@ -65,6 +65,7 @@ internal enum PluginToHostMessage: Codable {
6565 case memberAttribute
6666 case member
6767 case peer
68+ case conformance
6869 }
6970
7071 struct SourceLocation : Codable {
You can’t perform that action at this time.
0 commit comments