Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d9edb9b

Browse files
pqcommit-bot@chromium.org
authored andcommitted
add double constants
See: dart-archive/linter#3039 Change-Id: If0a2a02591a0a46c0c463ff2e79f35a1209dff35 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217700 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent e20ffbb commit d9edb9b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/analyzer/lib/src/test_utilities/mock_sdk.dart

+7
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,19 @@ class pragma {
318318
}
319319
320320
abstract class double extends num {
321+
// TODO: remove these old constants when no tests rely on them.
321322
static const double NAN = 0.0 / 0.0;
322323
static const double INFINITY = 1.0 / 0.0;
323324
static const double NEGATIVE_INFINITY = -INFINITY;
324325
static const double MIN_POSITIVE = 5e-324;
325326
static const double MAX_FINITE = 1.7976931348623157e+308;
326327
328+
static const double nan = 0.0 / 0.0;
329+
static const double infinity = 1.0 / 0.0;
330+
static const double negativeInfinity = -infinity;
331+
static const double minPositive = 5e-324;
332+
static const double maxFinite = 1.7976931348623157e+308;
333+
327334
double get sign;
328335
double operator %(num other);
329336
double operator *(num other);

0 commit comments

Comments
 (0)