digit-separators
flag no longer required unless for dart format
command
#59815
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
area-dart-cli
Use area-dart-cli for issues related to the 'dart' command like tool.
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Context
Digit separators are allowed since
Dart 3.6
as mentioned in the official documentation hereThis feature allow to write large number values like so
Current behavior
The
dart format
command raise an error when the code contains underscores in number valuesFor example running command
dart format .
Will produce the output
Workaround
We need to add the
--enable-experimental=digit-separators
flag in order to format filesdart format --enable-experiment=digit-separators .
Output
Expected behavior
--enable-experimental=digit-separators
flag should not be required fordart format
command starting onDart 3.6
Current Dart version used
Dart SDK version: 3.6.0 (stable) (Thu Dec 5 07:46:24 2024 -0800) on "macos_arm64"
The text was updated successfully, but these errors were encountered: