digitalmars.D.bugs - [Issue 13077] New: [dmd 2.066-b2] std.range.array with shared
- via Digitalmars-d-bugs (40/40) Jul 08 2014 https://issues.dlang.org/show_bug.cgi?id=13077
https://issues.dlang.org/show_bug.cgi?id=13077 Issue ID: 13077 Summary: [dmd 2.066-b2] std.range.array with shared InputRangeObject Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: NCrashed gmail.com DMD: 2.066.0-b2 Platform: 3.14.9-200.fc20.x86_64 ``` import std.range; class A {} InputRange!(shared A) foo() { return [new shared A].inputRangeObject; } void bar() { auto res = foo.array; } void main() {} ``` Compile-time error: ``` /usr/include/dmd/phobos/std/conv.d(3914): Error: cannot implicitly convert expression (arg) of type shared(A) to app.A /usr/include/dmd/phobos/std/array.d(2476): Error: template instance std.conv.emplaceRef!(shared(A)).emplaceRef!(shared(A)) error instantiating /usr/include/dmd/phobos/std/array.d(64): instantiated from here: put!(shared(A)) source/app.d(12): instantiated from here: array!(InputRange!(shared(A))) ``` --
Jul 08 2014