summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index 2879d7fa2..3cc0fd0f5 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -1576,7 +1576,7 @@ namespace Slang
//
auto synParamDecl = m_astBuilder->create<ParamDecl>();
synParamDecl->nameAndLoc = paramDeclRef.getDecl()->nameAndLoc;
- synParamDecl->type.type = resultType;
+ synParamDecl->type.type = paramType;
// We need to add the parameter as a child declaration of
// the method we are building.
@@ -1599,7 +1599,12 @@ namespace Slang
// if any.
//
ThisExpr* synThis = nullptr;
- if( !requiredMemberDeclRef.getDecl()->hasModifier<HLSLStaticModifier>() )
+ if( requiredMemberDeclRef.getDecl()->hasModifier<HLSLStaticModifier>() )
+ {
+ auto synStaticModifier = m_astBuilder->create<HLSLStaticModifier>();
+ synFuncDecl->modifiers.first = synStaticModifier;
+ }
+ else
{
// For a non-`static` requirement, we need a `this` parameter.
//