File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -797,11 +797,11 @@ static bool isBeforeInSource(
797797 SourceLoc firstLocInLCA = firstMismatch == firstAncestors.end ()
798798 ? firstLoc
799799 : sourceMgr.getGeneratedSourceInfo (*firstMismatch)
800- ->originalSourceRange .getStart ();
800+ ->originalSourceRange .getEnd ();
801801 SourceLoc secondLocInLCA = secondMismatch == secondAncestors.end ()
802802 ? secondLoc
803803 : sourceMgr.getGeneratedSourceInfo (*secondMismatch)
804- ->originalSourceRange .getStart ();
804+ ->originalSourceRange .getEnd ();
805805 return sourceMgr.isBeforeInBuffer (firstLocInLCA, secondLocInLCA) ||
806806 (allowEqual && firstLocInLCA == secondLocInLCA);
807807}
Original file line number Diff line number Diff line change @@ -215,6 +215,16 @@ class RecursiveOuter {
215215class GuardedAvailability {
216216}
217217
218+ @Observable class TestASTScopeLCA {
219+ // Make sure ASTScope unqualified lookup can find local variables
220+ // inside initial values with closures when accessor macros are
221+ // involved.
222+ var state : Bool = {
223+ let value = true
224+ return value
225+ } ( )
226+ }
227+
218228@main
219229struct Validator {
220230 @MainActor
You can’t perform that action at this time.
0 commit comments