summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-10-28 10:41:42 -0700
committerGitHub <noreply@github.com>2022-10-28 10:41:42 -0700
commit5a510ab28381ae93d1011f0bb6c9db4cbf589578 (patch)
tree868a6d5cdd1bdbc760db3b6c0e919441ca51a708 /source
parentf9b1c565abbfc93bf2c8d4742f3db13e07db5e62 (diff)
Fix language server crash on incomplete higher order invoke expr. (#2476)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-check-expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index c7d69262d..fe37f5099 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -1977,6 +1977,11 @@ namespace Slang
// Check/Resolve inner function declaration.
expr->baseFunction = CheckTerm(expr->baseFunction);
+
+ // For now we only support using higher order expr as callee in an invoke expr.
+ // The actual type of the higher order function will be derived during resolve invoke.
+ expr->type = m_astBuilder->getBottomType();
+
return expr;
}