diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs index 850f9e3..a6a2214 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs @@ -30,7 +30,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs index 803a1d7..56d6f17 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs @@ -28,7 +28,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs index a22e04e..fd7f330 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs index 27ec101..35b91ce 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs @@ -32,7 +32,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -52,7 +52,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs index 6969ec2..ae3f879 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs @@ -32,7 +32,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs index b19430c..779f88a 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs @@ -34,7 +34,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs index 85e0753..2b44a86 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs @@ -35,7 +35,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -59,7 +59,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -80,11 +80,11 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(float), ClosedType: typeof(float), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ) }, - GenericTypeGetter: receiver => receiver.Receive>(), + GenericTypeGetter: static receiver => receiver.Receive>(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -104,7 +104,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs index 1109609..9620158 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs index 6dfce2e..620e289 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -51,7 +51,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -71,7 +71,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -91,7 +91,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(InitArgsEnum), ClosedType: typeof(InitArgsEnum), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -111,7 +111,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(InitArgsEnum), ClosedType: typeof(InitArgsEnum), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -131,7 +131,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs index 20c7b00..e8cd47a 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs @@ -28,7 +28,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs index cacbaad..7b52abf 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs @@ -39,11 +39,11 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ) }, - GenericTypeGetter: receiver => receiver.Receive>(), + GenericTypeGetter: static receiver => receiver.Receive>(), GenericTypeGetter2: default ), new GenericType( @@ -58,20 +58,20 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ) }, - GenericTypeGetter: receiver => receiver.Receive>(), + GenericTypeGetter: static receiver => receiver.Receive>(), GenericTypeGetter2: default ) }, - GenericTypeGetter: receiver => receiver.Receive>>(), + GenericTypeGetter: static receiver => receiver.Receive>>(), GenericTypeGetter2: default ) }, - GenericTypeGetter: receiver => receiver.Receive, List>>>(), - GenericTypeGetter2: receiver => receiver.Receive, List>>() + GenericTypeGetter: static receiver => receiver.Receive, List>>>(), + GenericTypeGetter2: static receiver => receiver.Receive, List>>() ), Attributes: new System.Collections.Generic.Dictionary() { [typeof(TagAttribute)] = new System.Attribute[] { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs index aba1e1d..ea77808 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs index b0b6de0..d58a770 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -51,7 +51,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs index 1dbd72e..eb01953 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs @@ -39,7 +39,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(string), ClosedType: typeof(string), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -63,7 +63,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(float), ClosedType: typeof(float), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { @@ -83,7 +83,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { OpenType: typeof(int), ClosedType: typeof(int), Arguments: System.Array.Empty(), - GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter: static receiver => receiver.Receive(), GenericTypeGetter2: default ), Attributes: new System.Collections.Generic.Dictionary() { diff --git a/Chickensoft.Introspection.Generator.Tests/test_cases/UsingAmbiguity.cs b/Chickensoft.Introspection.Generator.Tests/test_cases/UsingAmbiguity.cs new file mode 100644 index 0000000..c37bebb --- /dev/null +++ b/Chickensoft.Introspection.Generator.Tests/test_cases/UsingAmbiguity.cs @@ -0,0 +1,14 @@ +namespace Chickensoft.Introspection.Generator.Tests.TestCases; + +using System.IO; +using Result = (int, string); + +public static class UsingAmbiguity { + // make sure tuple aliases don't interfere with using imports + public static Result DoSomething() => (1, "Hello"); + + public static void DoSomethingWithADisposable() { + // make sure using statements don't interfere with using imports + using var stream = new MemoryStream(); + } +} diff --git a/Chickensoft.Introspection.Generator/src/TypeGenerator.cs b/Chickensoft.Introspection.Generator/src/TypeGenerator.cs index 568a502..33da474 100644 --- a/Chickensoft.Introspection.Generator/src/TypeGenerator.cs +++ b/Chickensoft.Introspection.Generator/src/TypeGenerator.cs @@ -83,6 +83,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) { typeA.MergePartialDefinition(typeB) ) ) + .Where(type => type.Kind != DeclaredTypeKind.Error) .OrderBy(type => type.FullNameOpen); var uniqueTypes = uniqueTypeList.ToDictionary( @@ -479,7 +480,15 @@ TypeDeclarationSyntax type allUsings = allUsings.AddRange(comp.Usings); } } - return allUsings.Select(GetUsing).ToImmutableHashSet(); + return allUsings + // `Name` will be null if used as an alias for a tuple (unrelated to + // the using import directive). + // + // Note that we don't have access to the NamespaceOrType property + // introduced after Microsoft.CodeAnalysis.CSharp v4.4.0 which would + // reference the tuple aliasing. + .Where(@using => @using.Name is not null) + .Select(GetUsing).ToImmutableHashSet(); } public static UsingDirective GetUsing(UsingDirectiveSyntax @using) => diff --git a/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs b/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs index 4c84d4f..4099d27 100644 --- a/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs +++ b/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs @@ -243,7 +243,7 @@ DeclaredType declaredType Location: Location, BaseType: BaseType, Usings: Usings.Union(declaredType.Usings), - Kind: Kind, + Kind: PickDeclaredTypeKind(Kind, declaredType.Kind), IsStatic: PickIsStatic(declaredType.IsStatic), IsPublicOrInternal: PickIsPublicOrInternal(declaredType.IsPublicOrInternal), Properties @@ -257,6 +257,31 @@ DeclaredType declaredType internal Location PickSyntaxLocation(Location other) => HasIntrospectiveAttribute ? SyntaxLocation : other; + internal static DeclaredTypeKind PickDeclaredTypeKind( + DeclaredTypeKind kind, + DeclaredTypeKind other + ) => kind switch { + // both are the same — no change + _ when other == kind => kind, + + // abstract + concrete = abstract + DeclaredTypeKind.AbstractType when other is DeclaredTypeKind.ConcreteType + => DeclaredTypeKind.AbstractType, + DeclaredTypeKind.ConcreteType when other is DeclaredTypeKind.AbstractType + => DeclaredTypeKind.AbstractType, + // --- + + // static + concrete = static + DeclaredTypeKind.StaticClass when other is DeclaredTypeKind.ConcreteType + => DeclaredTypeKind.StaticClass, + DeclaredTypeKind.ConcreteType when other is DeclaredTypeKind.StaticClass + => DeclaredTypeKind.StaticClass, + // --- + + // no other combinations have valid results + _ => DeclaredTypeKind.Error + }; + internal bool PickIsStatic(bool other) => IsStatic || other; internal bool PickIsPublicOrInternal(bool other) => diff --git a/Chickensoft.Introspection.Generator/src/models/DeclaredTypeKind.cs b/Chickensoft.Introspection.Generator/src/models/DeclaredTypeKind.cs index e56dbe6..e507518 100644 --- a/Chickensoft.Introspection.Generator/src/models/DeclaredTypeKind.cs +++ b/Chickensoft.Introspection.Generator/src/models/DeclaredTypeKind.cs @@ -4,5 +4,6 @@ public enum DeclaredTypeKind { StaticClass, AbstractType, ConcreteType, - Interface + Interface, + Error } diff --git a/Chickensoft.Introspection/src/types/IIntrospective.cs b/Chickensoft.Introspection/src/types/IIntrospective.cs index 5e8b946..bae994b 100644 --- a/Chickensoft.Introspection/src/types/IIntrospective.cs +++ b/Chickensoft.Introspection/src/types/IIntrospective.cs @@ -30,8 +30,8 @@ public interface IIntrospective { /// Invokes the handler of each mixin that is applied to the type. /// public void InvokeMixins() { - foreach (var mixin in Metatype.Mixins) { - Metatype.MixinHandlers[mixin](this); + for (var i = 0; i < Metatype.Mixins.Count; i++) { + Metatype.MixinHandlers[Metatype.Mixins[i]](this); } }