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(
797
797
SourceLoc firstLocInLCA = firstMismatch == firstAncestors.end ()
798
798
? firstLoc
799
799
: sourceMgr.getGeneratedSourceInfo (*firstMismatch)
800
- ->originalSourceRange .getStart ();
800
+ ->originalSourceRange .getEnd ();
801
801
SourceLoc secondLocInLCA = secondMismatch == secondAncestors.end ()
802
802
? secondLoc
803
803
: sourceMgr.getGeneratedSourceInfo (*secondMismatch)
804
- ->originalSourceRange .getStart ();
804
+ ->originalSourceRange .getEnd ();
805
805
return sourceMgr.isBeforeInBuffer (firstLocInLCA, secondLocInLCA) ||
806
806
(allowEqual && firstLocInLCA == secondLocInLCA);
807
807
}
Original file line number Diff line number Diff line change @@ -215,6 +215,16 @@ class RecursiveOuter {
215
215
class GuardedAvailability {
216
216
}
217
217
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
+
218
228
@main
219
229
struct Validator {
220
230
@MainActor
You can’t perform that action at this time.
0 commit comments