This code:
proc ii(): tuple[filename: string, line: int] =
result = instantiationInfo()
const i = ii()
echo i
prints:
(filename: ???, line: -1)
Is it regression or am I missing something?
It has to be used inside a template, as they are instantiated at compile time:
template ii: tuple[filename: string, line: int] =
instantiationInfo()
const i = ii()
echo i