Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Analyzer] FFI verifier applies lints to mixin following a Struct #52298

Closed
ds84182 opened this issue May 7, 2023 · 2 comments
Closed

[Analyzer] FFI verifier applies lints to mixin following a Struct #52298

ds84182 opened this issue May 7, 2023 · 2 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. library-ffi

Comments

@ds84182
Copy link
Contributor

ds84182 commented May 7, 2023

final class Foo extends Struct {
  external Pointer<Void> field;
}

mixin Bar {
  // Analyzer says "Struct fields must be marked external" on this line:
  late final field = 123;
}

Currently seeing this on an SDK build from last week (3.1.0-48.0.dev). Reordering the declarations or adding a non-struct class between the two makes the issue go away.

@bwilkerson
Copy link
Member

@dcharkes

@dcharkes dcharkes added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. library-ffi labels May 8, 2023
@dcharkes
Copy link
Contributor

dcharkes commented May 8, 2023

Thanks for the report!

Fix underway: https://dart-review.googlesource.com/c/sdk/+/301980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. library-ffi
Projects
None yet
Development

No branches or pull requests

3 participants