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

Unified Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10830359: dart2dart Fix collecting type of class fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/backend.dart
diff --git a/lib/compiler/implementation/dart_backend/backend.dart b/lib/compiler/implementation/dart_backend/backend.dart
index 5a9e0e770c95710c926f309d4e193e0ef1aea53e..1e0414187b00d048ec141f5eb0bec015f1c435a6 100644
--- a/lib/compiler/implementation/dart_backend/backend.dart
+++ b/lib/compiler/implementation/dart_backend/backend.dart
@@ -138,7 +138,7 @@ bool isDartCoreLib(Compiler compiler, LibraryElement libraryElement) {
*/
class ReferencedElementCollector extends AbstractVisitor {
final Compiler compiler;
- final Element rootElement;
+ Element rootElement;
final TreeElements treeElements;
final newTypedefElementCallback;
final newClassElementCallback;
@@ -171,6 +171,9 @@ class ReferencedElementCollector extends AbstractVisitor {
}
void collect() {
+ if (rootElement is VariableElement) {
Anton Muhin 2012/08/16 16:27:47 let's do that in ctor or in caller, ok?
Roman 2012/08/16 16:33:54 Done. Ternary expression in initializer does not l
Anton Muhin 2012/08/16 16:35:51 Caller might be the better place, but up to you O
+ rootElement = (rootElement as VariableElement).variables;
+ }
compiler.withCurrentElement(rootElement, () {
rootElement.parseNode(compiler).accept(this);
});
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698