Open
Description
struct NumberType
{
int num;
int opApply(scope int delegate(int) dg)
{
int result = dg(num);
return result;
}
}
struct Problem {
int value;
this(int val) {
auto nt = NumberType(18);
foreach (int number; nt)
{
return;
}
}
}
auto compile_time_var = Problem(1); // error
void f() {
auto runtime_var = Problem(1); // ok
}
Error: variable `__capture` cannot be read at compile time
Metadata
Metadata
Assignees
Labels
No labels