The conditions for triggering this look somewhat complex. The following targets need to be compiled with -inline:
lib.d
---
void foo(alias F = () => true)()
{
}
void bar()
{
int _value;
unescapeStringLiteral(_value);
}
void unescapeStringLiteral(alias F = () => true)(ref int)
{
// force no-inline, using exceptions or asm { nop; } has the same effect
static bool x;
}
---
app.d
---
import lib;
void main()
{
foo();
bar();
}
---
Building with:
dmd -lib -inline -oflib.a lib.d
dmd -inline app.d lib.a
Results in:
app.o: In Funktion `_Dmain':
app.d:(.text._Dmain+0x12): Nicht definierter Verweis auf `_D3lib58__T21unescapeStringLiteralS28_D3lib9__lambda6MFNaNbNiNfZbZ21unescapeStringLiteralFNaNbNiNfKiZv'
collect2: error: ld returned 1 exit status
--- errorlevel 1
Comment #1 by robert.schadek — 2024-12-13T18:42:04Z