diff options
| author | Yong He <yonghe@outlook.com> | 2023-01-14 22:50:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-14 22:50:57 -0800 |
| commit | 1c9b33157322751c456bf7abbd386edccf4413c3 (patch) | |
| tree | bbe4d28172a839fb06ac4b9e8c983a619bf04842 /source/slang/slang-check-modifier.cpp | |
| parent | 14fab67c5edd8eb697ffb10dbcc0467678521eef (diff) | |
Support custom backward derivative attribute. (#2594)
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
| -rw-r--r-- | source/slang/slang-check-modifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index f505b1321..f3623f19f 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -613,7 +613,7 @@ namespace Slang hitObjectAttributesAttr->location = (int32_t)val->value; } - else if (auto forwardDerivativeAttr = as<ForwardDerivativeAttribute>(attr)) + else if (auto derivativeAttr = as<UserDefinedDerivativeAttribute>(attr)) { SLANG_ASSERT(attr->args.getCount() == 1); SLANG_ASSERT(as<Decl>(attrTarget)); @@ -633,7 +633,7 @@ namespace Slang // // Set type to null to indicate that this needs expr needs to be further resolved. diffExpr->type.type = nullptr; - forwardDerivativeAttr->funcExpr = diffExpr; + derivativeAttr->funcExpr = diffExpr; } else if (auto derivativeOfAttr = as<DerivativeOfAttribute>(attr)) { |
