-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-new-language-featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
I understand that as is a responsibility delegation from the compiler to users.
And, the compiler doesn't check down casts with as, but the runtime does.
On the other hand, the runtime skips user-defined check logic on constructor of inline class.
So, I propose a new lint to warn a cast from the representation type to the inline class with check logic or body on its constructor, without implicit constructor.
FMorschel
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-new-language-featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug