Bug 20540 – (White|Black)Hole does not work with return|scope functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-01-27T19:13:26Z
Last change time
2020-01-28T00:05:29Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2020-01-27T19:13:26Z
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)
Comment #1 by dlang-bot — 2020-01-27T19:18:22Z
@MoonlightSentinel created dlang/phobos pull request #7376 "Fix Issue 20540 - (White|Black)Hole does not work with return|scope functions" fixing this issue: - Fix Issue 20540 - (White|Black)Hole does not work with return|scope functions https://github.com/dlang/phobos/pull/7376
Comment #2 by dlang-bot — 2020-01-28T00:05:29Z
dlang/phobos pull request #7376 "Fix Issue 20540 - (White|Black)Hole does not work with return|scope functions" was merged into master: - af50bed328bd0999d2cd10a49ce1c69d0ee6e233 by MoonlightSentinel: Fix Issue 20540 - (White|Black)Hole does not work with return|scope functions https://github.com/dlang/phobos/pull/7376