Summary: Add check for ref/out parameters not being null
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Denis <> 2012-03-02 17:48:33 MSK 
void f(ref int i) { }
void g(out int i) { }

void main()
    int* ptr = null;
    f(*ptr); // No RT errors
    g(*ptr); // `Access violation` because of a try to write a default value
Tests for ref/out parameters not being null will be very useful.

Current specs doesn't prohibit null ref/out parameters but it looks
inconsistent. I'd like specs to be changed to prohibit such cases or to clarify
why is it useful (and not prohibited).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to