June 12, 2010 [dmd-beta] Weird Delegate Error: Regression? | ||||
|---|---|---|---|---|
| ||||
The following code works in 2.046:
import std.traits;
template IterType(T) {
alias ReturnType!(
{
foreach(elem; T.init) {
return elem;
}
assert(0);
}) IterType;
}
alias IterType!(uint[]) foo;
In 2.047 beta it fails with the nonsensical error message:
test8.d(6): Error: delegate std.traits.__dgliteral1 cannot access frame of function __dgliteral1
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply