mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 02:40:50 +00:00
lib.isFunction: no error on non-function __functor
This commit is contained in:
@@ -1128,7 +1128,7 @@ in
|
||||
let
|
||||
isFunction = builtins.isFunction;
|
||||
in
|
||||
f: isFunction f || (f ? __functor && isFunction (f.__functor f));
|
||||
f: isFunction f || (f ? __functor && isFunction f.__functor && isFunction (f.__functor f));
|
||||
|
||||
/**
|
||||
`mirrorFunctionArgs f g` creates a new function `g'` with the same behavior as `g` (`g' x == g x`)
|
||||
|
||||
Reference in New Issue
Block a user