scope as storage class

bearophile bearophileHUGS at lycos.com
Thu Sep 27 10:48:51 PDT 2012


Namespace:

> So you mean this code should give an error?
>
> import std.stdio;
>
> class A { }
>
> A ga;
>
> void foo(scope A a) {
> 	ga = a;
> }
>
> void main() {
> 	A a = new A();
> 	
> 	foo(a);
> }

I think so.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list