diff options
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
| -rw-r--r-- | source/slang/slang-check-decl.cpp | 6 |
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) // |
