Index: tests/lib/mirrors/parameter_test.dart |
diff --git a/tests/lib/mirrors/parameter_test.dart b/tests/lib/mirrors/parameter_test.dart |
index ac395bdede45fed0f32297efaabbbbd8a199d37f..c9e5f939c11e6c451ad84aad28dd1369934cd4c9 100644 |
--- a/tests/lib/mirrors/parameter_test.dart |
+++ b/tests/lib/mirrors/parameter_test.dart |
@@ -45,7 +45,10 @@ class C <S extends int, T> { |
main() { |
ClassMirror cm = reflectClass(B); |
- Map<Symbol, MethodMirror> constructors = cm.constructors; |
+ var constructors = new Map<Symbol, MethodMirror>(); |
+ cm.declarations.forEach((k, v) { |
+ if (v is MethodMirror && v.isConstructor) constructors[k] = v; |
+ }); |
List<Symbol> constructorKeys = |
[#B, #B.bar, #B.baz, #B.foo, #B.quux, #B.qux, #B.corge]; |
@@ -124,31 +127,31 @@ main() { |
expect('Class(s(B) in s(test.parameter_test), top-level)', |
corgeConstructor.returnType); |
- MethodMirror xGetter = cm.getters[#x]; |
+ MethodMirror xGetter = cm.declarations[#x]; |
expect('Method(s(x) in s(B), getter)', xGetter); |
expect('[]', xGetter.parameters); |
- MethodMirror xSetter = cm.setters[const Symbol('x=')]; |
+ MethodMirror xSetter = cm.declarations[const Symbol('x=')]; |
expect('Method(s(x=) in s(B), setter)', xSetter); |
expect('[Parameter(s(value) in s(x=), final,' |
' type = Type(s(dynamic), top-level))]', |
xSetter.parameters); |
- MethodMirror grault = cm.members[#grault]; |
+ MethodMirror grault = cm.declarations[#grault]; |
expect('Method(s(grault) in s(B))', grault); |
expect('[Parameter(s(x) in s(grault), optional,' |
' type = Class(s(int) in s(dart.core), top-level))]', |
grault.parameters); |
expect('Instance(value = <null>)', grault.parameters[0].defaultValue); |
- MethodMirror garply = cm.members[#garply]; |
+ MethodMirror garply = cm.declarations[#garply]; |
expect('Method(s(garply) in s(B))', garply); |
expect('[Parameter(s(y) in s(garply), optional, named,' |
' type = Class(s(int) in s(dart.core), top-level))]', |
garply.parameters); |
expect('Instance(value = <null>)', garply.parameters[0].defaultValue); |
- MethodMirror waldo = cm.members[#waldo]; |
+ MethodMirror waldo = cm.declarations[#waldo]; |
expect('Method(s(waldo) in s(B))', waldo); |
expect('[Parameter(s(z) in s(waldo),' |
' type = Class(s(int) in s(dart.core), top-level))]', |
@@ -157,7 +160,7 @@ main() { |
cm = reflectClass(C); |
- MethodMirror fooInC = cm.members[#foo]; |
+ MethodMirror fooInC = cm.declarations[#foo]; |
expect('Method(s(foo) in s(C))', fooInC); |
expect('[Parameter(s(a) in s(foo),' |
' type = Class(s(int) in s(dart.core), top-level)), ' |
@@ -166,7 +169,7 @@ main() { |
' upperBound = Class(s(int) in s(dart.core), top-level)))]', |
fooInC.parameters); |
- MethodMirror barInC = cm.members[#bar]; |
+ MethodMirror barInC = cm.declarations[#bar]; |
expect('Method(s(bar) in s(C))', barInC); |
expect('[Parameter(s(a) in s(bar),' |
' type = TypeVariable(s(S) in s(C),' |