summary refs log tree commit diff stats
path: root/tests/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/t20883.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/misc/t20883.nim b/tests/misc/t20883.nim
new file mode 100644
index 000000000..d98feaa14
--- /dev/null
+++ b/tests/misc/t20883.nim
@@ -0,0 +1,12 @@
+discard """
+  action: reject
+  errormsg: "type mismatch: got <float64> but expected 'typeof(U(0.000001))'"
+  line: 8
+  column: 22
+"""
+
+proc foo*[U](x: U = U(1e-6)) =
+  echo x
+
+foo[float]()
+foo()