Skip to content

Annotating a top-level field as @internal should warn if the library is exported #62987

Closed

Description

@kevmoo

foo.dart has two things labeled @internal a function and a field.

If I export foo.dart from a library, I get a warning about the function, but not the field!

Expect to get a invalid_export_of_internal_element in both cases.

This works for classes, but not for fields!

On 3.12.0-285.0.dev

Activity

  1. added
    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.
    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
    on Mar 27, 2026
  2. added theissue type on Mar 27, 2026
  3. self-assigned this
    on Mar 27, 2026
  4. kevmoo commented on Mar 27, 2026

    @kevmoo
    MemberAuthor
  5. added 2 commits that reference this issue on Mar 27, 2026
  6. added a commit that references this issue on Mar 27, 2026
  7. added a commit that references this issue on Apr 14, 2026
  8. added a commit that references this issue on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions