From 5937091556888c5df502896605a74085d158baa3 Mon Sep 17 00:00:00 2001 From: TonEnfer Date: Mon, 9 Dec 2024 03:00:11 +0500 Subject: [PATCH] Fix build for Roslyn 4.0 --- src/Riok.Mapperly/Descriptors/SymbolAccessor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Riok.Mapperly/Descriptors/SymbolAccessor.cs b/src/Riok.Mapperly/Descriptors/SymbolAccessor.cs index aeb7265584..87ae1de103 100644 --- a/src/Riok.Mapperly/Descriptors/SymbolAccessor.cs +++ b/src/Riok.Mapperly/Descriptors/SymbolAccessor.cs @@ -143,7 +143,10 @@ internal bool TryUpgradeNullable(ITypeSymbol symbol, [NotNullWhen(true)] out ITy case INamedTypeSymbol { TypeArguments.Length: > 0 } namedSymbol: var upgradedTypeArguments = namedSymbol.TypeArguments.Select(UpgradeNullable).ToImmutableArray(); upgradedSymbol = namedSymbol - .ConstructedFrom.Construct(upgradedTypeArguments, [.. upgradedTypeArguments.Select(ta => ta.NullableAnnotation)]) + .ConstructedFrom.Construct( + upgradedTypeArguments, + upgradedTypeArguments.Select(ta => ta.NullableAnnotation).ToImmutableArray() + ) .WithNullableAnnotation(NullableAnnotation.Annotated); break;