[Issue 10998] New: [REG 2.063] compile-time postblit call check is incorrectly suppressed.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 8 23:00:41 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10998

           Summary: [REG 2.063] compile-time postblit call check is
                    incorrectly suppressed.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: regression
          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> 2013-09-08 23:00:39 PDT ---
DMD 2.063 does not print any error message at line 10.

// from dmd test suite fail_compilation/fail340.d
---
struct CopyTest
{
    double x;
    this(double a) { x = a * 10.0;}
    this(this) { x += 2.0; }
}

const CopyTest z = CopyTest(5.3);

const CopyTest w = z;   // line 10
static assert(w.x == 55.0);
---

Output:
 dmd2.062:
  test.d(10): Error: variable test.w of type struct const(CopyTest) uses
this(this), which is not allowed in static initialization

 dmd2.063:
  (no error message)

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