On 09/19/2016 02:55 PM, Timon Gehr wrote:
This works:
import std.stdio;
void main(){
    int x=3;
    enum l=()=>x;

I.e. l has the correct runtime context even though it is a static value.

Enums are a special kind of static value, though. Can't do that with `static` instead of `enum`. Enums (often?) don't manifest until they're used. Could .init work that way?

Reply via email to