https://issues.dlang.org/show_bug.cgi?id=16445

--- Comment #2 from Cauterite <cauter...@gmail.com> ---
(In reply to b2.temp from comment #1)
> So there is no bug. The shebang is removed as specified. You can also see
> that if you add a space before, an error is emitted.

Well the bug is that shebang lines aren't applicable to string mixins, because
they're not executed from a shell, so they should be a syntax error regardless.
Especially if the mixin is an expression, where accepting a shebang line makes
no sense whatsoever.

The lexer has only one constructor, and it always strips "#!…\n" off
unconditionally:
https://github.com/dlang/dmd/blob/fb64019c2251d5f447967b9e796de8afc76e6226/src/lexer.d#L187

--

Reply via email to