Support mustBeOverriden on constructors #53357
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
devexp-pkg-meta
Issues related to package:meta
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Thank you for taking the time to file an issue!
This tracker is for issues related to:
Dart Core library: meta
Dart info:
General info
[✓] Flutter (Channel stable, 3.13.1, on Manjaro Linux 6.1.44-1-MANJARO, locale en_CA.UTF-8)
• Flutter version 3.13.1 on channel stable at /home/nexus/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e1e47221e8 (4 days ago), 2023-08-22 21:43:18 -0700
• Engine revision b20183e040
• Dart version 3.1.0
• DevTools version 2.25.0
Project info
Process info
My use case is as follows:
I have a series of objects generated from an OAS spec and there are some common functions I'd like to do on the types they get converted into. To provide some of this in an abstracted manner I'm providing the following:
and the conversion object looks like:
The problem is with:
The analyzer throws the warning:
and the
Metadata
class doesn't throw an analyzer error for the missing constructor (which is expected given the current usage).Proposal:
Allow for this annotation to also be applied to constructors to allow for enforcement of this requirement.
The text was updated successfully, but these errors were encountered: