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

Unified Diff: test/generated_sdk/lib/core/bool.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 | « test/generated_sdk/lib/convert/utf.dart ('k') | test/generated_sdk/lib/core/date_time.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/core/bool.dart
diff --git a/test/generated_sdk/lib/core/bool.dart b/test/generated_sdk/lib/core/bool.dart
index 36cd96b89bac22b864095cbef56204764df02218..14bc535875437edccd1c76b40ee5d94213ccc827 100644
--- a/test/generated_sdk/lib/core/bool.dart
+++ b/test/generated_sdk/lib/core/bool.dart
@@ -12,7 +12,24 @@ part of dart.core;
* bool.
*/
class bool {
- @patch
+ /**
+ * Returns the boolean value of the environment declaration [name].
+ *
+ * The boolean value of the declaration is `true` if the declared value is
+ * the string `"true"`, and `false` if the value is `"false"`.
+ *
+ * In all other cases, including when there is no declaration for `name`,
+ * the result is the [defaultValue].
+ *
+ * Example:
+ *
+ * const loggingFlag = const bool.fromEnvironment("logging");
+ *
+ * If you want to use a different truth-string, you can use the
+ * [String.fromEnvironment] constructor directly:
+ *
+ * const isLoggingOn = (const String.fromEnvironment("logging") == "on");
+ */
factory bool.fromEnvironment(String name, {bool defaultValue: false}) {
throw new UnsupportedError(
'bool.fromEnvironment can only be used as a const constructor');
« no previous file with comments | « test/generated_sdk/lib/convert/utf.dart ('k') | test/generated_sdk/lib/core/date_time.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698