https://d.puremagic.com/issues/show_bug.cgi?id=12322

           Summary: Bad error message with wrong Nullable array argument
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2014-03-08 14:09:29 PST ---
import std.typecons: Nullable;
alias Foo = int[5];
alias NFoo = Nullable!Foo;
NFoo bar1() {
    int[] a;
    return NFoo(a); // Error
}
NFoo bar2() {
    immutable int[] b;
    return NFoo(b); // Error
}
void main() {}



dmd 2.066alpha gives error messages that I think could be better:

test.d(6,16): Error: inout method std.typecons.Nullable!(int[5]).Nullable.this
is not callable using a mutable object
test.d(10,16): Error: inout method std.typecons.Nullable!(int[5]).Nullable.this
is not callable using a mutable object

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to