Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[automated] Merge branch 'release/9.0-rc1' => 'release/9.0' #106649

Merged
merged 15 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
f91cf24
Change OneLocBuild mirror branch to release/9.0 temporarily (#106434)
github-actions[bot] Aug 15, 2024
5694fe0
Revert "Use `Unsafe.BitCast` for `Int128` ↔`UInt128` operators (#1045…
github-actions[bot] Aug 15, 2024
83bac95
Update dependencies from https://github.com/dotnet/emsdk build 202408…
dotnet-maestro[bot] Aug 15, 2024
0784f3e
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Aug 15, 2024
d649039
JIT: update simd base type when combining simd nodes for bitwise ops …
github-actions[bot] Aug 16, 2024
2be016b
Remove assert (#106542)
github-actions[bot] Aug 16, 2024
6d543fa
Remove CONTEXT_XSTATE in FaultingExceptionFrame::UpdateRegDisplay (#1…
github-actions[bot] Aug 16, 2024
e4335df
Bump downlevel versions to 8.0.9 (#106547)
lewing Aug 16, 2024
63c9565
[release/9.0-rc1] Fallback to treating as object if not collection (#…
github-actions[bot] Aug 16, 2024
01607d3
Workaround for #106521 (#106589)
github-actions[bot] Aug 18, 2024
904fd57
Update dependencies from https://github.com/dotnet/emsdk build 202408…
dotnet-maestro[bot] Aug 19, 2024
a73a65b
[release/9.0-rc1] Add workflow file for interbranch merging (#106614)
f-alizada Aug 19, 2024
2a9d9bc
[release/9.0-rc1] Fix condition for adding package readmes (#106592)
github-actions[bot] Aug 19, 2024
f028127
[release/9.0-rc1] JIT: fix unused operand marking in LowerHWIntrinsic…
github-actions[bot] Aug 19, 2024
d89cc99
Merge branch 'release/9.0' into merge/release/9.0-rc1-to-release/9.0
lewing Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/inter-branch-merge-flow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Inter-branch merge workflow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@f-alizada nice, this is getting autoflowed too.

on:
push:
branches:
- release/**

permissions:
contents: write
pull-requests: write

jobs:
Merge:
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
<Sha>ed276e79e30bffc3e6405afa8a9323ec7e67c700</Sha>
<SourceBuild RepoName="cecil" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-rc.1.24402.2">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-rc.1.24416.2">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>edf3e90fa25b1fc4f7f63ceb45ef70f49c6b121a</Sha>
<Sha>459c92904b224d125a350a3f3e431fe90152a95e</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="9.0.0-rc.1.24402.2">
<Dependency Name="Microsoft.SourceBuild.Intermediate.emsdk" Version="9.0.0-rc.1.24416.2">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>edf3e90fa25b1fc4f7f63ceb45ef70f49c6b121a</Sha>
<Sha>459c92904b224d125a350a3f3e431fe90152a95e</Sha>
<SourceBuild RepoName="emsdk" ManagedOnly="true" />
</Dependency>
<!-- Intermediate is necessary for source build. -->
Expand Down Expand Up @@ -368,13 +368,13 @@
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>bba7ceac50f68468ec9733a6a66f2314227101d4</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24405.1">
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24415.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>3211f48253bc18560156d90dc5e710d35f7d03fa</Sha>
<Sha>fdb9965ce68c1f4e1c0ff301488adf9caa958615</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24405.1">
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24415.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>3211f48253bc18560156d90dc5e710d35f7d03fa</Sha>
<Sha>fdb9965ce68c1f4e1c0ff301488adf9caa958615</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.12.0-2.24414.1">
Expand Down
8 changes: 4 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MinorVersion>0</MinorVersion>
<PatchVersion>0</PatchVersion>
<SdkBandVersion>9.0.100</SdkBandVersion>
<PackageVersionNet8>8.0.7</PackageVersionNet8>
<PackageVersionNet8>8.0.9</PackageVersionNet8>
<PackageVersionNet7>7.0.20</PackageVersionNet7>
<PackageVersionNet6>6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet8)').Build),25))</PackageVersionNet6>
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
Expand All @@ -34,8 +34,8 @@
</ItemGroup>
<PropertyGroup>
<!-- dotnet/roslyn-analyzers dependencies -->
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24405.1</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24405.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24415.1</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24415.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<!-- dotnet/roslyn dependencies -->
<!--
These versions should not be used by any project that contributes to the design-time experience in VS, such as an analyzer, code-fix, or generator assembly.
Expand Down Expand Up @@ -239,7 +239,7 @@
Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml
like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-9_0_100_Transport
-->
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-rc.1.24402.2</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-rc.1.24416.2</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion)</MicrosoftNETRuntimeEmscriptenVersion>
<!-- workloads -->
<SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion>
Expand Down
1 change: 1 addition & 0 deletions eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>

<!-- PackageReadmeFile specifies the package readme file name in the package. PackageReadmeFilePath points to the package readme file on disk. -->
<EnableDefaultPackageReadmeFile Condition="'$(EnableDefaultPackageReadmeFile)' == '' and '$(IsShipping)' == 'true'">true</EnableDefaultPackageReadmeFile>
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' and '$(EnableDefaultPackageReadmeFile)' == 'true'">PACKAGE.md</PackageReadmeFile>
<PackageReadmeFilePath Condition="'$(PackageReadmeFilePath)' == '' and '$(EnableDefaultPackageReadmeFile)' == 'true'">PACKAGE.md</PackageReadmeFilePath>
<BeforePack>$(BeforePack);ValidatePackageReadmeExists</BeforePack>
Expand Down
13 changes: 7 additions & 6 deletions eng/pipelines/runtime-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ extends:
# Localization build
#

- template: /eng/common/templates-official/job/onelocbuild.yml
parameters:
MirrorRepo: runtime
MirrorBranch: main
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-RUNTIME'
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/9.0') }}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dotnet/runtime-infrastructure heads up - we will have to retarget any localization PRs that get opened for release/9.0-rc1 to target release/9.0 instead, as the RC1 branch will be closed by the time we start getting such changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I think this won't be necessary. By simply notifying the loc team that they need to work in the release/9.0, they can ignore all others.

- template: /eng/common/templates-official/job/onelocbuild.yml
parameters:
MirrorRepo: runtime
MirrorBranch: release/9.0
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-RUNTIME'

#
# Source Index Build
Expand Down
18 changes: 18 additions & 0 deletions src/coreclr/inc/clrnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,24 @@ RtlVirtualUnwind(
IN OUT PKNONVOLATILE_CONTEXT_POINTERS ContextPointers OPTIONAL
);

// Mirror the XSTATE_ARM64_SVE flags from winnt.h

#ifndef XSTATE_ARM64_SVE
#define XSTATE_ARM64_SVE (2)
#endif // XSTATE_ARM64_SVE

#ifndef XSTATE_MASK_ARM64_SVE
#define XSTATE_MASK_ARM64_SVE (1ui64 << (XSTATE_ARM64_SVE))
#endif // XSTATE_MASK_ARM64_SVE

#ifndef CONTEXT_ARM64_XSTATE
#define CONTEXT_ARM64_XSTATE (CONTEXT_ARM64 | 0x20L)
#endif // CONTEXT_ARM64_XSTATE

#ifndef CONTEXT_XSTATE
#define CONTEXT_XSTATE CONTEXT_ARM64_XSTATE
#endif // CONTEXT_XSTATE

#endif

#ifdef TARGET_LOONGARCH64
Expand Down
18 changes: 14 additions & 4 deletions src/coreclr/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1430,10 +1430,9 @@ GenTree* Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node)
const uint8_t B = 0xCC;
const uint8_t C = 0xAA;

var_types simdType = node->TypeGet();
CorInfoType simdBaseJitType = node->GetSimdBaseJitType();
var_types simdBaseType = node->GetSimdBaseType();
unsigned simdSize = node->GetSimdSize();
var_types simdType = node->TypeGet();
var_types simdBaseType = node->GetSimdBaseType();
unsigned simdSize = node->GetSimdSize();

GenTree* op1 = node->Op(1);
GenTree* op2 = node->Op(2);
Expand All @@ -1455,6 +1454,10 @@ GenTree* Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node)
bool userIsScalar = false;
genTreeOps userOper = userIntrin->GetOperForHWIntrinsicId(&isScalar);

// userIntrin may have re-interpreted the base type
//
simdBaseType = userIntrin->GetSimdBaseType();

if (GenTreeHWIntrinsic::OperIsBitwiseHWIntrinsic(userOper))
{
if (isOperNot && (userOper == GT_AND))
Expand Down Expand Up @@ -3924,6 +3927,13 @@ GenTree* Lowering::LowerHWIntrinsicTernaryLogic(GenTreeHWIntrinsic* node)
}
}

// Update the locals to reflect any operand swaps we did above.

op1 = node->Op(1);
op2 = node->Op(2);
op3 = node->Op(3);
assert(op4 == node->Op(4));

GenTree* replacementNode = nullptr;

switch (useFlags)
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/jit/optimizebools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,6 @@ void OptBoolsDsc::optOptimizeBoolsUpdateTrees()
assert(m_b2->KindIs(BBJ_COND));
assert(m_b1->TrueTargetIs(m_b2->GetTrueTarget()));
assert(m_b1->FalseTargetIs(m_b2));
assert(!m_b2->IsLast());

// We now reach B2's false target via B1 false.
//
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/amd64/cgenamd64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ void FaultingExceptionFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool update

memcpy(pRD->pCurrentContext, &m_ctx, sizeof(CONTEXT));

// Clear the CONTEXT_XSTATE, since the REGDISPLAY contains just plain CONTEXT structure
// that cannot contain any extended state.
pRD->pCurrentContext->ContextFlags &= ~(CONTEXT_XSTATE & CONTEXT_AREA_MASK);

pRD->ControlPC = m_ctx.Rip;

pRD->SP = m_ctx.Rsp;
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/arm64/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,10 @@ void FaultingExceptionFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool update
// Copy the context to regdisplay
memcpy(pRD->pCurrentContext, &m_ctx, sizeof(T_CONTEXT));

// Clear the CONTEXT_XSTATE, since the REGDISPLAY contains just plain CONTEXT structure
// that cannot contain any extended state.
pRD->pCurrentContext->ContextFlags &= ~(CONTEXT_XSTATE & CONTEXT_AREA_MASK);

pRD->ControlPC = ::GetIP(&m_ctx);
pRD->SP = ::GetSP(&m_ctx);

Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/i386/cgenx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ void FaultingExceptionFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool update

memcpy(pRD->pCurrentContext, &m_ctx, sizeof(CONTEXT));

// Clear the CONTEXT_XSTATE, since the REGDISPLAY contains just plain CONTEXT structure
// that cannot contain any extended state.
pRD->pCurrentContext->ContextFlags &= ~(CONTEXT_XSTATE & CONTEXT_AREA_MASK);

pRD->SP = m_ctx.Esp;
pRD->ControlPC = m_ctx.Eip;

Expand Down
20 changes: 0 additions & 20 deletions src/coreclr/vm/threadsuspend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,6 @@ ThreadSuspend::SUSPEND_REASON ThreadSuspend::m_suspendReason;
void* ThreadSuspend::g_returnAddressHijackTarget = NULL;
#endif // TARGET_WINDOWS

#if defined(TARGET_ARM64)
// Mirror the XSTATE_ARM64_SVE flags from winnt.h

#ifndef XSTATE_ARM64_SVE
#define XSTATE_ARM64_SVE (2)
#endif // XSTATE_ARM64_SVE

#ifndef XSTATE_MASK_ARM64_SVE
#define XSTATE_MASK_ARM64_SVE (1ui64 << (XSTATE_ARM64_SVE))
#endif // XSTATE_MASK_ARM64_SVE

#ifndef CONTEXT_ARM64_XSTATE
#define CONTEXT_ARM64_XSTATE (CONTEXT_ARM64 | 0x20L)
#endif // CONTEXT_ARM64_XSTATE

#ifndef CONTEXT_XSTATE
#define CONTEXT_XSTATE CONTEXT_ARM64_XSTATE
#endif // CONTEXT_XSTATE
#endif // TARGET_ARM64

// If you add any thread redirection function, make sure the debugger can 1) recognize the redirection
// function, and 2) retrieve the original CONTEXT. See code:Debugger.InitializeHijackFunctionAddress and
// code:DacDbiInterfaceImpl.RetrieveHijackedContext.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<SharedFrameworkName>$(MicrosoftNetCoreAppFrameworkName)</SharedFrameworkName>
<IsShipping Condition="'$(PgoInstrument)' != ''">false</IsShipping>
<SharedFrameworkFriendlyName>.NET Runtime</SharedFrameworkFriendlyName>
<EnableDefaultPackageReadmeFile>true</EnableDefaultPackageReadmeFile>
</PropertyGroup>

<!--
Expand Down
3 changes: 0 additions & 3 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@
'$(IsTestProject)' != 'true' and
'$(IsTestSupportProject)' != 'true' and
'$(IsGeneratorProject)' != 'true'">true</SkipTargetingPackShimReferences>

<!-- Make libraries packages use and require a package readme file. -->
<EnableDefaultPackageReadmeFile Condition="'$(EnableDefaultPackageReadmeFile)' == '' and '$(IsShipping)' == 'true'">true</EnableDefaultPackageReadmeFile>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private TypeSpec CreateTypeSpec(TypeParseInfo typeParseInfo)
}
else if (IsCollection(type))
{
spec = CreateCollectionSpec(typeParseInfo);
spec = CreateCollectionSpec(typeParseInfo) ?? CreateObjectSpec(typeParseInfo);
}
else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.IConfigurationSection))
{
Expand Down Expand Up @@ -360,34 +360,37 @@ private TypeSpec CreateArraySpec(TypeParseInfo typeParseInfo)
};
}

private TypeSpec CreateCollectionSpec(TypeParseInfo typeParseInfo)
private TypeSpec? CreateCollectionSpec(TypeParseInfo typeParseInfo)
{
INamedTypeSymbol type = (INamedTypeSymbol)typeParseInfo.TypeSymbol;

TypeSpec spec;
TypeSpec? spec;
if (IsCandidateDictionary(type, out ITypeSymbol? keyType, out ITypeSymbol? elementType))
{
spec = CreateDictionarySpec(typeParseInfo, keyType, elementType);
Debug.Assert(spec is DictionarySpec or UnsupportedTypeSpec);
Debug.Assert(spec is DictionarySpec or UnsupportedTypeSpec or null);
}
else
{
spec = CreateEnumerableSpec(typeParseInfo);
Debug.Assert(spec is EnumerableSpec or UnsupportedTypeSpec);
Debug.Assert(spec is EnumerableSpec or UnsupportedTypeSpec or null);
}

return spec;
}

private TypeSpec CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol keyTypeSymbol, ITypeSymbol elementTypeSymbol)
private TypeSpec? CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol keyTypeSymbol, ITypeSymbol elementTypeSymbol)
{
INamedTypeSymbol type = (INamedTypeSymbol)typeParseInfo.TypeSymbol;

// treat as unsupported if it implements IDictionary<,>, otherwise we'll try to fallback and treat as an object
bool isDictionary = _typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericIDictionary_Unbound) is not null;

if (IsUnsupportedType(keyTypeSymbol) || IsUnsupportedType(elementTypeSymbol))
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
return isDictionary ? CreateUnsupportedCollectionSpec(typeParseInfo) : null;
}

INamedTypeSymbol type = (INamedTypeSymbol)typeParseInfo.TypeSymbol;

CollectionInstantiationStrategy instantiationStrategy;
CollectionInstantiationConcreteType instantiationConcreteType;
CollectionPopulationCastType populationCastType;
Expand All @@ -402,14 +405,15 @@ private TypeSpec CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol k
{
populationCastType = CollectionPopulationCastType.NotApplicable;
}
else if (_typeSymbols.GenericIDictionary is not null && GetInterface(type, _typeSymbols.GenericIDictionary_Unbound) is not null)
else if (isDictionary)
{
// implements IDictionary<,> -- cast to it.
populationCastType = CollectionPopulationCastType.IDictionary;
}
else
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
// not a dictionary
return null;
}
}
else if (_typeSymbols.Dictionary is not null &&
Expand All @@ -429,7 +433,7 @@ private TypeSpec CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol k
}
else
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
return isDictionary ? CreateUnsupportedCollectionSpec(typeParseInfo) : null;
}

TypeRef keyTypeRef = EnqueueTransitiveType(typeParseInfo, keyTypeSymbol, DiagnosticDescriptors.DictionaryKeyNotSupported);
Expand All @@ -447,18 +451,20 @@ private TypeSpec CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol k
};
}

private TypeSpec CreateEnumerableSpec(TypeParseInfo typeParseInfo)
private TypeSpec? CreateEnumerableSpec(TypeParseInfo typeParseInfo)
{
INamedTypeSymbol type = (INamedTypeSymbol)typeParseInfo.TypeSymbol;

bool isCollection = _typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericICollection_Unbound) is not null;

if (!TryGetElementType(type, out ITypeSymbol? elementType))
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
return isCollection ? CreateUnsupportedCollectionSpec(typeParseInfo) : null;
}

if (IsUnsupportedType(elementType))
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
return isCollection ? CreateUnsupportedCollectionSpec(typeParseInfo) : null;
}

CollectionInstantiationStrategy instantiationStrategy;
Expand All @@ -475,14 +481,15 @@ private TypeSpec CreateEnumerableSpec(TypeParseInfo typeParseInfo)
{
populationCastType = CollectionPopulationCastType.NotApplicable;
}
else if (_typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericICollection_Unbound) is not null)
else if (isCollection)
{
// implements ICollection<> -- cast to it
populationCastType = CollectionPopulationCastType.ICollection;
}
else
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
// not a collection
return null;
}
}
else if ((IsInterfaceMatch(type, _typeSymbols.GenericICollection_Unbound) || IsInterfaceMatch(type, _typeSymbols.GenericIList_Unbound)))
Expand Down Expand Up @@ -523,7 +530,7 @@ private TypeSpec CreateEnumerableSpec(TypeParseInfo typeParseInfo)
}
else
{
return CreateUnsupportedCollectionSpec(typeParseInfo);
return isCollection ? CreateUnsupportedCollectionSpec(typeParseInfo) : null;
}

TypeRef elementTypeRef = EnqueueTransitiveType(typeParseInfo, elementType, DiagnosticDescriptors.ElementTypeNotSupported);
Expand Down
Loading
Loading