C#: Use ref conversions (including variance conversions) for element types of span conversions.

This commit is contained in:
Michael Nebel
2026-01-07 09:55:10 +01:00
parent b686890ba6
commit a991afdf69

View File

@@ -533,9 +533,7 @@ predicate convSpan(Type fromType, Type toType) {
) and
toElementType = toType.(ReadOnlySpanType).getElementType()
|
convIdentity(fromElementType, toElementType)
or
convVariance(fromElementType, toElementType)
convRefTypeNonNull(fromElementType, toElementType)
)
or
fromType instanceof SystemStringClass and