Commits

Jordan Rose committed ebdee214640
Handle top-level vars' and closure params' access specially. Parameters are normally given 'private' access, because they can only be referred to within the body of the owning function. However, single-expression closures allow a parameter to appear in a constraint system in the containing context. Mark closure parameters as 'fileprivate' instead. Similarly, 'private' at the top level is normally equivalent to 'fileprivate', but not for a decl that appears within top-level imperative code, which has a TopLevelCodeDecl context. This currently only happens for bindings in a top-level 'guard' statement; mark these variables and constants as 'fileprivate' as well. More progress on SE-0025 ('private' and 'fileprivate').