mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00

* Fix 23722 - Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code * Update test cases
16 lines
253 B
D
16 lines
253 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail12908.d(14): Error: `pure` delegate `fail12908.main.__foreachbody_L12_C5` cannot call impure function `fail12908.g`
|
|
---
|
|
*/
|
|
|
|
void g() {}
|
|
|
|
void main() pure
|
|
{
|
|
foreach (k, v; ["": ""])
|
|
{
|
|
g();
|
|
}
|
|
}
|