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

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 29045)
+++ sdk/lib/mirrors/mirrors.dart (working copy)
@@ -649,14 +649,22 @@
* 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/23 17:58:59 I think "actual closure" could be made a little mo
+ * Otherwise:
+ *
* Let *s* be the contents of the string used to construct the symbol [name].
*
- * If the expression *s* occurs within the source code of the reflectee,
+ * If *s* is not an identifier or the name of an operator
+ * an ArgumentError is thrown.
ahe 2013/10/23 17:58:59 Short-term, also throw an argument error if s is a
+ *
+ * If *s* is an identifier and
+ * 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
* an occurrence.
* If *s = this*, and the reflectee was defined within the instance scope of
* an object *o*, then let *v* be *o*.
+ * If *s* is the name of an operator, let *v* be (x) => this s x.
ahe 2013/10/23 17:58:59 I don't understand this part.
*
* The returned value is the result of invoking the method [reflect] on
* *v*.
@@ -1006,6 +1014,10 @@
abstract class TypedefMirror implements TypeMirror {
/**
* 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 referent for [:typedef void f(int):].
*/
« 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