Telegram Group & Telegram Channel
Алиса копается
&[T; N] автоматически умеет приводиться к &[T], поэтому третий код, конечно, работает в обеих вариациях. Остается вопрос, что происходит при выводе типов. На практике оказывается, что b2 работает, а a2 не работает, т.е. тип элемента массива "жадно" выводится…
Правильный ответ: не скомпилируется строка 1. Все остальные соберутся.

Почему 1 не собирается, а 2 собирается — в целом логично: опять тип выводится исходя из первого встреченного аргумента. Тут ничего нового по сравнению с [_; 2].

Почему и 3, и 4 собираются мне, опять же, неизвестно. Здесь вывод типов устроен как-то иначе. С match, к слову, то же самое, т.е. от (не)ограниченности количества объединяемых типов результат не зависит.



group-telegram.com/alisa_rummages/188
Create:
Last Update:

Правильный ответ: не скомпилируется строка 1. Все остальные соберутся.

Почему 1 не собирается, а 2 собирается — в целом логично: опять тип выводится исходя из первого встреченного аргумента. Тут ничего нового по сравнению с [_; 2].

Почему и 3, и 4 собираются мне, опять же, неизвестно. Здесь вывод типов устроен как-то иначе. С match, к слову, то же самое, т.е. от (не)ограниченности количества объединяемых типов результат не зависит.

BY Алиса копается


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/alisa_rummages/188

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

Either way, Durov says that he withdrew his resignation but that he was ousted from his company anyway. Subsequently, control of the company was reportedly handed to oligarchs Alisher Usmanov and Igor Sechin, both allegedly close associates of Russian leader Vladimir Putin. Messages are not fully encrypted by default. That means the company could, in theory, access the content of the messages, or be forced to hand over the data at the request of a government. "Markets were cheering this economic recovery and return to strong economic growth, but the cheers will turn to tears if the inflation outbreak pushes businesses and consumers to the brink of recession," he added. Recently, Durav wrote on his Telegram channel that users' right to privacy, in light of the war in Ukraine, is "sacred, now more than ever." The message was not authentic, with the real Zelenskiy soon denying the claim on his official Telegram channel, but the incident highlighted a major problem: disinformation quickly spreads unchecked on the encrypted app.
from kr


Telegram Алиса копается
FROM American