Index: sdk/lib/core/int.dart |
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart |
index 217960d07fdc3c37f9d0afef34890157fc82a2cb..c28679e0136399be508a77f2651790be5dfdd45a 100644 |
--- a/sdk/lib/core/int.dart |
+++ b/sdk/lib/core/int.dart |
@@ -30,6 +30,12 @@ abstract class int extends num { |
* |
* const int.fromEnvironment("defaultPort", defaultValue: 80) |
*/ |
+ // The .fromEnvironment() constructors are special in that we do not want |
+ // users to call them using "new". We prohibit that by giving them bodies |
+ // that throw, even though const constructors are not allowed to have bodies. |
+ // Disable those static errors. |
+ //ignore: const_constructor_with_body |
+ //ignore: const_factory |
external const factory int.fromEnvironment(String name, {int defaultValue}); |
/** |