Alexandre Ardhuin

Results 102 comments of Alexandre Ardhuin

>I think this would connect better with overloaded methods. I'd rather say _union types_. Thus you could write something like: ```dart User copyWith({String?|Unset name, int?|Unset age}) => User( name: name...

> I often see people trying to check the type of a type variable by doing `if (T is int) ...`. We could also add a lint to prevent this...

>We could also add a lint to prevent this case. However `if (T is num)` could be valid of `num`, `ìnt`, and `double`. `if (T == num)` is only valid...

https://github.com/dart-lang/linter/pull/3567 added a lint to enforce using strings in `part of` directives.

How could we define such a namespace for a parameter of type `List`? Alternativelly couldn't we have this notion of namespace in a similar way as import/export? For instance: ```dart...

> but this is likely to be a breaking change for at least some users. I agree but I don't think the creation of a new rule `require_trailing_commas_for_list_set_map` is worth...

Correct me if I'm wrong but `require_trailing_commas` is not enabled on Flutter code base. I will take a look among the 12K+ problems reported by VS code when I enable...

I tested this PR on flutter and there are 700+ diagnostics about missing trailing commas in set/list/map literals. You can take a look at https://github.com/flutter/flutter/pull/102585 What should we do with...

`AddTrailingComma` correction updated in https://github.com/dart-lang/sdk/pull/48968 to support this PR

> `AddTrailingComma` correction updated in [dart-lang/sdk#48968](https://github.com/dart-lang/sdk/pull/48968) to support this PR @pq : There is now a fix to help the migration.