dmd/compiler/test/fail_compilation/ice12235.d
Dennis a3abf1187e
Fix 23722 - Lambdas are mangled incorrectly when using multiple compi… (#15343)
* Fix 23722 - Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code

* Update test cases
2024-11-27 12:03:16 +01:00

17 lines
495 B
D

/*
TEST_OUTPUT:
---
fail_compilation/ice12235.d(14): Error: forward reference to inferred return type of function `__lambda_L12_C5`
fail_compilation/ice12235.d(15): Error: forward reference to inferred return type of function `__lambda_L12_C5`
fail_compilation/ice12235.d(15): while evaluating `pragma(msg, __lambda_L12_C5.mangleof)`
---
*/
void main()
{
(){
int x;
enum s = __traits(parent, x).mangleof;
pragma(msg, __traits(parent, x).mangleof);
}();
}