Using import in map

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 31 11:52:10 PST 2015


Is this supposed to work:

enum foo = ["foo"].map!((string e) => import(e));

When I compile the above code with 2.066.1 I get the following error:

main.d(1): Error: variable e cannot be read at compile time
main.d(1): Error: file name argument must be a string, not (__error)

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list