Files
swift-mirror/validation-test/compiler_crashers/006-placeholder-property-initializer-with-closure.swift
Joe Groff bee33a060c Sema: Ban pattern bindings without variables in globals and properties.
There's no real use for declaring a property or global variable without binding it to anything, and closure context mangling relies on having a name to associate with closures. Fixes crash suite #006 (rdar://problem/18232699).

Swift SVN r22105
2014-09-18 22:59:58 +00:00

11 lines
252 B
Swift

// RUN: %swift -emit-ir -verify %s
// Test case submitted to project by https://github.com/AlexDenisov (Alexey Denisov)
func i(c: () -> ()) {
}
class a {
var _ = i() { // expected-error{{property declaration does not bind any variables}}
}
}