-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).closed-duplicateClosed in favor of an existing reportClosed in favor of an existing report
Description
For example, take this "goldfish" constant Item constructor:
static const Item goldfish =
const Item(Colors.orange, "goldfish", "goldfishes", const [
const FishableItemTrait(0.8),
const CrushableItemTrait(const [const CrushChance(Items.gold, 0.7)])
]);
In order to actually make this object constant, I had to opt to using const everywhere, instead of letting Dart infer the need for const. This would not become ambiguous in any way as the item itself, the goldfish, is declared constant.
Metadata
Metadata
Assignees
Labels
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).closed-duplicateClosed in favor of an existing reportClosed in favor of an existing report