Files
swift-mirror/validation-test/compiler_crashers_fixed/28187-llvm-foldingset-swift-constraints-constraintlocator.swift
Chris Lattner 5ba57cb498 Fix ExprRewriter::coerceClosureExprToVoid to be resilient to type checking
closures which have already been transformed into void conversion closures.

This fixes 28213-swift-expr-walk.swift/28187-llvm-foldingset-swift-constraints-constraintlocator.swift
2016-01-17 12:07:13 -08:00

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