Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolution of nested type names is inconsistent between MonoVM and CoreCLR #112132

Open
filipnavara opened this issue Feb 4, 2025 · 3 comments
Open
Labels
area-VM-reflection-mono Reflection issues specific to MonoVM untriaged New issue has not been triaged by the area owner

Comments

@filipnavara
Copy link
Member

filipnavara commented Feb 4, 2025

Consider the following code:

using System;

Console.WriteLine(typeof(object).Assembly.GetType("Mono.RuntimeStructs") != null);
Console.WriteLine(Type.GetType($"Foo/Bar, {typeof(Foo).Assembly.FullName}"));
Console.WriteLine(Type.GetType($"Foo+Bar, {typeof(Foo).Assembly.FullName}"));

class Foo
{
    class Bar
    {

    }
}

On MonoVM it prints:

true
Foo+Bar
Foo+Bar

On CoreCLR it prints:

false

Foo+Bar

I thought the type name parser was unified as of .NET 9 but apparently there's still an inconsistency.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Feb 4, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.

@jkotas jkotas added area-VM-reflection-mono Reflection issues specific to MonoVM and removed area-System.Reflection labels Feb 4, 2025
@teo-tsirpanis
Copy link
Contributor

teo-tsirpanis commented Feb 4, 2025

Likely related to Mono test failures in #111598. e1f044c might fix it.

@jkotas
Copy link
Member

jkotas commented Feb 4, 2025

I thought the type name parser was unified as of .NET 9 but apparently there's still an inconsistency.

Mono type name parsers are not completely unified:

_mono_reflection_parse_type (char *name, char **endptr, gboolean is_recursed,

private static TypeSpec Parse(string name, ref int p, bool is_recurse, bool allow_aqn)

Related/duplicate #45033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-reflection-mono Reflection issues specific to MonoVM untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

3 participants