Files
swift-mirror/validation-test/compiler_crashers_2_fixed/issue-69947.swift
Slava Pestov 4aa0008d74 SILGen: Rewrite captured local archetypes into primary archetypes
This implements support for autoclosures, closures and local functions
nested within a pack iteration for loop.

The combination of explicit closure expressions and pack expansion
expressions still needs some work.

Fixes #66917.
Fixes #69947.
Fixes rdar://113505724.
Fixes rdar://122293832.
Fixes rdar://124329076.
2024-05-17 17:45:05 -04:00

13 lines
330 B
Swift

// RUN: %target-swift-frontend -emit-ir %s
class Thing<T> {
var value: T
init(_ value: T) { self.value = value }
func combineThings<each U>(head: Thing<T>, tail: repeat Thing<each U>) {
repeat (each tail).doSomething(each tail) { _ in }
}
func doSomething(_ value: AnyObject, closure: @escaping (T) -> Void) {}
}