June 12, 2010
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