September 24 [Issue 24783] New: ref and out declarations can be initialized with null references | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24783 Issue ID: 24783 Summary: ref and out declarations can be initialized with null references Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: bugzilla@digitalmars.com @safe: void test(ref int r, out int o); void foo() { int* p; test(*p, *p); } compiles without complaint. They should get a null check. -- |
Copyright © 1999-2021 by the D Language Foundation