Phil Quitslund

Results 312 comments of Phil Quitslund
trafficstars

We could (and maybe _should_) consider updating `dart doc` to inherit parameter names in case they're renamed with underscores. If that happened I'd be in favor of updating the lint...

@Erhannis: sorry to hear this tripped you up. As it happens, this *used* to be a bit better (at least aspirationally). Until recently, we tried to provide a lower bound...

Those examples are pretty brain bending. 🤯 Thanks for reporting!

See: https://github.com/dart-lang/linter/pull/2737

@iinozemtsev: is this good to be closed now?

Does the same advice extend to `Set.of`?

We might also consider folding this advice into Effective Dart? See: https://dart.dev/guides/language/effective-dart/usage#dont-use-listfrom-unless-you-intend-to-change-the-type-of-the-result

See also: https://github.com/dart-lang/sdk/issues/48991

It looks like the issue is the `LinterContext.canBeConst` which is not noticing that the deferred element can't be used in a constant context. Test here: https://dart-review.googlesource.com/c/sdk/+/244281

This may take a bit of doing on the analyzer side. TL;DR constant evaluation is tricky (and complex). See @scheglov's comment in https://github.com/dart-lang/sdk/issues/48991