Index: sdk/lib/_internal/lib/core_patch.dart |
diff --git a/sdk/lib/_internal/lib/core_patch.dart b/sdk/lib/_internal/lib/core_patch.dart |
index cb844e0410fa7469d2a2f24e8b1a0ccdbcfc8840..8e5bec02c81cd96fb813f3328a2c64e52a228ba1 100644 |
--- a/sdk/lib/_internal/lib/core_patch.dart |
+++ b/sdk/lib/_internal/lib/core_patch.dart |
@@ -102,6 +102,11 @@ patch class int { |
int onError(String source) }) { |
return Primitives.parseInt(source, radix, onError); |
} |
+ |
+ patch factory int.fromEnvironment(String name, {int defaultValue}) { |
+ throw new UnsupportedError( |
+ 'int.fromEnvironement can only be used as a const constructor'); |
+ } |
} |
patch class double { |
@@ -219,6 +224,18 @@ patch class String { |
} |
return Primitives.stringFromCharCodes(charCodes); |
} |
+ |
+ patch factory String.fromEnvironment(String name, {String defaultValue}) { |
+ throw new UnsupportedError( |
+ 'String.fromEnvironement can only be used as a const constructor'); |
+ } |
+} |
+ |
+patch class bool { |
+ patch factory bool.fromEnvironment(String name, {bool defaultValue}) { |
+ throw new UnsupportedError( |
+ 'bool.fromEnvironement can only be used as a const constructor'); |
+ } |
} |
patch class RegExp { |