Skip to content

Commit e5739ab

Browse files
stereotype441Commit Queue
authored andcommitted
[analyzer] Rework MockSdkElements to set enclosing elements earlier.
In the typical sequence of operations performed by the analyzer, an element's chain of enclosing elements is guaranteed to be set before that element is referred to by any `DartType`-derived objects. In a follow-up CL, I will be adding some error checking to the unnamed constructor of `InterfaceTypeImpl` that relies on this ordering guarantee. This change reworks `MockSdkElements` so that it also follows this ordering guarantee. This will ensure that when the error checking is added to `InterfaceTypeImpl`, it won't break tests that use `MockSdkElements`. This change has no visible effect on the analyzer behavior, since it only touches test code. Change-Id: Ibb60575578a8b3facb4014d3583eed23db2ff694 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396521 Commit-Queue: Paul Berry <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 90cd440 commit e5739ab

File tree

1 file changed

+105
-70
lines changed

1 file changed

+105
-70
lines changed

0 commit comments

Comments
 (0)