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: nob...@puremagic.com
        ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-12-27 06:14:33 PST ---
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: -------

Reply via email to