dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
628 stars 172 forks source link

[macros] support for `prefer_const_constructors_in_immutables` #4966

Closed pq closed 1 month ago

pq commented 1 month ago

Since constructors in macro definitions must be const and will produce a compilation error if not, this lint would be overreporting in the odd case where a macro is marked @immutable.

pq commented 1 month ago

Fixed w/ https://github.com/dart-lang/sdk/commit/a9905e98cf596f1ed64b43d2d26d102eb3a234b1.