Comment #0 by default_357-line — 2020-04-21T11:40:56Z
Repro:
interface A { }
interface B : A { }
static assert(is(ImplicitConversionTargets!B == AliasSeq!(A)));
Expected:
AliasSeq!(A)
Got:
AliasSeq!()
To add, TransitiveBaseTypeTuple (which ImplicitConversionTargets uses) also doesn't support interface parameters.
Comment #1 by dlang-bot — 2020-04-21T11:43:48Z
@FeepingCreature created dlang/phobos pull request #7453 "Fix/issue 20756 implicitconversiontargets interfaces" fixing this issue:
- Fix issue 20756: support interfaces in ImplicitConversionTargets
https://github.com/dlang/phobos/pull/7453
Comment #2 by n8sh.secondary — 2020-05-24T15:57:47Z
Changed from 'bug' to 'enhancement' since the behavior of ImplicitConversionTargets is correct for its documentation:
```
If the type is not a built-in value type or a class derived from
`Object`, the an empty $(REF AliasSeq,std,meta) is returned.
```
Comment #3 by default_357-line — 2020-05-24T17:44:48Z
I would argue that then the documentation is another bug. A template called "ImplicitConversionTargets" can be reasonably expected to return implicit conversion targets.
Comment #4 by dlang-bot — 2021-04-27T08:37:18Z
@FeepingCreature created dlang/phobos pull request #8016 "Fix issue 20756: Handle interface argument in `AllImplicitConversionTargets`." fixing this issue:
- Fix issue 20756: Handle interface argument in `AllImplicitConversionTargets`.
https://github.com/dlang/phobos/pull/8016
Comment #5 by dlang-bot — 2021-04-27T11:42:12Z
dlang/phobos pull request #8016 "Fix issue 20756: Handle interface argument in `AllImplicitConversionTargets`." was merged into master:
- 3e619db79c6e4e33c2cf39de213f3a097e3d9951 by Mathis Beer:
Fix issue 20756: Handle interface argument in `AllImplicitConversionTargets`.
https://github.com/dlang/phobos/pull/8016
Comment #6 by default_357-line — 2021-04-27T14:11:15Z
ImplicitConversionTargets has been deprecated. AllImplicitConversionTargets supports interface inheritance.