Skip to content

Commit

Permalink
fixes issue when trying to create an IActivator for abstract types (#…
Browse files Browse the repository at this point in the history
…8777)

Co-authored-by: Ledjon Behluli <[email protected]>
  • Loading branch information
ledjon-behluli and Ledjon Behluli authored Dec 15, 2023
1 parent d6894ae commit 30d2f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Orleans.CodeGenerator/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ bool ShouldIncludePrimaryConstructorParameters(INamedTypeSymbol t)
if (CopierGenerator.GenerateCopier(type, MetadataModel.DefaultCopiers) is { } copier)
AddMember(ns, copier);

if (!type.IsEnumType && (!type.IsValueType && type.IsEmptyConstructable && !type.UseActivator && type is not GeneratedInvokableDescription || type.HasActivatorConstructor))
if (!type.IsAbstractType && !type.IsEnumType && (!type.IsValueType && type.IsEmptyConstructable && !type.UseActivator && type is not GeneratedInvokableDescription || type.HasActivatorConstructor))
{
MetadataModel.ActivatableTypes.Add(type);

Expand Down

0 comments on commit 30d2f57

Please sign in to comment.