[Issue 12361] New: Coverage doesn't work on the functions mixin-ed from another module

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 13 19:58:57 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12361

           Summary: Coverage doesn't work on the functions mixin-ed from
                    another module
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jiki at red.email.ne.jp


--- Comment #0 from jiki at red.email.ne.jp 2014-03-13 19:58:54 PDT ---
You create the following two modules.
After you compile and run, the generated coverage data miss the last one.

>dmd -cov moda.d modb.d
>moda
# more convenient >rdmd -cov moda.d

// moda.d
import modb;

void main() {
    local();
    test();
}

mixin My!();
mixin Foreign!();

mixin template My() {
    int local() {
        return 0; // OK: counted in moda.lst
    }
}

// modb.d
mixin template Foreign() {
    int test() {
        return 0; // NG: never counted in modb.lst
    }
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list