[ddc] Fix type in matcher in scope offset test
It looks like the type expectation in the block visitor of this test has always been wrong and we might have never visited a block before. It looks like fixing the failing type expectation reveals an actual failure that this test is trying to catch: The block node doesn't have a valid offset. Issue: https://github.com/dart-lang/sdk/issues/63226 Change-Id: I4b8d7b60350b627e10a974a2d794db1973b3fff1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/502184 Reviewed-by: Nate Biggs <natebiggs@google.com> Auto-Submit: Nicholas Shahan <nshahan@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
157baccaa5
commit
77c65d60ec
@@ -144,7 +144,7 @@ class ScopeOffsetValidator extends VisitorDefault<void> with VisitorVoidMixin {
|
||||
blockCount++;
|
||||
expect(
|
||||
block,
|
||||
const TypeMatcher<FunctionNode>().having(
|
||||
const TypeMatcher<Block>().having(
|
||||
(c) => c.fileOffset,
|
||||
'${block.toText(astTextStrategyForTesting)} : fileOffset',
|
||||
isNot(equals(-1)),
|
||||
|
||||
Reference in New Issue
Block a user