mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This can happen when we're generating constraints and resolving the type annotations written in a closure expression. Just skip the non-copyable check in this case. Fixes rdar://problem/143031466.
6 lines
163 B
Swift
6 lines
163 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func foo<T>(_: () -> (Optional<T>, Int)) -> T { fatalError() }
|
|
|
|
let x: Int = foo { () -> (Optional, Int) in fatalError() }
|