diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs index e4e5246..297b6ff 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs @@ -43,6 +43,7 @@ public partial class TypeRegistry : Chickensoft.Introspection.ITypeRegistry { [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildOne)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("ConcreteChildOne", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildOne.MetatypeMetadata(), "concrete_child_one", 1), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildTwo)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("ConcreteChildTwo", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildTwo.MetatypeMetadata(), "concrete_child_two", 1), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.DerivedModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DerivedModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.DerivedModel.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ExampleStruct)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ExampleStruct", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.GenericStruct<>)] = new Chickensoft.Introspection.TypeMetadata("GenericStruct"), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.InitArgsModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("InitArgsModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.InitArgsModel.MetatypeMetadata(), "init_args_model", 1), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.JunkAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("JunkAttribute", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), diff --git a/Chickensoft.Introspection.Generator.Tests/Chickensoft.Introspection.Generator.Tests.csproj b/Chickensoft.Introspection.Generator.Tests/Chickensoft.Introspection.Generator.Tests.csproj index 4c1923f..c981d2d 100644 --- a/Chickensoft.Introspection.Generator.Tests/Chickensoft.Introspection.Generator.Tests.csproj +++ b/Chickensoft.Introspection.Generator.Tests/Chickensoft.Introspection.Generator.Tests.csproj @@ -15,6 +15,8 @@ true + + CA1010;NU1903 @@ -38,6 +40,7 @@ + diff --git a/Chickensoft.Introspection.Generator.Tests/test_cases/GlobalUsing.cs b/Chickensoft.Introspection.Generator.Tests/test_cases/GlobalUsing.cs new file mode 100644 index 0000000..1f2a3c9 --- /dev/null +++ b/Chickensoft.Introspection.Generator.Tests/test_cases/GlobalUsing.cs @@ -0,0 +1,6 @@ +#pragma warning disable IDE0005 // Using directive is unnecessary. +global using MyExampleStruct = + Chickensoft.Introspection.Generator.Tests.TestCases.ExampleStruct; +global using MyOutsideExampleStruct = + Chickensoft.Introspection.OutsideAssemblyForTests.ExampleStruct; +#pragma warning restore IDE0005 // Using directive is unnecessary. diff --git a/Chickensoft.Introspection.Generator.Tests/test_cases/GlobalUsingValueType.cs b/Chickensoft.Introspection.Generator.Tests/test_cases/GlobalUsingValueType.cs new file mode 100644 index 0000000..8290659 --- /dev/null +++ b/Chickensoft.Introspection.Generator.Tests/test_cases/GlobalUsingValueType.cs @@ -0,0 +1,3 @@ +namespace Chickensoft.Introspection.Generator.Tests.TestCases; + +public readonly record struct ExampleStruct; diff --git a/Chickensoft.Introspection.OutsideAssemblyForTests/Chickensoft.Introspection.OutsideAssemblyForTests.csproj b/Chickensoft.Introspection.OutsideAssemblyForTests/Chickensoft.Introspection.OutsideAssemblyForTests.csproj new file mode 100644 index 0000000..d35d8ff --- /dev/null +++ b/Chickensoft.Introspection.OutsideAssemblyForTests/Chickensoft.Introspection.OutsideAssemblyForTests.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + disable + enable + + + diff --git a/Chickensoft.Introspection.OutsideAssemblyForTests/ExampleStruct.cs b/Chickensoft.Introspection.OutsideAssemblyForTests/ExampleStruct.cs new file mode 100644 index 0000000..bcaeb91 --- /dev/null +++ b/Chickensoft.Introspection.OutsideAssemblyForTests/ExampleStruct.cs @@ -0,0 +1,3 @@ +namespace Chickensoft.Introspection.OutsideAssemblyForTests; + +public readonly record struct ExampleStruct; diff --git a/Chickensoft.Introspection.Tests/Chickensoft.Introspection.Tests.csproj b/Chickensoft.Introspection.Tests/Chickensoft.Introspection.Tests.csproj index 047c3f3..203e53d 100644 --- a/Chickensoft.Introspection.Tests/Chickensoft.Introspection.Tests.csproj +++ b/Chickensoft.Introspection.Tests/Chickensoft.Introspection.Tests.csproj @@ -16,6 +16,8 @@ true + + NU1903 diff --git a/global.json b/global.json index 85721c3..2c56923 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "7.0.404", + "version": "9.0.100", "rollForward": "latestMinor" }, "msbuild-sdks": { "Godot.NET.Sdk": "4.2.2" } -} +} \ No newline at end of file