[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:
Nicholas Shahan
2026-05-08 12:57:06 -07:00
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)),