https://issues.dlang.org/show_bug.cgi?id=1985
--- Comment #15 from ag0aep6g <[email protected]> --- (In reply to Mike Parker from comment #14) > This gets at the bytes, does it not? > > enum bytes = import("foo.png").representation; Sure. But it only works because DMD happily creates an invalid string from `import("foo.png")` which is unusable unless reinterpreted. Arguably, it should throw an error instead. > I don't think we should change the behavior of the import expression at this > point when the above achieves the same result. Having a workaround is not a reason to keep the current behavior. The one argument for not addressing the issue as requested is breakage. If the type of `import(...)` is changed to ubyte[], the current uses will have to be updated. But if RazvanN's assertion that the feature isn't being used all that much is correct, then breakage doesn't matter all that much, does it? --
