With -de, deprecated calls are errors. So this struct does not convert to string: struct S { string foo() { return "foo"; } deprecated alias foo this; } However, if we check: static assert(!is(S : string)); We see that the compiler still falsely asserts that S is convertible to string.
@FeepingCreature created dlang/dmd pull request #11081 "Fix issue 20789: -de should disable is(T : U) if T alias-this to U is deprecated" fixing this issue: - Fix issue 20789: don't indicate deprecated alias this or alias this of deprecated symbol as implicit conversion in is() when -de (deprecations as errors) is on. https://github.com/dlang/dmd/pull/11081
dlang/dmd pull request #11081 "Fix issue 20789: -de should disable is(T : U) if T alias-this to U is deprecated unless in deprecated scope" was merged into master: - d1cd1b9057934fa58a08c2f50e09805aacd7fc47 by Mathis Beer: Fix issue 20789: don't indicate deprecated alias this or alias this of deprecated symbol as implicit conversion in is() when -de (deprecations as errors) is on. https://github.com/dlang/dmd/pull/11081