https://issues.dlang.org/show_bug.cgi?id=13777

--- Comment #2 from Kenji Hara <k.hara...@gmail.com> ---
(In reply to Denis Shelomovskij from comment #0)
> This code used to work:
> ---
> T select(T)(in size_t idx, T[2] values...)
> {
>     return values[idx];
> }
> 
> void main()
> {
>     ubyte ub = select(0, 3, 4);
> }
> ---

With 2.057 to 2.066 and git-head, the code fails to compile because T is
deduced to int and an int function return is not always implicitly convertible
to ubyte.

Which dmd version had you used? If the code has been accepted with certain dmd
release, it was definitely an accepts-invalid bug.

> In case it was an accept-invalid bug, a clear reason to disallow the feature
> should be stated as it breaks user code without any deprecation cycle.

Bugfix does not need deprecation cycle.

--

Reply via email to