Fix diagnostics for HLSL build generator errors

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-24 21:04:32 +02:00
1 親 7651ad0ef3
コミット a5088788c4
3ファイル変更
+9 -9

検索条件に一致するファイルはありません

+5 -5
ファイルの表示
@@ -15,10 +15,10 @@ namespace ComputeSharp.SourceGeneration.Models;
/// A model describing the hierarchy info for a specific type.
/// </summary>
/// <param name="FilenameHint">The filename hint for the current type.</param>
/// <param name="MetadataName">The metadata name for the current type.</param>
/// <param name="FullyQualifiedMetadataName">The fully qualified metadata name for the current type.</param>
/// <param name="Namespace">Gets the namespace for the current type.</param>
/// <param name="Hierarchy">Gets the sequence of type definitions containing the current type.</param>
internal sealed partial record HierarchyInfo(string FilenameHint, string MetadataName, string Namespace, ImmutableArray<TypeInfo> Hierarchy)
internal sealed partial record HierarchyInfo(string FilenameHint, string FullyQualifiedMetadataName, string Namespace, ImmutableArray<TypeInfo> Hierarchy)
{
/// <summary>
/// Creates a new <see cref="HierarchyInfo"/> instance from a given <see cref="INamedTypeSymbol"/>.
@@ -41,7 +41,7 @@ internal sealed partial record HierarchyInfo(string FilenameHint, string Metadat
return new(
typeSymbol.GetGeneratedFileName(),
typeSymbol.MetadataName,
typeSymbol.GetFullMetadataName(),
typeSymbol.ContainingNamespace.ToDisplayString(new(typeQualificationStyle: NameAndContainingTypesAndNamespaces)),
hierarchy.ToImmutable());
}
@@ -120,7 +120,7 @@ internal sealed partial record HierarchyInfo(string FilenameHint, string Metadat
protected override void AddToHashCode(ref HashCode hashCode, HierarchyInfo obj)
{
hashCode.Add(obj.FilenameHint);
hashCode.Add(obj.MetadataName);
hashCode.Add(obj.FullyQualifiedMetadataName);
hashCode.Add(obj.Namespace);
hashCode.AddRange(obj.Hierarchy);
}
@@ -130,7 +130,7 @@ internal sealed partial record HierarchyInfo(string FilenameHint, string Metadat
{
return
x.FilenameHint == y.FilenameHint &&
x.MetadataName == y.MetadataName &&
x.FullyQualifiedMetadataName == y.FullyQualifiedMetadataName &&
x.Namespace == y.Namespace &&
x.Hierarchy.SequenceEqual(y.Hierarchy);
}