[Issue 10115] New: More @disabled holes
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat May 18 13:10:37 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=10115
           Summary: More @disabled holes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bugzilla at digitalmars.com
--- Comment #0 from Walter Bright <bugzilla at digitalmars.com> 2013-05-18 13:10:36 PDT ---
struct S
{
   int a;
   @disable this();
   this(int) { a = 1; }
   ~this() { assert(a !is 0); }
}
enum E : S { A = S.init }
union U
{
   S s;
   this(this) { assert (s.a !is 0); }
   ~this() { assert (s.a !is 0); }
}
void foo(out S s, out E e, out U u) { }
void main()
{
   S[] arr;
   arr.length = 5; // compiles
   E[] e;
   e.length = 5; // compiles
   S[1] x = (S[1]).init; // compiles
   U[] u;
   u.length = 5; //compiles
   foo(arr[0], e[0], u[0]); // compiles
}
-- reported by Maxim Fomin
-- 
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