[Issue 21949] noreturn doesn't follow covariance rules
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 21 19:12:23 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21949
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel updated dlang/dmd pull request #12559 "Fix 21949 - Implement
conversion/covariance rules for TypeNoreturn" fixing this issue:
- Fix 21949 - Implement conversion/covariance rules for TypeNoreturn
Ensure that `TypeNoreturn.implicitConv` and `TypeNoreturn.constConv`
always return `Match.convert` for other types because the bottom type
is convertible to any type.
Also make `covariant` accept `TypeNoreturn` as a substitute for any other
type because the return value will never actually be returned.
This behaviour is explicitly specified by DIP 1034.
https://github.com/dlang/dmd/pull/12559
--
More information about the Digitalmars-d-bugs
mailing list