August 29, 2016 [Issue 16445] New: string mixin allows shebang line in source | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16445 Issue ID: 16445 Summary: string mixin allows shebang line in source Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: cauterite@gmail.com This one is so hilarious I just had to submit it: ( https://dpaste.dzfl.pl/c10385f97af5 ) void main() { mixin(`#! asdf wxyz import std.stdio; writeln("LOL"); `); }; The only possible use for this feature I can think of is: mixin(import("something.d")); which is a pretty rare usage for mixins (I hope). -- |
Copyright © 1999-2021 by the D Language Foundation