Skip to content

Commit 499bfe7

Browse files
committed
add HasValueTypeConstraint check
1 parent 8030c81 commit 499bfe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SourceGeneration.Reflection.SourceGenerator/Models/SourceMethodInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public bool CanInvoke()
2424

2525
if (IsGenericMethod)
2626
{
27-
if (TypeParameters.Any(x => x.HasUnmanagedTypeConstraint || x.HasTypeParameterInConstraintTypes || x.ConstraintTypes.Length > 1))
27+
if (TypeParameters.Any(x => x.HasUnmanagedTypeConstraint || x.HasValueTypeConstraint || x.HasTypeParameterInConstraintTypes || x.ConstraintTypes.Length > 1))
2828
return false;
2929

3030
if (Parameters.Any(x => !x.IsTypeParameter && x.HasNestedTypeParameter))

0 commit comments

Comments
 (0)