blob: 30ea373b64c5b13b560e0c81e84c3b451675a112 [file] [log] [blame]
// https://bugzilla.gdcproject.org/show_bug.cgi?id=285
// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
inout(char)[] test285(inout(char)* s) @nogc @system pure nothrow
{
import core.stdc.string : strlen;
return s ? s[0 .. strlen(s)] : null;
}
void main()
{
assert(test285(null) == null);
assert(test285("foo") == "foo");
}