July 25, 2004 alias foo foo - assert in compiler | ||||
---|---|---|---|---|
| ||||
[aliasbug.d] void foo() {}; void main() { alias foo foo; } produces [dmd 0.96]: aliasbug.d(5): alias foo recursive alias declaration Assertion failure: 's != this' on line 267 in file 'declaration.c' abnormal program termination |
July 29, 2004 Re: alias foo foo - assert in compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Zaitseff | > [aliasbug.d]
>
> void foo() {};
>
> void main()
> {
> alias foo foo;
> }
>
> produces [dmd 0.96]:
>
> aliasbug.d(5): alias foo recursive alias declaration
> Assertion failure: 's != this' on line 267 in file 'declaration.c'
>
> abnormal program termination
I just discovered another bug with aliases...
template T()
{
void foo() { return 0; }
alias foo foo;
}
mixin T;
void main()
{
foo();
}
Compiler [0.97] goes into endless loop and does not respond.
|
Copyright © 1999-2021 by the D Language Foundation