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

Unified Diff: sdk/lib/core/bool.dart

Issue 50983002: Implement fromEnvironment on bool, int and String (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add support for negative ints. Add more tests. Created 7 years, 2 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 | « runtime/vm/parser.cc ('k') | sdk/lib/core/int.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/bool.dart
diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart
index 6c7797fc4cb3be57f6fefaef74996aee1095a03e..bef70c649dcb712d84c22142016f5c3d140a4c62 100644
--- a/sdk/lib/core/bool.dart
+++ b/sdk/lib/core/bool.dart
@@ -12,10 +12,11 @@ part of dart.core;
* bool.
*/
class bool {
- factory bool._uninstantiable() {
- throw new UnsupportedError(
- "class bool cannot be instantiated");
- }
+ /**
+ * Returns the boolean for the given environment variable [name] or
+ * [defaultValue] if [name] is not present.
kasperl 2013/10/30 13:32:49 Shouldn't this actually have a defaultValue parame
Søren Gjesse 2013/10/30 13:59:30 In the latest design we removed the defaultValue f
+ */
+ external const factory bool.fromEnvironment(String name);
/**
* Returns [:"true":] if the receiver is [:true:], or [:"false":] if the
« no previous file with comments | « runtime/vm/parser.cc ('k') | sdk/lib/core/int.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698