From 62426e94ef11fd6baa213757f87114ec174b406e Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 28 Nov 2023 09:15:31 -0800 Subject: Misc language server fixes. (#3357) --- source/slang/slang-check-decl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-check-decl.cpp') 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) // -- cgit v1.2.3