www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20540] New: (White|Black)Hole does not work with return|scope


          Issue ID: 20540
           Summary: (White|Black)Hole does not work with return|scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

White/BlackHole does not generate correct function signatures for functions
annotated with return/scope:


import std.typecons;

interface I
    I foo() return scope;

void main()
    scope i = new BlackHole!I();


/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d-mixin-4543(4544): Error:
function I std.typecons.AutoImplement!(I, generateEmptyFunction,
isAbstractFunction).AutoImplement.foo() does not override any function, did you
mean to override scope I onlineapp.I.foo() return?
/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d(4315): Error: template
instance std.typecons.AutoImplement!(I, generateEmptyFunction,
isAbstractFunction) error instantiating
onlineapp.d(10):        instantiated from here: BlackHole!(I)

Jan 27 2020