https://issues.dlang.org/show_bug.cgi?id=15590
Issue ID: 15590
Summary: the coverage fails in __ctfe branches
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
compile & run with -cov -unittest -main
|auto foo()
|{
1| if(__ctfe)
0000000| return 1;
| else
1| return 0;
|}
|
|unittest
|{
| static assert(foo());
1| assert(!foo());
|}
/home/basile/Bureau/temp/a.d is 75% covered
The process returns 0, meaning that the __ctfe branch has returned 1 and that
consequently the static assertion is correct, however coverage does not detect
it.
The problem is that because of this a module with __ctfe branches and static
assertions can't reach 100% coverage.
--