Closed
Description
The following test case (added in #77643) incorrectly produces failed to produce diagnostic for expression
:
func bar(_ x: Int.Type, _: Int) {}
func bar<T>(_ x: T.Type, _: Int) {}
func foo() {
bar(X<Int?>.self, .zero)
// expected-error@-1 {{cannot find 'X' in scope}}
// expected-error@-2 {{failed to produce diagnostic for expression}}
}
Looks like we're ending up with a leftover inactive constraint:
(failed due to remaining inactive constraints:
$T1 explicit generic argument binding Pack{Int?} @ locator@0x1378873a8 [Error@/Users/hamish/src/swift-test-arena/main.swift:608:7]
)
Swift version 6.1-dev (LLVM 834e05aeccee532, Swift 45d15d1)
Target: arm64-apple-macosx15.0