module ice;
extern(C) int _D3ice3funFZi;
int fun() { return 0; }
int main()
{
return fun();
}
More subtle, but the same applies to conflicts from pragma(mangle).
pragma(mangle, "ice") int fun() { return 0; }
pragma(mangle, "ice") int var;
int main()
{
return fun();
}
Where again LDC renames one of the conflicting symbols to ice.1 (https://compiler-explorer.com/z/TfPrjoM3n)
If an importing module were to call fun(), how would it know to reference the .1 symbol?
*_D3ice3funFZi()'fun' matches conflicting symbolsfun.1(https://compiler-explorer.com/z/s7999chjc)More subtle, but the same applies to conflicts from
pragma(mangle).Where again LDC renames one of the conflicting symbols to
ice.1(https://compiler-explorer.com/z/TfPrjoM3n)If an importing module were to call
fun(), how would it know to reference the.1symbol?