Files
swift-mirror/test/Constraints/issue-77315.swift
Slava Pestov 9ddfc9e47b Sema: Fix crash in type resolution when tuple type contains type variables
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.
2025-01-24 17:05:20 -05:00

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() }