Skip to content

Use + to separate a declaring type and a nested type in full name #459

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

Merged
merged 2 commits into from
Jun 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cpp2IL.Core.Tests/AccessibilityExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void AccessibilityTests()
var coreModule = appContext.AssembliesByName["UnityEngine.CoreModule"];

var console = GetTypeByFullName(mscorlib, "System.Console"); //public
var consoleWindowsConsole = GetTypeByFullName(mscorlib, "System.Console.WindowsConsole"); //private nested
var consoleWindowsConsole = GetTypeByFullName(mscorlib, "System.Console+WindowsConsole"); //private nested
var dateTimeFormat = GetTypeByFullName(mscorlib, "System.DateTimeFormat"); //internal
var gameObject = GetTypeByFullName(coreModule, "UnityEngine.GameObject"); //public
Assert.Multiple(() =>
Expand Down
2 changes: 1 addition & 1 deletion Cpp2IL.Core/Model/Contexts/TypeAnalysisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public string FullName
get
{
if (DeclaringType != null)
return DeclaringType.FullName + "." + Name;
return DeclaringType.FullName + "+" + Name;

if (string.IsNullOrEmpty(Namespace))
return Name;
Expand Down
2 changes: 1 addition & 1 deletion LibCpp2IL/Metadata/Il2CppTypeDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
if (LibCpp2IlMain.MetadataVersion < 24.2f)
{
//No codegen modules here.
return LibCpp2IlMain.TheMetadata!.RgctxDefinitions.Skip(RgctxStartIndex).Take(RgctxCount).ToArray();

Check warning on line 142 in LibCpp2IL/Metadata/Il2CppTypeDefinition.cs

View workflow job for this annotation

GitHub Actions / Build Single-File Artifact (win-x64, Cpp2IL)

Possible null reference argument for parameter 'source' in 'IEnumerable<Il2CppRGCTXDefinition> Enumerable.Skip<Il2CppRGCTXDefinition>(IEnumerable<Il2CppRGCTXDefinition> source, int count)'.

Check warning on line 142 in LibCpp2IL/Metadata/Il2CppTypeDefinition.cs

View workflow job for this annotation

GitHub Actions / Build Single-File Artifact (osx-x64, Cpp2IL)

Possible null reference argument for parameter 'source' in 'IEnumerable<Il2CppRGCTXDefinition> Enumerable.Skip<Il2CppRGCTXDefinition>(IEnumerable<Il2CppRGCTXDefinition> source, int count)'.

Check warning on line 142 in LibCpp2IL/Metadata/Il2CppTypeDefinition.cs

View workflow job for this annotation

GitHub Actions / Build Single-File Artifact (linux-x64, Cpp2IL)

Possible null reference argument for parameter 'source' in 'IEnumerable<Il2CppRGCTXDefinition> Enumerable.Skip<Il2CppRGCTXDefinition>(IEnumerable<Il2CppRGCTXDefinition> source, int count)'.

Check warning on line 142 in LibCpp2IL/Metadata/Il2CppTypeDefinition.cs

View workflow job for this annotation

GitHub Actions / Run Tests & Publish Dev Package

Possible null reference argument for parameter 'source' in 'IEnumerable<Il2CppRGCTXDefinition> Enumerable.Skip<Il2CppRGCTXDefinition>(IEnumerable<Il2CppRGCTXDefinition> source, int count)'.

Check warning on line 142 in LibCpp2IL/Metadata/Il2CppTypeDefinition.cs

View workflow job for this annotation

GitHub Actions / Run Tests & Publish Dev Package

Possible null reference argument for parameter 'source' in 'IEnumerable<Il2CppRGCTXDefinition> Enumerable.Skip<Il2CppRGCTXDefinition>(IEnumerable<Il2CppRGCTXDefinition> source, int count)'.
}

var cgm = CodeGenModule;
Expand Down Expand Up @@ -208,7 +208,7 @@
return null;

if (DeclaringType != null)
return $"{DeclaringType.FullName}/{Name}";
return $"{DeclaringType.FullName}+{Name}";

return $"{(string.IsNullOrEmpty(Namespace) ? "" : $"{Namespace}.")}{Name}";
}
Expand Down
Loading