mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
19 lines
353 B
D
19 lines
353 B
D
// https://issues.dlang.org/show_bug.cgi?id=2920
|
|
// recursive templates blow compiler stack
|
|
// template_17_A.
|
|
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail280.d(13): Error: template instance `fail280.t!500` recursive expansion exceeded allowed nesting limit
|
|
---
|
|
*/
|
|
|
|
template t(int i)
|
|
{
|
|
const int x = t!(i + 1).x;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int i = t!(0).x;
|
|
}
|