Bug 2815 – Attributes at end of file accepted

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2009-04-07T02:04:00Z
Last change time
2014-04-18T09:12:06Z
Keywords
accepts-invalid, patch
Assigned to
bugzilla
Creator
clugdbug

Attachments

IDFilenameSummaryContent-TypeSize
316attributeEOF.patchfix 2815text/plain389

Comments

Comment #0 by clugdbug — 2009-04-07T02:04:06Z
A file consisting only of the line: --- public static nothrow pure extern --- compiles without error. This patch (for D2.027) makes it an error. (It remains OK to end with a colon).
Comment #1 by clugdbug — 2009-04-07T02:06:12Z
Created attachment 316 fix 2815 Adds: case TOKeof: error("declaration expected following attribute, not EOF"); break; to Parser::parseBlock() in parse.c, by analogy to the behaviour for semicolon.
Comment #2 by bugzilla — 2009-10-14T02:02:37Z
This appears to already be fixed.