DIP69 - Implement scope for escape proof references
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Thu Dec 4 13:14:03 PST 2014
On 12/4/2014 10:45 AM, H. S. Teoh via Digitalmars-d wrote:
> However, AFAIK, template *classes* trigger attribute inference on its
> (non-template) member functions, so this would be problematic:
>
> class Base(T) {
> T data;
> void method(ref T); // inferred to be scope
> }
>
> class Derived : Base!int {
> override void method(ref T); // oops, cannot override
> }
I agree, it's a good point. Scope inference cannot be done for virtual
functions. I amended the DIP.
More information about the Digitalmars-d
mailing list