Skip to content

Commit 5854863

Browse files
authored
Fix failure in System.Reflection.Tests.GetTypeTests.GetType_InvalidAssemblyName (#114289)
Apply the fix to NativeAOT TypeNameResolver too Fixes #114288
1 parent b3e1d4a commit 5854863

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ internal partial struct TypeNameResolver
7575
bool ignoreCase,
7676
Assembly topLevelAssembly)
7777
{
78-
TypeName? parsed = TypeNameParser.Parse(typeName, throwOnError);
78+
TypeName? parsed = TypeNameParser.Parse(typeName, throwOnError, new() { IsAssemblyGetType = true });
7979

8080
if (parsed is null)
8181
{
8282
return null;
8383
}
84-
else if (topLevelAssembly is not null && parsed.AssemblyName is not null)
84+
else if (parsed.AssemblyName is not null)
8585
{
8686
return throwOnError ? throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly) : null;
8787
}

0 commit comments

Comments
 (0)