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):]. |
*/ |