[analyzer/ffi] Fix spurious FFI errors

Closes: https://github.com/dart-lang/sdk/issues/52298
Change-Id: Ibfccd34a877d5786f4720790b5ff88dcc643c9d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes
2023-05-08 15:16:05 +00:00
committed by Commit Queue
parent 8ccece520f
commit 8beb778e64
2 changed files with 18 additions and 0 deletions
@@ -156,6 +156,7 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
}
}
super.visitClassDeclaration(node);
inCompound = false;
}
@override
+17
View File
@@ -0,0 +1,17 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:ffi';
final class Foo extends Struct {
external Pointer<Void> field;
}
mixin Bar {
late final field = 123;
}
void main() {
print('something');
}