Skip to content

Commit 87cf79d

Browse files
Fix more compile errors.
1 parent b27ac49 commit 87cf79d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/TypeLoaderExceptionHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public static Exception CreateBadImageFormatException(ExceptionStringID id)
2626

2727
public static Exception CreateTypeLoadException(ExceptionStringID id, string typeName, string moduleName)
2828
{
29-
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName), typeName);
29+
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName)) { TypeName = typeName };
3030
}
3131

3232
public static Exception CreateTypeLoadException(ExceptionStringID id, string typeName, string moduleName, string messageArg)
3333
{
34-
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName, messageArg), typeName);
34+
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName, messageArg)) { TypeName = typeName };
3535
}
3636

3737
public static Exception CreateMissingFieldException(ExceptionStringID id, string fieldName)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static MethodInfo FilterAccessor(this MethodInfo accessor, bool nonPublic
7878
public static TypeLoadException CreateTypeLoadException(string typeName, string assemblyName)
7979
{
8080
string message = SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, typeName, assemblyName);
81-
return new TypeLoadException(message, typeName);
81+
return new TypeLoadException(message) { TypeName = typeName };
8282
}
8383

8484
// Escape identifiers as described in "Specifying Fully Qualified Type Names" on msdn.

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/TypeNameResolver.NativeAot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ internal partial struct TypeNameResolver
147147
throw new TypeLoadException(assembly is null ?
148148
SR.Format(SR.TypeLoad_ResolveType, escapedTypeName) :
149149
SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, escapedTypeName, assembly.FullName))
150-
{ TypeNameResolver = escapedTypeName };
150+
{ TypeName = escapedTypeName };
151151
}
152152
return null;
153153
}

0 commit comments

Comments
 (0)