[Issue 22638] New: [ICE] cod4.d: Assertion `cast(int)sz > 0' failed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 30 19:35:22 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22638
Issue ID: 22638
Summary: [ICE] cod4.d: Assertion `cast(int)sz > 0' failed
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: tim.dlang at t-online.de
extern(C++) struct S
{
this(ref const(S));
~this();
}
struct AutoRefWrapper(T) if(is(T == class))
{
private T obj;
template opDispatch(string name)
{
auto opDispatch(Params...)(auto ref Params params)
{
return __traits(getMember, obj, name)(params);
}
}
}
extern(C++) class C
{
final void setS(ref const S);
final void setS(const S s)
{
setS(s);
}
}
void main()
{
C c;
AutoRefWrapper!C(c).setS(S());
}
Compiling the above code with dmd results in an assertion failure on Linux
x86_64:
dmd: src/dmd/backend/cod4.d:424: Assertion `cast(int)sz > 0' failed.
--
More information about the Digitalmars-d-bugs
mailing list