Files
swift-mirror/test/expr/capture/nested_class.swift
Doug Gregor 1082ea51a0 Actual use location information when looking for local variables.
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
2013-10-31 22:56:02 +00:00

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