Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
August 29, 2016 [Issue 16445] string mixin allows shebang line in source | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16445 Cauterite <cauterite@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid -- |
August 30, 2016 [Issue 16445] string mixin allows shebang line in source | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16445 b2.temp@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |b2.temp@gmx.com --- Comment #1 from b2.temp@gmx.com --- Yes that's funny. I've tried to understand why this is accepted. If you compile this °°°°°a.d°°°°°° enum t = "#line 1\n#!a"; mixin(t); |
August 30, 2016 [Issue 16445] string mixin allows shebang line in source | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16445 --- Comment #2 from Cauterite <cauterite@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 -- |
March 21, 2020 [Issue 16445] string mixin allows shebang line in source | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16445 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|b2.temp@gmx.com | -- |
December 17, 2022 [Issue 16445] string mixin allows shebang line in source | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16445 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
Copyright © 1999-2021 by the D Language Foundation