diff --git a/lib/types.js b/lib/types.js
index <HASH>..<HASH> 100644
--- a/lib/types.js
+++ b/lib/types.js
@@ -510,7 +510,7 @@ module.exports = function (expect) {
         equal: function (a, b) {
             return a === b || a.toString() === b.toString();
         },
-        inspect: function (f, depth, output) {
+        inspect: function (f, depth, output, inspect) {
             var ownPropertyNames = Object.keys(f);
             var source = f.toString();
             var name;
@@ -554,7 +554,7 @@ module.exports = function (expect) {
                 output
                     .nl()
                     .code(lhs + ' = ', 'javascript')
-                    .append(expect.inspect(f[ownPropertyName]))
+                    .append(inspect(f[ownPropertyName]))
                     .code(';', 'javascript');
             });
             return output;
Function type, inspect: Use inspect-the-3rd-param instead of expect.inspect when inspecting own property values.

Fixes stack overflow when cyclic references are present.