summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-08-27 18:48:41 -0700
committerGitHub <noreply@github.com>2024-08-27 18:48:41 -0700
commit4f6f827e26ffcb9b850ef8a8b7f7b4beb5addb7a (patch)
treee8f20e798866df7e10067ce5b7ae22f9dc57ff84 /source/slang/slang-check-decl.cpp
parentfbaa444d890f58fabc5933b0c28048d2c5d862c0 (diff)
Add functor syntax support. (#4926)
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index 66707fc56..3bd6bd327 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -7881,7 +7881,7 @@ namespace Slang
ctorToInvoke->declRef = declInfo.defaultCtor->getDefaultDeclRef();
ctorToInvoke->name = declInfo.defaultCtor->getName();
ctorToInvoke->loc = declInfo.defaultCtor->loc;
- ctorToInvoke->type = structDeclInfo.defaultCtor->returnType.type;
+ ctorToInvoke->type = m_astBuilder->getFuncType(ArrayView<Type*>(), structDeclInfo.defaultCtor->returnType.type);
auto invoke = m_astBuilder->create<InvokeExpr>();
invoke->functionExpr = ctorToInvoke;