Merge pull request #589 from Sergio0694/dev/partial-record-struct
Fix handling partial record struct types, add test
このコミットが含まれているのは:
2ファイル変更
+34
検索条件に一致するファイルはありません
@@ -21,6 +21,7 @@ internal sealed record TypeInfo(string QualifiedName, TypeKind Kind, bool IsReco
|
||||
{
|
||||
return Kind switch
|
||||
{
|
||||
TypeKind.Struct when IsRecord => "record struct",
|
||||
TypeKind.Struct => "struct",
|
||||
TypeKind.Interface => "interface",
|
||||
TypeKind.Class when IsRecord => "record",
|
||||
|
||||
@@ -975,4 +975,37 @@ public partial class D2D1PixelShaderTests
|
||||
Assert.AreEqual(left.container1.i2x2.M22, right.container1.i2x2.M22);
|
||||
Assert.AreEqual(left.container1.d, right.container1.d);
|
||||
}
|
||||
|
||||
public partial class ContainingClass
|
||||
{
|
||||
public partial record ContainingRecord
|
||||
{
|
||||
public partial struct ContainingStruct
|
||||
{
|
||||
public partial record struct ContainingRecordStruct
|
||||
{
|
||||
public partial interface IContainingInterface
|
||||
{
|
||||
[D2DInputCount(0)]
|
||||
[D2DGeneratedPixelShaderDescriptor]
|
||||
[AutoConstructor]
|
||||
public readonly partial struct DeeplyNestedShader : ID2D1PixelShader
|
||||
{
|
||||
public float4 Execute()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DeeplyNestedShaderType_VerifyGenerator()
|
||||
{
|
||||
// Just a sanity check that the generated code is present
|
||||
Assert.AreEqual(0, D2D1PixelShader.GetInputCount<ContainingClass.ContainingRecord.ContainingStruct.ContainingRecordStruct.IContainingInterface.DeeplyNestedShader>());
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする