Friends don't let friends use inout with scope and -dip1000

Kagamin spam at here.lot
Wed Aug 22 08:17:51 UTC 2018


On Tuesday, 21 August 2018 at 14:04:15 UTC, Steven Schveighoffer 
wrote:
> I would guess it's no different than other inferred attributes. 
> I would also guess that it only gets promoted to a return 
> parameter if it's actually returned.

If we can't have properly typed parameters, it feels like it has 
potential to prevent some patterns.

This prevents automatic scope promotion:

template escape(T)
{
     int[] escape1(scope int[] r)
     {
         return r;
     }
     alias escape=escape1;
}


More information about the Digitalmars-d mailing list