diff --git a/src/StreamJsonRpc.Analyzers/ProxyGenerator.cs b/src/StreamJsonRpc.Analyzers/ProxyGenerator.cs index 4ec1a958..ae4edf42 100644 --- a/src/StreamJsonRpc.Analyzers/ProxyGenerator.cs +++ b/src/StreamJsonRpc.Analyzers/ProxyGenerator.cs @@ -396,7 +396,10 @@ private static IEnumerable ExpandInterfaceToGroups(INamedTyp yield return [primary]; // And if RpcMarshalable optional interfaces were specified, add them to another group. - yield return [primary, .. optionalMarshalableInterfaces]; + if (optionalMarshalableInterfaces.Count > 0) + { + yield return [primary, .. optionalMarshalableInterfaces]; + } } }