[Issue 22242] New: ICE when an overload is aliased back into a mixin
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 26 15:18:04 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22242
Issue ID: 22242
Summary: ICE when an overload is aliased back into a mixin
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ice, rejects-valid
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: maxsamukha at gmail.com
Compiling this causes a segfault:
mixin template Foo()
{
alias foo = typeof(this).foo; // (1)
void foo(int a)
{
ubyte b;
foo(b);
}
}
struct S
{
void foo(ubyte a)
{
}
mixin Foo f;
alias foo = f.foo;
}
void main()
{
}
It is order-dependent: if (1) is placed after foo's definition, the code
compiles.
--
More information about the Digitalmars-d-bugs
mailing list