Since contracts are logically part of an interface, they should be included in the automatically generated .di file See also: https://d.puremagic.com/issues/show_bug.cgi?id=6549 as to why it won't work for abstract classes or even interface files without the bodies.
@dkorpel created dlang/dmd pull request #13943 "Fix Issue 12344 - .di generation doesn't include contracts in interfaces" fixing this issue: - Fix Issue 12344 - .di generation doesn't include contracts in interfaces https://github.com/dlang/dmd/pull/13943
dlang/dmd pull request #13943 "Fix Issue 12344 - .di generation doesn't include contracts in interfaces" was merged into master: - d42016e159126e21125fdbd7ffb9c4bf0376d732 by Dennis Korpel: Fix Issue 12344 - .di generation doesn't include contracts in interfaces https://github.com/dlang/dmd/pull/13943