https://issues.dlang.org/show_bug.cgi?id=16653
Issue ID: 16653
Summary: ParameterDefaultValueTuple fails to compile when
function has lazy param
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
This code:
import std.traits;
void f(lazy int x = 0) {}
pragma(msg, ParameterDefaultValueTuple!f);
gives compile error
/opt/compilers/dmd2/include/std/traits.d-mixin-1216(1216): Error: lazy
variables cannot be lvalues
/opt/compilers/dmd2/include/std/traits.d(1253): Error: template instance
std.traits.ParameterDefaultValueTuple!(f).Get!0LU error instantiating
/opt/compilers/dmd2/include/std/traits.d(1256): instantiated from here:
Impl!0LU
/d321/f969.d(5): instantiated from here: ParameterDefaultValueTuple!(f)
/d321/f969.d(5): while evaluating pragma(msg, ParameterDefaultValueTuple!(f))
--