Open darronschall opened 1 year ago
cc @angela-laar
seems like a dupe of an existing issue, looking to confirm
I'm sorry if this is a duplicate. I really did search before I logged it, but I couldn't find any existing issues with a stack trace including getDependentUpperBounds
.
More minimal:
@import Foundation;
@interface ObjCClass<T>: NSObject
- (void)crash:(void (^)(T _Nonnull))block __attribute__((swift_name("crash(block:)")));
@end
protocol P<A, B> {
associatedtype A
associatedtype B
}
func test<T1: AnyObject, T2: P>(
obj: ObjCClass<T1>, _: T2
) where T2.B == Never {
obj.crash { _ in }
}
Not all primary associated types constrained?
Interface type: τ_0_1
<τ_0_0, τ_0_1 where τ_0_0 : AnyObject, τ_0_1 : P, τ_0_1.B == Never>
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: bin/swift-frontend -primary-file /Users/mac/Desktop/test.swift -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -import-objc-header /Users/mac/Downloads/SwiftCrash/SwiftCrash/CFlow.h -emit-irgen
1. Swift version 5.9-dev (LLVM 91080e65df791d6, Swift c1d5118c21da49a)
...
Description
I have some code that compiled and ran OK in Xcode 14.2 / Swift 5.7.
After upgrading to Xcode 14.3 / Swift 5.8, my project no longer compiles. Instead, it triggers a compiler crash with stack trace.
I've attached a minimal reproducer project. This project compiles with Swift 5.7 but crashes the Swift 5.8 compiler. SwiftCrash.zip
Steps to reproduce