summary refs log tree commit diff
path: root/lib/tests/modules/functionTo/wrong-type.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/modules/functionTo/wrong-type.nix')
-rw-r--r--lib/tests/modules/functionTo/wrong-type.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/tests/modules/functionTo/wrong-type.nix b/lib/tests/modules/functionTo/wrong-type.nix
new file mode 100644
index 00000000000..fd65b75088d
--- /dev/null
+++ b/lib/tests/modules/functionTo/wrong-type.nix
@@ -0,0 +1,18 @@
+
+{ lib, config, ... }:
+let
+  inherit (lib) types;
+in {
+  options = {
+    fun = lib.mkOption {
+      type = types.functionTo types.str;
+    };
+
+    result = lib.mkOption {
+      type = types.str;
+      default = config.fun 0;
+    };
+  };
+
+  config.fun = input: input + 1;
+}