Open illia-romanenko opened 1 year ago
Future language versions may remove the implicit call tear off
.type_literal_in_constant_pattern
ignore
when we actually need to check for bare type. That's probably gonna be rare.
void main() {
String f(Object? x) {
return switch (x) {
int => 'int type', // this will be linted with type_literal_in_constant_pattern enabled
int _ => 'concrete int',
_ => 'other',
};
}
print(f(int)); // int type print(f(1)); // concrete int print(f('x')); // other }
FYI these are already in our analysis_options.yaml (click to jump to code)
Review new lint rules from linter 3.0 and enable if needed in solid_lints https://github.com/dart-lang/lints/blob/main/CHANGELOG.md#300