mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We still need to solve a branch with a ReturnStmt to avoid leaving the contextual result type unbound. This isn't currently legal anyway, so isn't likely to come up often in practice, but make sure we can still solve.
10 lines
407 B
Swift
10 lines
407 B
Swift
// {"kind":"complete","original":"0bd7af1f","signature":"swift::constraints::TypeVarRefCollector::walkToStmtPre(swift::Stmt*)","signatureAssert":"Assertion failed: (result), function getClosureType"}
|
|
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
|
{
|
|
let a =
|
|
if <#expression#> {
|
|
return
|
|
}
|
|
return #^^#
|
|
}
|