digitalmars.D.bugs - [Issue 21542] New: core.lifetime.move cannot be evaluated at compile
- d-bugmail puremagic.com (31/31) Jan 11 2021 https://issues.dlang.org/show_bug.cgi?id=21542
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 puremagic.com Reporter: snarwin+bugzilla 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. --
Jan 11 2021