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

Unified Diff: sdk/lib/mirrors/mirrors.dart

Issue 23020025: Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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') | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 796889c64c0a5a475b248da7c5795358f5499d3e..4e96d84e7462198101e4dfba7ab9eb3a0c434be0 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -1098,16 +1098,18 @@ abstract class ParameterMirror implements VariableMirror {
bool get isNamed;
/**
- * Returns [:true:] if the reflectee has a default value.
+ * Returns [:true:] if the reflectee has explicitly declared a default value.
* Otherwise returns [:false:].
*/
bool get hasDefaultValue;
/**
- * A mirror on the default value for this parameter, if it exists.
+ * If this is a required parameter, returns [:null:]. Otherwise returns a
+ * mirror on the default value for this parameter. If no default is declared
+ * for an optional parameter, the default is [:null:] and a mirror on [:null:]
+ * is returned.
*/
- // TODO(ahe): This should return an InstanceMirror.
- String get defaultValue;
+ InstanceMirror get defaultValue;
}
/**
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698