Skip to content

Commit

Permalink
Fix for kekyo#105, stop endless loop, fix static constructor handling k…
Browse files Browse the repository at this point in the history
  • Loading branch information
cyborgyn committed Oct 13, 2021
1 parent f6bb406 commit 9091c5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion IL2C.Core/AssemblyPreparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public static PreparedInformations Prepare(TranslateContext translateContext)
// All types
type => true,
// The methods except type initializer.
method => !(method.IsConstructor && method.IsStatic));
method => true);
}
}
}
2 changes: 1 addition & 1 deletion IL2C.Core/Metadata/TypeInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public bool IsReferenceType
public bool IsRequiredTraverse =>
(this.Member.IsValueType &&
!this.Member.IsPrimitive && !this.Member.IsPointer && !this.IsByReference && !this.IsEnum &&
this.Fields.Any(f => f.FieldType.IsRequiredTraverse)) ||
this.Fields.Where(f => f.FieldType.FriendlyName != this.Member.FullName).Any(f => f.FieldType.IsRequiredTraverse)) ||
this.IsReferenceType;

private static int InternalGetStaticSizeOfValue(ITypeInformation type) =>
Expand Down

0 comments on commit 9091c5b

Please sign in to comment.