Skip to content

Commit a8165a3

Browse files
Fabio AndereggJordanL8
authored andcommitted
ignore operator= in static classes
1 parent 39d389a commit a8165a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Generator/AST/Utils.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public static bool CheckIgnoreMethod(Method method)
3939
if (method.Access == AccessSpecifier.Private && !method.IsOverride && !method.IsExplicitlyGenerated)
4040
return true;
4141

42+
// operator= does not make sense on static classes, but might be generated anyway, so ignore here
43+
if (method.OperatorKind == CXXOperatorKind.Equal && @class != null && @class.IsStatic)
44+
return true;
45+
4246
// Ignore copy constructor if a base class don't has or has a private copy constructor
4347
if (method.IsCopyConstructor)
4448
{

0 commit comments

Comments
 (0)