www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7172] New: nested class with additional attributes is not supported

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

           Summary: nested class with additional attributes is not
                    supported
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



Sample code.

void main()
{
//  abstract class AbstractC{}
//  static assert(!__traits(compiles, { new AbstractC(); }));

    final class FinalC{}
    static assert(!__traits(compiles, { class D : FinalC{} }));

    scope class ScopeC{}
    static assert(!__traits(compiles, { auto  sc = new ScopeC(); }));
    static assert( __traits(compiles, { scope sc = new ScopeC(); }));

//  synchronized class SyncC{ void f(){} }
//  static assert(SyncC.f.mangleof[$-13..$] == "5SyncC1fMOFZv");

//   safe    class SCx{ void f(){} }
//   trusted class SCy{ void f(){} }
//   system  class SCz{ void f(){} }
//  static assert(SCx.f.mangleof[$-12..$] == "3SCx1fMFNfZv");   // Nf:
//  static assert(SCy.f.mangleof[$-12..$] == "3SCy1fMFNeZv");   // Ne:
//  static assert(SCz.f.mangleof[$-10..$] == "3SCz1fMFZv");     // (none)
}

Commented out lines are not supported.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 27 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7172


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch



https://github.com/D-Programming-Language/dmd/pull/562

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 27 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7172




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/273d60ed59ff93b8c1fc0dc7f672b18dfdc59dec
Issue 7172 - nested class with additional attributes is not supported

https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090


Issue 6534 & 7065 & 7172 - Parser improvements for inner aggregates

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7172


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/dmd/commit/381eec8240dcc8eeacd9d81285b77f4324f32090

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