From b2efde43bf6394a9080122feca0f25ace20ec826 Mon Sep 17 00:00:00 2001 From: hadashiA Date: Fri, 21 Jun 2024 13:06:46 +0900 Subject: [PATCH] Fix compilation error for C# 7 --- .../Internal/InstanceProviders/CollectionInstanceProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VContainer/Assets/VContainer/Runtime/Internal/InstanceProviders/CollectionInstanceProvider.cs b/VContainer/Assets/VContainer/Runtime/Internal/InstanceProviders/CollectionInstanceProvider.cs index b90cf9f6..5532c376 100644 --- a/VContainer/Assets/VContainer/Runtime/Internal/InstanceProviders/CollectionInstanceProvider.cs +++ b/VContainer/Assets/VContainer/Runtime/Internal/InstanceProviders/CollectionInstanceProvider.cs @@ -98,7 +98,7 @@ internal void CollectFromParentScopes( if (scope.TryGetRegistration(finderType, out var registration) && registration.Provider is CollectionInstanceProvider parentCollection) { - mergedRegistrations ??= ListPool.Get(); + mergedRegistrations = mergedRegistrations ?? ListPool.Get(); mergedRegistrations.AddRange(registrations); if (localScopeOnly)