www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15016] New: Structs with opDispatch cannot be emplaced


          Issue ID: 15016
           Summary: Structs with opDispatch cannot be emplaced
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: schuetzm gmx.net

// xx.d

import std.conv : emplace;

struct S {
    auto opDispatch(string func, Args...)(Args args) { }

void main() {
    S s = void;
    emplace(&s, S.init);

# dmd xx.d
/home/marc/d/druntime/import/object.d(2329): Error: argument
s.opDispatch!"__xpostblit" has no parent
/home/marc/d/phobos/std/conv.d(4054): Error: template instance
object._postblitRecurse!(S) error instantiating
/home/marc/d/phobos/std/conv.d(4160):        instantiated from here:
xx.d(10):        instantiated from here: emplace!(S, S)

This has been broken by the following PR:

Sep 05 2015