mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
11 lines
252 B
Swift
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}}
|
|
}
|
|
}
|