www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12938] New: Error message mistake in out parameter with

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 puremagic.com
          Reporter: bearophile_hugs 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

--
Jun 17 2014