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

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

Issue 27953002: Refine spec for TypedefMirror.value and for ClosureMirror.findInContext. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors.dart
===================================================================
--- sdk/lib/mirrors/mirrors.dart (revision 28831)
+++ sdk/lib/mirrors/mirrors.dart (working copy)
@@ -636,8 +636,14 @@
* Looks up the value of a name in the scope of the closure. The
* result is a mirror on that value.
*
+ * If the reflectee is not an actual closure, returns null.
ahe 2013/10/22 12:47:18 How can that happen?
gbracha 2013/10/22 23:40:29 We generate a closure mirror for anything that eit
rmacnak 2013/10/22 23:50:18 See also https://codereview.chromium.org/26777002/
+ * Otherwise:
+ *
* Let *s* be the contents of the string used to construct the symbol [name].
*
+ * If *s* is not an identifier or a library prefix followed by an identifier
+ * an ArgumentError is thrown.
ahe 2013/10/22 12:47:18 Long term, I like this. What about operators? Sho
gbracha 2013/10/22 23:40:29 Operators do not have a meaning as an expression.
+ *
* If the expression *s* occurs within the source code of the reflectee,
* and if any such occurrence refers to a declaration outside the reflectee,
* then let *v* be the result of evaluating the expression *s* at such
@@ -988,8 +994,13 @@
abstract class TypedefMirror implements ClassMirror {
/**
* The defining type for this typedef.
+ * If the the type referred to by the reflectee is a function type
+ * *F*, the result will be [:FunctionTypeMirror:] reflecting *F*
+ * which is abstract and has an abstract method [:call:] whose
+ * signature corresponds to *F*.
*
- * For instance [:void f(int):] is the value for [:typedef void f(int):].
+ * As an example:
+ * [:void f(int):] is the value for [:typedef void f(int):].
*/
TypeMirror get value;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698