diff options
Diffstat (limited to 'source/slang/slang-syntax.cpp')
| -rw-r--r-- | source/slang/slang-syntax.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp index bb5b574bb..67d562f0f 100644 --- a/source/slang/slang-syntax.cpp +++ b/source/slang/slang-syntax.cpp @@ -912,11 +912,19 @@ FuncType* getFuncType(ASTBuilder* astBuilder, DeclRef<CallableDecl> const& declR { List<Type*> paramTypes; auto resultType = getResultType(astBuilder, declRef); + + if (!resultType) + resultType = astBuilder->getErrorType(); + auto errorType = getErrorCodeType(astBuilder, declRef); auto visitParamDecl = [&](DeclRef<ParamDecl> paramDeclRef) { auto paramDecl = paramDeclRef.getDecl(); auto paramType = getParamType(astBuilder, paramDeclRef); + if (!paramType) + { + paramType = astBuilder->getErrorType(); + } if (paramDecl->findModifier<RefModifier>()) { paramType = astBuilder->getRefType(paramType, AddressSpace::Generic); |
