Repository: lucy-clownfish Updated Branches: refs/heads/cfc-pod-wip2 [created] 273ce8f8a
Add a check to CFCPerlPod_constructors_pod Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/fc81f671 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/fc81f671 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/fc81f671 Branch: refs/heads/cfc-pod-wip2 Commit: fc81f671d82763c4eff295e2086ae0301dd735f8 Parents: 5fc4513 Author: Nick Wellnhofer <[email protected]> Authored: Sat Jul 20 17:21:50 2013 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Fri Apr 25 12:58:22 2014 +0200 ---------------------------------------------------------------------- compiler/src/CFCPerlPod.c | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fc81f671/compiler/src/CFCPerlPod.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c index 78c804f..a1040e2 100644 --- a/compiler/src/CFCPerlPod.c +++ b/compiler/src/CFCPerlPod.c @@ -210,6 +210,10 @@ CFCPerlPod_constructors_pod(CFCPerlPod *self, CFCClass *klass) { } else { CFCFunction *init_func = CFCClass_function(klass, slot.func); + if (!init_func) { + CFCUtil_die("Can't find function '%s' in class '%s'", + slot.func, CFCClass_get_class_name(klass)); + } char *sub_pod = CFCPerlPod_gen_subroutine_pod(self, init_func, slot.alias, klass, slot.sample, class_name, true);
