diff --git a/Funcky.DiscriminatedUnion.SourceGeneration/Emitter.cs b/Funcky.DiscriminatedUnion.SourceGeneration/Emitter.cs index 4392e88..b457a8a 100644 --- a/Funcky.DiscriminatedUnion.SourceGeneration/Emitter.cs +++ b/Funcky.DiscriminatedUnion.SourceGeneration/Emitter.cs @@ -69,7 +69,7 @@ private static void WriteTupleReturningPartitionExtension(DiscriminatedUnion dis var namedResultPartitions = discriminatedUnion .Variants .JoinToInterpolation( - v => $"global::System.Collections.Generic.IReadOnlyList<{discriminatedUnion.Type.Identifier}.{v.LocalTypeName}> {v.ParameterName}", + v => $"global::System.Collections.Generic.IReadOnlyList<{discriminatedUnion.Type.Identifier}.{v.LocalTypeName}> {v.ParameterName[..1].ToUpper()}{v.ParameterName[1..]}", ", "); writer.WriteLineInterpolated($"public static ({namedResultPartitions}) Partition(this global::System.Collections.Generic.IEnumerable<{discriminatedUnion.Type.Identifier}> source)"); diff --git a/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedNestedUnionWithPartition.01.verified.cs b/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedNestedUnionWithPartition.01.verified.cs index 958c82b..9c3bf92 100644 --- a/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedNestedUnionWithPartition.01.verified.cs +++ b/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedNestedUnionWithPartition.01.verified.cs @@ -40,7 +40,7 @@ partial record Integer [global::System.CodeDom.Compiler.GeneratedCode("Funcky.DiscriminatedUnion.SourceGeneration", "1.2.0.0")] public static partial class FlattenedNestedUnionWithPartitionEnumerableExtensions { - public static (global::System.Collections.Generic.IReadOnlyList keyword, global::System.Collections.Generic.IReadOnlyList integer) Partition(this global::System.Collections.Generic.IEnumerable source) + public static (global::System.Collections.Generic.IReadOnlyList Keyword, global::System.Collections.Generic.IReadOnlyList Integer) Partition(this global::System.Collections.Generic.IEnumerable source) { var keywordItems = new global::System.Collections.Generic.List(); var integerItems = new global::System.Collections.Generic.List(); diff --git a/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedUnionWithPartition.01.verified.cs b/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedUnionWithPartition.01.verified.cs index d3389f9..6bc51e7 100644 --- a/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedUnionWithPartition.01.verified.cs +++ b/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=FlattenedUnionWithPartition.01.verified.cs @@ -34,7 +34,7 @@ partial record Integer [global::System.CodeDom.Compiler.GeneratedCode("Funcky.DiscriminatedUnion.SourceGeneration", "1.2.0.0")] public static partial class FlattenedUnionWithPartitionEnumerableExtensions { - public static (global::System.Collections.Generic.IReadOnlyList keyword, global::System.Collections.Generic.IReadOnlyList integer) Partition(this global::System.Collections.Generic.IEnumerable source) + public static (global::System.Collections.Generic.IReadOnlyList Keyword, global::System.Collections.Generic.IReadOnlyList Integer) Partition(this global::System.Collections.Generic.IEnumerable source) { var keywordItems = new global::System.Collections.Generic.List(); var integerItems = new global::System.Collections.Generic.List(); diff --git a/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=UnionWithPartitionUsage.01.verified.cs b/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=UnionWithPartitionUsage.01.verified.cs index ed7144c..be2fb07 100644 --- a/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=UnionWithPartitionUsage.01.verified.cs +++ b/Funcky.DiscriminatedUnion.Test/SourceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=UnionWithPartitionUsage.01.verified.cs @@ -43,7 +43,7 @@ partial record Error [global::System.CodeDom.Compiler.GeneratedCode("Funcky.DiscriminatedUnion.SourceGeneration", "1.2.0.0")] public static partial class UnionWithPartitionUsageEnumerableExtensions { - public static (global::System.Collections.Generic.IReadOnlyList success, global::System.Collections.Generic.IReadOnlyList warning, global::System.Collections.Generic.IReadOnlyList error) Partition(this global::System.Collections.Generic.IEnumerable source) + public static (global::System.Collections.Generic.IReadOnlyList Success, global::System.Collections.Generic.IReadOnlyList Warning, global::System.Collections.Generic.IReadOnlyList Error) Partition(this global::System.Collections.Generic.IEnumerable source) { var successItems = new global::System.Collections.Generic.List(); var warningItems = new global::System.Collections.Generic.List();