LDC seems to have the same issue as dmd: (see http://d.puremagic.com/issues/show_bug.cgi?id=3252)
Trying to compile this:
/** Compiler error - calling a package interface function.
*/
module packageFunc;
// Same error whether it's an interface or abstract class; although OK if the method is not abstract:
//interface I {
abstract class I {
package void iPack();
}
class A : I {
package void iPack() {}
}
void main () {
A a = new A;
I i = a;
i.iPack; // causes an undefined reference
(cast(A) i).iPack; // a workaround
}
results in the following linker error message (same error dmd has):
# ldc packageFunc.d
packageFunc.o: In function `_Dmain':
packageFunc:(.text+0x49): undefined reference to `_D11packageFunc1I5iPackMFZv'
collect2: ld returned 1 exit status
Error: linking failed:
status: 1