Merge pull request #10064 from CodaFi/thats-not-my-name

diff --git a/lib/AST/Pattern.cpp b/lib/AST/Pattern.cpp
index c7d7d41..1ed64df 100644
--- a/lib/AST/Pattern.cpp
+++ b/lib/AST/Pattern.cpp
@@ -166,6 +166,24 @@
         fn(Named->getDecl());
       return P;
     }
+
+    // Only walk into an expression insofar as it doesn't open a new scope -
+    // that is, don't walk into a closure body.
+    std::pair<bool, Expr *> walkToExprPre(Expr *E) override {
+      if (isa<ClosureExpr>(E)) {
+        return { false, E };
+      }
+      return { true, E };
+    }
+
+    // Don't walk into anything else.
+    std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
+      return { false, S };
+    }
+    bool walkToTypeLocPre(TypeLoc &TL) override { return false; }
+    bool walkToTypeReprPre(TypeRepr *T) override { return false; }
+    bool walkToParameterListPre(ParameterList *PL) override { return false; }
+    bool walkToDeclPre(Decl *D) override { return false; }
   };
 } // end anonymous namespace
 
diff --git a/validation-test/compiler_crashers/28482-hasaccessibility-accessibility-not-computed-yet.swift b/validation-test/compiler_crashers_fixed/28482-hasaccessibility-accessibility-not-computed-yet.swift
similarity index 88%
rename from validation-test/compiler_crashers/28482-hasaccessibility-accessibility-not-computed-yet.swift
rename to validation-test/compiler_crashers_fixed/28482-hasaccessibility-accessibility-not-computed-yet.swift
index 08dc305..00f45d8 100644
--- a/validation-test/compiler_crashers/28482-hasaccessibility-accessibility-not-computed-yet.swift
+++ b/validation-test/compiler_crashers_fixed/28482-hasaccessibility-accessibility-not-computed-yet.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 // REQUIRES: asserts
 {guard let{protocol A{extension{let d}}}let f=d