Compiler crash with generics involving existentials #71012
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
existentials
Feature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased values
generics
Feature: generic declarations and types
Description
I've found another issue with existentials, potentially related to my recent issues #70988 and #71000.
Reproduction
Stack dump
Expected behavior
Not to crash the compiler. The code should either correctly compile, or produce a diagnostic.
Environment
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Additional information
Workaround
Explicitly set type of
bar
, changing:To:
The text was updated successfully, but these errors were encountered: