mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00

* Fix 23722 - Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code * Update test cases
13 lines
316 B
D
13 lines
316 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail39.d(12): Error: function `fail39.main.__funcliteral_L12_C27` cannot access function `foo` in frame of function `D main`
|
|
fail_compilation/fail39.d(11): `foo` declared here
|
|
---
|
|
*/
|
|
|
|
void main()
|
|
{
|
|
void foo() {}
|
|
void function() bar = function void() { foo(); };
|
|
}
|