From bffac95febd7a29cfac0becfcb019cd057b53765 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Thu, 2 Oct 2025 15:23:53 -0700 Subject: Fix the missing derivative member check (#8569) Close #8568. The root cause of this issue is that when the struct is indirectly inherited from IDifferentiable type, we will not check the reference of the DerivativeMember attribute. This PR fixes this issue by checking the DerivativeMember attribute right before synthesize the requirement methods of IDifferentiable interface. --- source/slang/slang-ast-modifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-ast-modifier.h') diff --git a/source/slang/slang-ast-modifier.h b/source/slang/slang-ast-modifier.h index 89f7a70bb..5793167af 100644 --- a/source/slang/slang-ast-modifier.h +++ b/source/slang/slang-ast-modifier.h @@ -1689,7 +1689,7 @@ FIDDLE() class DerivativeMemberAttribute : public Attribute { FIDDLE(...) - FIDDLE() DeclRefExpr* memberDeclRef; + FIDDLE() DeclRefExpr* memberDeclRef = nullptr; }; /// An attribute that marks an interface type as a COM interface declaration. -- cgit v1.2.3