www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2815] New: Attributes at end of file accepted

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2815

           Summary: Attributes at end of file accepted
           Product: D
           Version: 1.042
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid, patch
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


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).


-- 
Apr 07 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2815






Created an attachment (id=316)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=316&action=view)
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.


-- 
Apr 07 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2815


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



02:02:37 PDT ---
This appears to already be fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 14 2009