[Issue 10663] Mixin int not converting
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 17 18:24:42 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10663
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2013-07-17 18:24:41 PDT ---
(In reply to comment #0)
[snip]
Problem is in Declaration template.
>
> template Declaration(uint idx, T)
> {
> enum Declaration =
> "const("~T.stringof~")* _s"~idx~";"; // here
> //text("const(",T.stringof,")* _s",idx,";");
> }
It concatenates string ~ uint ~ string.
When uint idx is 0, Declaration!(0, T) generates
"const(StateRunning)* _s\0;"
There's null character.
Then, in mixin statement, dmd lexer extract null character as EOF token, and
reports "semicolon expected, not 'EOF'" error.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list