mirror of https://github.com/dotnet/runtime
Merge 12dee50116
into 02596ba8d9
This commit is contained in:
commit
f1ef83c810
|
@ -38,7 +38,7 @@ namespace Microsoft.Interop
|
|||
{
|
||||
return DiagnosticInfo.Create(descriptor, location, DiagnosticProperties, NotSupportedDetails, elementName);
|
||||
}
|
||||
return DiagnosticInfo.Create(descriptor, location, DiagnosticProperties, TypePositionInfo.ManagedType.DiagnosticFormattedName, elementName);
|
||||
return DiagnosticInfo.Create(descriptor, location, DiagnosticProperties, TypePositionInfo.ManagedType?.DiagnosticFormattedName ?? "<unknown>", elementName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -142,11 +142,14 @@ namespace Microsoft.Interop
|
|||
|
||||
foreach (KeyValuePair<MarshalMode, CustomTypeMarshallerData> mode in Marshallers.Modes)
|
||||
{
|
||||
foreach (TypePositionInfo nestedElement in mode.Value.CollectionElementMarshallingInfo.ElementDependencies)
|
||||
if (mode.Value.CollectionElementMarshallingInfo is not null)
|
||||
{
|
||||
if (nestedElement.ManagedIndex != TypePositionInfo.UnsetIndex || nestedElement.NativeIndex != TypePositionInfo.UnsetIndex)
|
||||
foreach (TypePositionInfo nestedElement in mode.Value.CollectionElementMarshallingInfo.ElementDependencies)
|
||||
{
|
||||
yield return nestedElement;
|
||||
if (nestedElement.ManagedIndex != TypePositionInfo.UnsetIndex || nestedElement.NativeIndex != TypePositionInfo.UnsetIndex)
|
||||
{
|
||||
yield return nestedElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace LibraryImportGenerator.UnitTests
|
|||
yield return new object[] { ID(), CodeSnippets.UserDefinedPrefixedAttributes, Array.Empty<DiagnosticResult>() };
|
||||
|
||||
// Bug: https://github.com/dotnet/runtime/issues/117448
|
||||
// yield return new[] { ID(), CodeSnippets.ImproperCollectionWithMarshalUsingOnElements };
|
||||
yield return new[] { ID(), CodeSnippets.ImproperCollectionWithMarshalUsingOnElements };
|
||||
|
||||
// No explicit marshalling for char or string
|
||||
yield return new object[] { ID(), CodeSnippets.BasicParametersAndModifiers<char>(), new[]
|
||||
|
|
Loading…
Reference in New Issue