mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Specs: add that we assume library.declarations to be in source order to the list of (currently unwarranted) assumptions we are making
Review URL: https://codereview.chromium.org/935113002
This commit is contained in:
parent
1cf4ba94b1
commit
89632f4d8e
@ -27,7 +27,7 @@ abstract class AutomaticMetadata {
|
||||
void init(DeclarationMirror target, Module module);
|
||||
|
||||
static void runLibrary(LibraryMirror library, Module module) {
|
||||
library.declarations.values.toList()..sort((DeclarationMirror a, DeclarationMirror b) {
|
||||
library.declarations.values.toList() /* ..sort((DeclarationMirror a, DeclarationMirror b) {
|
||||
bool aHasLocation;
|
||||
try {
|
||||
aHasLocation = a.location != null;
|
||||
@ -49,7 +49,7 @@ abstract class AutomaticMetadata {
|
||||
if (a.location.line != b.location.line)
|
||||
return a.location.line - b.location.line;
|
||||
return a.location.column - b.location.column;
|
||||
})
|
||||
}) */
|
||||
..forEach((DeclarationMirror d) {
|
||||
d.metadata.forEach((InstanceMirror i) {
|
||||
if (i.reflectee is AutomaticMetadata)
|
||||
@ -93,3 +93,6 @@ assumed to exist:
|
||||
ClassName = SuperclassName;
|
||||
ClassName.namedConstructor = SuperclassName.otherNamedConstructor;
|
||||
```
|
||||
|
||||
* The reflection APIs (`dart:mirrors`) are assumed to reflect a
|
||||
library's declarations in source order.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user