summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-28 09:15:31 -0800
committerGitHub <noreply@github.com>2023-11-28 09:15:31 -0800
commit62426e94ef11fd6baa213757f87114ec174b406e (patch)
tree620b539efe2f01bfc213953a4893d09635093653 /source/slang/slang-check-decl.cpp
parenta2083d64fec7732195e533b6a2ed7d05cc9beedc (diff)
Misc language server fixes. (#3357)
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index c31c94a85..7c36bdd5f 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -7346,6 +7346,10 @@ namespace Slang
visitor->getSink()->diagnose(attr, Diagnostics::cannotUseInterfaceRequirementAsDerivative);
return;
}
+ if (funcType->getParamCount() != imaginaryArguments.getCount())
+ {
+ goto error;
+ }
for (Index ii = 0; ii < imaginaryArguments.getCount(); ++ii)
{
// Check if the resolved invoke argument type is an error type.
@@ -7403,7 +7407,7 @@ namespace Slang
return;
}
}
-
+ error:;
// Build the expected signature from imaginary args to diagnose
// when no matching function is found (this excludes the case handled above)
//