Skip to content

Commit

Permalink
Fix for #105, stop endless loop, fix static constructor handling #97, #…
Browse files Browse the repository at this point in the history
…98

Cherry picked from 9091c5b
  • Loading branch information
cyborgyn authored and kekyo committed May 28, 2022
1 parent 412536c commit 2cbb6f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/IL2C.Core/AssemblyPreparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public static PreparedInformations Prepare(TranslateContext translateContext)
// All types
type => !type.IsIgnoreTranslation,
// The methods except type initializer.
method => !(method.IsConstructor && method.IsStatic));
method => true);
}
}
}
2 changes: 1 addition & 1 deletion src/IL2C.Core/Metadata/TypeInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,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 2cbb6f1

Please sign in to comment.