Skip to content

Commit

Permalink
Fixed bug with creating of invalid type
Browse files Browse the repository at this point in the history
  • Loading branch information
Faolan-Rad committed May 7, 2024
1 parent 7dc3669 commit 08185cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/vm/typedesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ BOOL TypeVarTypeDesc::SatisfiesConstraints(SigTypeContext *pTypeContextOfConstra

if ((specialConstraints & gpDefaultConstructorConstraint) != 0)
{
if (thArg.IsTypeDesc() || (!thArg.AsMethodTable()->HasExplicitOrImplicitPublicDefaultConstructor()))
if (thArg.IsTypeDesc() || (!thArg.AsMethodTable()->HasExplicitOrImplicitPublicDefaultConstructor()) || thArg.IsAbstract())
return FALSE;
}

Expand Down

0 comments on commit 08185cd

Please sign in to comment.