Bug 12058 – std.typecons.AutoImplement does not work for inout member functions
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-01T22:57:00Z
Last change time
2014-02-02T02:41:01Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2014-02-01T22:57:18Z
Test code:
interface Foo
{
inout(Object) foo() inout;
}
void main()
{
import std.typecons;
BlackHole!Foo o;
}
Output:
C:\dmd2\src\phobos\std\typecons.d-mixin-2067(2068): Error: inout on return means inout must be on a parameter as well for autoImplement_helper_.F_foo_0.RT()
C:\dmd2\src\phobos\std\typecons.d(1867): Error: template instance std.typecons.AutoImplement!(Foo, generateEmptyFunction, isAbstractFunction) error instantiating
test.d(8): instantiated from here: BlackHole!(Foo)
test.d(8): Error: template instance std.typecons.BlackHole!(Foo) error instantiating