You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unifies and replaces a couple lints that are now deprecated (list_remove_unrelated_type, iterable_contains_unrelated_type). We use both deprecated ones.
Prevents mistyped conditionals not working. Useful, but will have to ignore when we actually need to check for bare type. That's probably gonna be rare.
voidmain() {
Stringf(Object? x) {
returnswitch (x) {
int=>'int type', // this will be linted with type_literal_in_constant_pattern enabledint _ =>'concrete int',
_ =>'other',
};
}
print(f(int)); // int typeprint(f(1)); // concrete intprint(f('x')); // other
}
Activity
yurii-prykhodko-solid commentedon Nov 17, 2023
yurii-prykhodko-solid commentedon Nov 17, 2023
Future language versions may remove the implicit call tear off.ignorewhen we actually need to check for bare type. That's probably gonna be rare.danylo-safonov-solid commentedon Nov 27, 2023
FYI these are already in our analysis_options.yaml (click to jump to code)