mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
16 lines
417 B
D
16 lines
417 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail116.d(11): Error: undefined identifier `x`
|
|
fail_compilation/fail116.d(16): Error: template instance `square!1.2` does not match template declaration `square(_error_ x)`
|
|
---
|
|
*/
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=405
|
|
// typeof in TemplateParameterList causes compiletime segmentfault
|
|
template square(typeof(x) x)
|
|
{
|
|
const square = x * x;
|
|
}
|
|
|
|
const b = square!(1.2);
|