On 8/15/2016 6:54 AM, Rory McGuire via Digitalmars-d-announce wrote:
okay nice, so that code would not compile but code such as:
void test() {
scope rnd  = new Rnd; // reference semantic and stack allocated
auto rnd2 = rnd;
        some_sneaky_function_that_saves_global_state(rnd);
}
would still not be checked. And would crash inexplicably at the point the global
was accessed?

A local variable initialized with a scoped value will have 'scope' inferred for 
it.

Reply via email to