aboutsummaryrefslogtreecommitdiffstats
path: root/src/constrain.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-26 19:01:52 +0000
committerDavid Robillard <d@drobilla.net>2010-12-26 19:01:52 +0000
commit7644fe32e7dd926ef5d1db7d5eec20225f790144 (patch)
treece4542a7d04a51725f36fd261210c34f90e8eb59 /src/constrain.cpp
parentc698116cf88a9e48085b5741f10db4f8c48e8fe5 (diff)
downloadresp-7644fe32e7dd926ef5d1db7d5eec20225f790144.tar.gz
resp-7644fe32e7dd926ef5d1db7d5eec20225f790144.tar.bz2
resp-7644fe32e7dd926ef5d1db7d5eec20225f790144.zip
More sensible check for Fn type.
git-svn-id: http://svn.drobilla.net/resp/resp@355 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r--src/constrain.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp
index 38d731a..45fead8 100644
--- a/src/constrain.cpp
+++ b/src/constrain.cpp
@@ -272,9 +272,7 @@ constrain_call(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error)
const AType* fnType = tenv.var(head);
if (fnType->kind != AType::VAR) {
- if (fnType->kind == AType::PRIM
- || fnType->list_len() < 2
- || fnType->head()->str() != "Fn")
+ if (!is_form(fnType, "Fn"))
throw Error(call->loc, (format("call to non-function `%1%'") % head->str()).str());
size_t numArgs = fnType->prot()->list_len();