Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: sdk/lib/_internal/js_runtime/lib/core_patch.dart

Issue 2896393003: Remove factory body in *.fromEnvironment, and implement this same behavior (Closed)
Patch Set: turn warning into a hint Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/universe/feature.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/core_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index eff2cd712a2b2fd368d02e3b1717c4f99af4fe79..610c1caaa35fe2d7f2b8b9276cc6a547405ad974 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -168,12 +168,6 @@ class int {
static int parse(String source, {int radix, int onError(String source)}) {
return Primitives.parseInt(source, radix, onError);
}
-
- @patch
- factory int.fromEnvironment(String name, {int defaultValue}) {
- throw new UnsupportedError(
- 'int.fromEnvironment can only be used as a const constructor');
- }
}
@patch
@@ -414,12 +408,6 @@ class String {
return Primitives.stringFromCharCode(charCode);
}
- @patch
- factory String.fromEnvironment(String name, {String defaultValue}) {
- throw new UnsupportedError(
- 'String.fromEnvironment can only be used as a const constructor');
- }
-
static String _stringFromJSArray(List list, int start, int endOrNull) {
int len = list.length;
int end = RangeError.checkValidRange(start, endOrNull, len);
@@ -466,12 +454,6 @@ class String {
@patch
class bool {
@patch
- factory bool.fromEnvironment(String name, {bool defaultValue: false}) {
- throw new UnsupportedError(
- 'bool.fromEnvironment can only be used as a const constructor');
- }
-
- @patch
int get hashCode => super.hashCode;
}
« no previous file with comments | « pkg/compiler/lib/src/universe/feature.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698