1 /* REQUIRED_ARGS: -betterC
4 fail_compilation/test23112.d(106): Error: function `test23112.bar` is `@nogc` yet allocates closure for `bar()` with the GC
5 fail_compilation/test23112.d(108): function `test23112.bar.f` closes over variable `a`
6 fail_compilation/test23112.d(106): `a` declared here
10 // https://issues.dlang.org/show_bug.cgi?id=23112
14 struct Forward(alias F
)
16 auto call()() { return F(); }
19 auto bar(int a
) nothrow @safe
30 assert(bar(3).call() == 3);