[Issue 7172] New: nested class with additional attributes is not	supported
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Dec 27 06:14:36 PST 2011
    
    
  
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 at puremagic.com
        ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at 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: -------
    
    
More information about the Digitalmars-d-bugs
mailing list