mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This addresses the bulk of <rdar://problem/15344950>, which involes us not being able to find local variable declarations in expressions when the parser didn't pre-bind them for us. The fix to name lookup itself insures that a case such as case (var a, a) doesn't allow the second 'a' to find the first. Swift SVN r9858
11 lines
183 B
Swift
11 lines
183 B
Swift
// RUN: %swift -parse %s -verify
|
|
|
|
func capture_nested_class() {
|
|
var a = 5
|
|
class Inner {
|
|
func foo() -> Int {
|
|
return a // FIXME: should probably be disallowed
|
|
}
|
|
}
|
|
}
|