summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/match.c b/match.c
index 3bb1f719..710a56ef 100644
--- a/match.c
+++ b/match.c
@@ -4706,9 +4706,12 @@ repeat_spec_same_data:
break;
goto repeat_spec_same_data;
} else if (result == decline_k) {
- /* Function declined; we know the lookup failed because
- since rest(specline) is nil, this is not horizontal fallback. */
- sem_error(specline, lit("function ~s not found"), sym, nao);
+ /* Function declined, so we know there is no vertical function.
+ If the horizontal one doesn't exist also, let's error out
+ now instead of trying to get data for matching a horizontal
+ call that we known work out. */
+ if (!cdr(uw_get_func(sym)))
+ sem_error(specline, lit("function ~s not found"), sym, nao);
} else {
return result;
}