[Issue 18296] New: [Reg2.078.1] invalid code with coverage and copy construction
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 24 21:35:48 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18296
Issue ID: 18296
Summary: [Reg2.078.1] invalid code with coverage and copy
construction
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: wrong-code
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << CODE
alias AliasSeq(Args...) = Args;
struct Duration
{
this(long hnsecs)
{
_hnsecs = hnsecs;
}
long _hnsecs;
}
void main()
{
foreach(U; AliasSeq!(Duration, const Duration))
{
const Duration t = 42;
U u = t;
assert(t._hnsecs == u._hnsecs);
}
}
CODE
dmd -cov -run bug.d
--
More information about the Digitalmars-d-bugs
mailing list