mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 18:32:11 +00:00
* fix #20883 Unspecified generic on default value segfaults the compiler * fallback to isGeneric * change to closer error * Update t20883.nim
13 lines
195 B
Nim
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()
|