File tree 2 files changed +7
-3
lines changed
lib/ASTGen/Sources/ASTGen
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -554,12 +554,15 @@ func expandAttachedMacroIPC(
554
554
555
555
// Map the macro role.
556
556
let macroRole : PluginMessage . MacroRole
557
- switch MacroRole ( rawValue: rawMacroRole) {
557
+ switch MacroRole ( rawValue: rawMacroRole) ! {
558
558
case . Accessor: macroRole = . accessor
559
559
case . Member: macroRole = . member
560
560
case . MemberAttribute: macroRole = . memberAttribute
561
561
case . Peer: macroRole = . peer
562
- default :
562
+ case . Conformance: macroRole = . conformance
563
+ case
564
+ . Expression,
565
+ . FreestandingDeclaration:
563
566
preconditionFailure ( " unhandled macro role for attached macro " )
564
567
}
565
568
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ internal enum PluginToHostMessage: Codable {
40
40
}
41
41
42
42
/*namespace*/ internal enum PluginMessage {
43
- static var PROTOCOL_VERSION_NUMBER : Int { 1 }
43
+ static var PROTOCOL_VERSION_NUMBER : Int { 2 } // Added 'MacroRole.conformance'
44
44
45
45
struct PluginCapability : Codable {
46
46
var protocolVersion : Int
@@ -65,6 +65,7 @@ internal enum PluginToHostMessage: Codable {
65
65
case memberAttribute
66
66
case member
67
67
case peer
68
+ case conformance
68
69
}
69
70
70
71
struct SourceLocation : Codable {
You can’t perform that action at this time.
0 commit comments