Skip to content

Commit

Permalink
Skip compiler-generated ctors in records
Browse files Browse the repository at this point in the history
In externally defined symbols, we need to also check for `[CompilerGenerated]`.
  • Loading branch information
kzu committed Aug 17, 2024
1 parent 3e5edc5 commit 85ae45a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public bool IsEmptyConstructable
t = t.BaseType;
}

foreach (var ctor in Type.Constructors)
foreach (var ctor in Type.Constructors.Where(x => x.IsImplicitlyDeclared))
{
if (ctor.Parameters.Length != 0)
{
Expand Down

0 comments on commit 85ae45a

Please sign in to comment.