Skip to content

Commit 2100447

Browse files
Googlersrawlins
authored andcommitted
Stop using deprecated declarations, prepare for analyzer breaking changes.
PiperOrigin-RevId: 469292776
1 parent 17a9539 commit 2100447

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/builder.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ class _MockTargetGatherer {
452452
'MockSpecs must be constructor calls inside the annotation, '
453453
'please inline them if you are using a variable');
454454
}
455-
return mockSpec.constructorName.type2.typeArguments?.arguments.firstOrNull
455+
return mockSpec.constructorName.type.typeArguments?.arguments.firstOrNull
456456
as ast.NamedType?;
457457
}
458458

@@ -545,7 +545,7 @@ class _MockTargetGatherer {
545545
// this case the type argument(s) on `type` have been instantiated to
546546
// bounds. Switch to the declaration, which will be an uninstantiated
547547
// type.
548-
type = (type.element.declaration as ClassElement).thisType;
548+
type = (type.element2.declaration as ClassElement).thisType;
549549
} else {
550550
// Check explicit type arguments for unknown types that were
551551
// turned into `dynamic` by the analyzer.

0 commit comments

Comments
 (0)