Skip to content

Commit 678b8e8

Browse files
dcharkesCommit Queue
authored and
Commit Queue
committed
[analyzer/ffi] Fix crash in ffi_verifier
Fixes a crash in the analyzer that was exercised via dartdoc in https://dart-review.googlesource.com/c/sdk/+/342763. Landing the analyzer fix separately, so that it can be rolled first. Bug: #54754 Change-Id: I40375374cb785c11e3f0b2f21a8a2c74b8f080c6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349240 Commit-Queue: Brian Wilkerson <[email protected]> Auto-Submit: Daco Harkes <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 21b3692 commit 678b8e8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

pkg/analyzer/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 6.4.1
2+
* Patch for crash in ffi_verifier.
3+
14
## 6.3.0
25
* Updated the current language version to `3.3`.
36
* Removed generated `ConstantEvaluator`.

pkg/analyzer/lib/src/generated/ffi_verifier.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
16251625
/// Validate the invocation of the extension method
16261626
/// `Pointer<T extends Struct>.ref`.
16271627
void _validateRefPrefixedIdentifier(PrefixedIdentifier node) {
1628-
var targetType = node.prefix.typeOrThrow;
1628+
var targetType = node.prefix.staticType;
16291629
if (!_isValidFfiNativeType(targetType,
16301630
allowVoid: false, allowEmptyStruct: true)) {
16311631
final AstNode errorNode = node;

pkg/analyzer/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: analyzer
2-
version: 6.4.0
2+
version: 6.4.1
33
description: >-
44
This package provides a library that performs static analysis of Dart code.
55
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer

0 commit comments

Comments
 (0)