[Issue 12938] New: Error message mistake in out parameter with @disable this

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jun 17 06:36:13 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12938

          Issue ID: 12938
           Summary: Error message mistake in out parameter with @disable
                    this
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: bearophile_hugs at eml.cc

struct Foo {
    @disable this();
}
void foo(out Foo x) {}
void main() {}

Gives a error message with a typo:

test.d(4): Error: cannot have out parameter of type Foo because 
the default construction is disbaled

--


More information about the Digitalmars-d-bugs mailing list