http://d.puremagic.com/issues/show_bug.cgi?id=3252
Summary: undefined reference to package function called from an interface Product: D Version: 1.045 Platform: x86 OS/Version: Linux Status: NEW Keywords: link-failure Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: diggory.ha...@gmail.com When attempting to call a function with package protection level from an interface, I get an undefined reference error. Code: /** Compiler error - calling a package interface function. */ module packageFunc; interface 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 } The linker error: # dmd packageFunc.d packageFunc.o: In function `_Dmain': packageFunc.d:(.text._Dmain+0x22): undefined reference to `_D11packageFunc1I5iPackMFZv' collect2: ld returned 1 exit status --- errorlevel 1 Possibly similar to bug 2894. This just bit me when including package protection to a lot of class functions in order to implement invariant tests (where package protection is the only applicable type of protection). I presume it's a bug; haven't tested if it's also the case with dmd 2.0 or other compilers yet. Any idea if it would be simple to fix? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------