Files
Nim/tests/misc/t20883.nim
Bung 26f183043f fix #20883 Unspecified generic on default value segfaults the compiler (#21172)
* fix #20883 Unspecified generic on default value segfaults the compiler

* fallback to isGeneric

* change to closer error

* Update t20883.nim
2023-08-04 13:35:43 +02:00

13 lines
195 B
Nim

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()