Issue ID: 18503
           Summary: Confusing error message for erroneous postblit
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd

This code:

class C
    this(this) {}


test.d(3): Error: postblit can only be a member of struct/union, not class C

Ok. Let's define a union with a postblit:

union D
    this(this) {}


test.d(8): Error: function `test.D.__postblit` destructors, postblits and
invariants are not allowed in union D

That's odd, you just instructed me that a union can have a postblit! Shame on
you compiler!

Spec: "Unions may not have postblits, destructors, or invariants." [1]



Reply via email to