You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CS] Don't apply compatibility logic to collection literals
We currently permit (but warn on) coercions of
collections with unrelated element types in
certain cases. This is done in an effort to preserve
compatibility with pre-5.3 compilers that may have
allowed such code to compile due to dropping
constraints while solving.
This is limited to collection coercions as we
emit somewhat reasonable code for them that
performs a force cast of the elements at runtime.
However, it turns out that in the case of collection
literals, we peephole the element conversions in
CSApply, leading to codegen crashes. As such,
narrow down the condition of this compatibility
logic to not apply to collection literals, as this
never would have compiled properly.
rdar://88334481
0 commit comments