mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
closures which have already been transformed into void conversion closures. This fixes 28213-swift-expr-walk.swift/28187-llvm-foldingset-swift-constraints-constraintlocator.swift
18 lines
385 B
Swift
18 lines
385 B
Swift
// RUN: not %target-swift-frontend %s -parse
|
|
// REQUIRES: objc_interop
|
|
|
|
// Distributed under the terms of the MIT license
|
|
// Test case found by https://github.com/allu22 (Alvar Hansen)
|
|
|
|
class A {
|
|
func a() {
|
|
A().d { [weak self] (c) -> Void in
|
|
self?.b(c)
|
|
}
|
|
}
|
|
func d(e: ((AnyObject)->Void)) {
|
|
}
|
|
func b(f: AnyObject, g: AnyObject) {
|
|
}
|
|
}
|