https://issues.dlang.org/show_bug.cgi?id=17763
ZombineDev changed:
What|Removed |Added
Keywords||accepts-invalid,
||rejects-valid
--- Comment #1 from ZombineDev ---
While previous case was rejects-valid, here's a similar one where the compile
accepts invalid code:
$ cat > scope_bug2.d << DBUG
@safe:
struct Context { char[] str; }
void main()
{
Context[1] c;
use(c);
}
Context[] global;
void use(scope ref Context[1] c)
{
// global = c[]; // OK - this does not compile.
global = c; // NG - this does compile, but it should not
// as it is equivalent to the one above.
}
DBUG
$ dmd -dip1000 scope_bug2.d
$ echo $?
0
--