Index: tests/compiler/dart2js/message_kind_test.dart |
diff --git a/tests/compiler/dart2js/message_kind_test.dart b/tests/compiler/dart2js/message_kind_test.dart |
index 6610e125cbd2bdc4d4d6dbb99ddc7b86d533b426..505fe5b3da594e8c447dc6f672a703f0fd1dd02c 100644 |
--- a/tests/compiler/dart2js/message_kind_test.dart |
+++ b/tests/compiler/dart2js/message_kind_test.dart |
@@ -16,7 +16,9 @@ import 'dart:mirrors'; |
main() { |
ClassMirror cls = reflectClass(MessageKind); |
Map<String, MessageKind> kinds = <String, MessageKind>{}; |
- cls.variables.forEach((Symbol name, VariableMirror variable) { |
+ cls.declarations.forEach((Symbol name, DeclarationMirror declaration) { |
+ if (declaration is! VariableMirror) return; |
+ VariableMirror variable = declaration; |
if (variable.isStatic) { |
var value = cls.getField(name).reflectee; |
if (value is MessageKind) { |