Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Proc default arg error, `internal error: expr`

Open al6x opened this issue 4 years ago • 2 comments
trafficstars

Following example would fail with compiler error, playground

Error: internal error: expr: param not init query_13251018

Example

import strformat

proc somefn[T](query: string, _: type[T], message = query) = discard

somefn(fmt"", string)

Current Output

Hint: used config file '/playground/nim/config/nim.cfg' [Conf]
Hint: used config file '/playground/nim/config/config.nims' [Conf]
............
/usercode/in.nim(3, 53) Error: internal error: expr: param not init query_13251018
No stack traceback available
To create a stacktrace, rerun compilation with './koch temp c <file>', see https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler for details
$ nim -v
Nim Compiler Version 1.4.6 [MacOSX: amd64]
Compiled at 2021-05-06
Copyright (c) 2006-2020 by Andreas Rumpf

active boot switches: -d:release

al6x avatar May 24 '21 02:05 al6x