const, final, scope function parameters

Robert Fraser fraserofthenight at gmail.com
Tue May 29 09:44:00 PDT 2007


Robert Fraser Wrote:
> 
> struct Foo
> {
>     int x;
> }
> 
> void bar(in Foo var)
> {
>     var.x = 10;
> }
> 
> Allowed?

And also, what if it was a reference type instead of a value type:

class Foo
{
    int x;
}

void bar(Foo var)
{
    var.x = 5; // Is this allowed?
}



More information about the Digitalmars-d mailing list