D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5139 - Illegal TokenString allowed
Summary: Illegal TokenString allowed
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid, spec
Depends on:
Blocks:
 
Reported: 2010-10-30 17:00 UTC by John Mandeville
Modified: 2012-01-20 00:36 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description John Mandeville 2010-10-30 17:00:00 UTC
The documentation states that this should be an error:

auto s1 = q{ @ };

However, the compiler allows it.

Tested on Windows with 2.040 and 2.050.
Comment 1 Ellery Newcomer 2010-10-30 17:45:09 UTC
The documentation is not maintained.

If it were, it would say that @ is a valid token in d2.
Comment 2 John Mandeville 2010-10-31 10:34:02 UTC
Ugh.  I have even used the @ token (which I must have found in TDPL).  That makes me feel dumb.  Well, if it's not a compiler error, then it's a documentation error (in multiple places).  :-)
Comment 3 Ellery Newcomer 2010-10-31 11:09:10 UTC
(In reply to comment #2)
> Ugh.  I have even used the @ token (which I must have found in TDPL).  That
> makes me feel dumb.  

Sorry bout that :)

FWIW, this problem and a bunch of others are fixed by the patch in bug 1351.
Comment 4 Walter Bright 2012-01-20 00:36:49 UTC
@ is a valid token, and the documentation was recently fixed to reflect that.