Skip to content

Commit c1b3a1e

Browse files
committed
Fix HasDependentValueFieldInLayout stack overflow
1 parent efdec41 commit c1b3a1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/AST/ClassExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ public static bool HasDependentValueFieldInLayout(this Class @class,
257257
s => s.Layout.Fields.Any(
258258
f => f.QualifiedType.Type.TryGetDeclaration(
259259
out ClassTemplateSpecialization specialization) &&
260+
@class != specialization.TemplatedDecl.TemplatedClass &&
260261
specialization.TemplatedDecl.TemplatedClass.HasDependentValueFieldInLayout())));
261262

262263
public static IEnumerable<Property> GetConstCharFieldProperties(this Class @class) =>

0 commit comments

Comments
 (0)