Bug 14094 – Using string import in map results in error message with __error
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-31T21:08:36Z
Last change time
2020-03-21T03:56:40Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Jacob Carlborg
Comments
Comment #0 by doob — 2015-01-31T21:08:36Z
I'm not sure if this is supposed to compile but the following will result a compile error which includes "__error" in the error message:
import std.algorithm;
enum foo = ["foo"].map!((string e) => import(e));
The error message is:
main.d(2): Error: variable e cannot be read at compile time
main.d(2): Error: file name argument must be a string, not (__error)