diff --git a/src/constants.c b/src/constants.c
index 13d0a3098e4160fda626397cc5884d1e51924aea..7ab8f954b75eb889a517d4fe9693a9101d3d24eb 100644
--- a/src/constants.c
+++ b/src/constants.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: constants.c,v 1.60 2008/05/11 14:55:53 mast Exp $
+|| $Id: constants.c,v 1.61 2008/06/18 21:23:12 grubba Exp $
 */
 
 #include "global.h"
@@ -93,11 +93,11 @@ int global_callable_flags=0;
 
 /* Eats one ref to 'type' and 'name' */
 PMOD_EXPORT struct callable *low_make_callable(c_fun fun,
-				   struct pike_string *name,
-				   struct pike_type *type,
-				   int flags,
-				   optimize_fun optimize,
-				   docode_fun docode)
+					       struct pike_string *name,
+					       struct pike_type *type,
+					       int flags,
+					       optimize_fun optimize,
+					       docode_fun docode)
 {
   struct callable *f=alloc_callable();
   INIT_PIKE_MEMOBJ(f);
@@ -111,7 +111,14 @@ PMOD_EXPORT struct callable *low_make_callable(c_fun fun,
   f->internal_flags = global_callable_flags;
 #ifdef PIKE_DEBUG
   {
-    struct pike_type *z = check_call(function_type_string, type, 0);
+    struct pike_type *z = NULL;
+    add_ref(type);
+    type = check_splice_call(name, type, 1, mixed_type_string, NULL,
+			     CALL_INHIBIT_WARNINGS);
+    if (type) {
+      z = new_get_return_type(type, CALL_INHIBIT_WARNINGS);
+      free_type(type);
+    }
     f->may_return_void = (z == void_type_string);
     if(!z) Pike_fatal("Function has no valid return type.\n");
     free_type(z);