Closed
Description
Consider:
class Foo {
const Foo(List<int> numbers)
: assert(numbers.length > 0),
assert(numbers.isNotEmpty);
}
The first assert results in a warning say:
info: Use isNotEmpty instead of length (prefer_is_empty at [...] ...)
But following that suggestion (the second assert) is an error:
error: Invalid constant value. (invalid_constant at [...] ...)
Dart 2.7.0