[Issue 20540] New: (White|Black)Hole does not work with return|scope functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 27 19:13:26 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20540
Issue ID: 20540
Summary: (White|Black)Hole does not work with return|scope
functions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: moonlightsentinel at 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();
i.foo();
}
------------------------------------
/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)
--
More information about the Digitalmars-d-bugs
mailing list