[Issue 21542] New: core.lifetime.move cannot be evaluated at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 11 20:03:14 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21542

          Issue ID: 21542
           Summary: core.lifetime.move cannot be evaluated at compile time
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: snarwin+bugzilla at gmail.com

The following example program fails to compile as of DMD 2.094.2:

---
import core.lifetime: move;

struct NoCopy { @disable this(this); }

NoCopy fun(NoCopy x)
{
    return move(x);
}

enum y = fun(NoCopy());
---

The compiler produces the following error:

---
/usr/include/dmd/druntime/import/core/lifetime.d(1804): Error: memcpy cannot be
interpreted at compile time, because it has no available source code
---

This issue is related to, but distinct from, issue 8991--that issue is a DMD
bug, whereas this one is a Druntime bug.

--


More information about the Digitalmars-d-bugs mailing list