mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If the base type of the specialization is invalid, the AST node is going to be replaced with `ErrorExpr`. We need to handle that gracefully when attempting to apply specialization in such situations. Resolves: https://github.com/swiftlang/swift/issues/77644
12 lines
255 B
Swift
12 lines
255 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// rdar://139913219 - Make sure we don't crash.
|
|
|
|
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}}
|
|
}
|