Index: tests/lib/mirrors/constructor_kinds_test.dart |
diff --git a/tests/lib/mirrors/constructor_kinds_test.dart b/tests/lib/mirrors/constructor_kinds_test.dart |
index febac1f6f795e560fd98616e11795f49924be389..e083d0ecd4fac337deff5a07d1c60bdef1b50a93 100644 |
--- a/tests/lib/mirrors/constructor_kinds_test.dart |
+++ b/tests/lib/mirrors/constructor_kinds_test.dart |
@@ -42,7 +42,8 @@ main() { |
const Class.constRedirectingFactoryConstructor(); /// 01: ok |
cm = reflectClass(ClassWithDefaultConstructor); |
- mm = cm.constructors.values.single; |
+ mm = cm.declarations.values |
+ .where((d) => d is MethodMirror && d.isConstructor).single; |
Expect.isTrue(mm.isConstructor); |
Expect.isTrue(mm.isGenerativeConstructor); |
Expect.isFalse(mm.isFactoryConstructor); |
@@ -51,42 +52,42 @@ main() { |
cm = reflectClass(Class); |
- mm = cm.constructors[#Class.generativeConstructor]; |
+ mm = cm.declarations[#Class.generativeConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isTrue(mm.isGenerativeConstructor); |
Expect.isFalse(mm.isFactoryConstructor); |
Expect.isFalse(mm.isRedirectingConstructor); |
Expect.isFalse(mm.isConstConstructor); |
- mm = cm.constructors[#Class.redirectingGenerativeConstructor]; |
+ mm = cm.declarations[#Class.redirectingGenerativeConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isTrue(mm.isGenerativeConstructor); |
Expect.isFalse(mm.isFactoryConstructor); |
Expect.isTrue(mm.isRedirectingConstructor); |
Expect.isFalse(mm.isConstConstructor); |
- mm = cm.constructors[#Class.factoryConstructor]; |
+ mm = cm.declarations[#Class.factoryConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isFalse(mm.isGenerativeConstructor); |
Expect.isTrue(mm.isFactoryConstructor); |
Expect.isFalse(mm.isRedirectingConstructor); |
Expect.isFalse(mm.isConstConstructor); |
- mm = cm.constructors[#Class.redirectingFactoryConstructor]; |
+ mm = cm.declarations[#Class.redirectingFactoryConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isFalse(mm.isGenerativeConstructor); |
Expect.isTrue(mm.isFactoryConstructor); |
Expect.isTrue(mm.isRedirectingConstructor); |
Expect.isFalse(mm.isConstConstructor); |
- mm = cm.constructors[#Class.constGenerativeConstructor]; |
+ mm = cm.declarations[#Class.constGenerativeConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isTrue(mm.isGenerativeConstructor); |
Expect.isFalse(mm.isFactoryConstructor); |
Expect.isFalse(mm.isRedirectingConstructor); |
Expect.isTrue(mm.isConstConstructor); |
- mm = cm.constructors[#Class.constRedirectingGenerativeConstructor]; |
+ mm = cm.declarations[#Class.constRedirectingGenerativeConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isTrue(mm.isGenerativeConstructor); |
Expect.isFalse(mm.isFactoryConstructor); |
@@ -94,14 +95,14 @@ main() { |
Expect.isTrue(mm.isConstConstructor); |
// Not legal. |
- // mm = cm.constructors[#Class.constFactoryConstructor]; |
+ // mm = cm.declarations[#Class.constFactoryConstructor]; |
// Expect.isTrue(mm.isConstructor); |
// Expect.isFalse(mm.isGenerativeConstructor); |
// Expect.isTrue(mm.isFactoryConstructor); |
// Expect.isFalse(mm.isRedirectingConstructor); |
// Expect.isTrue(mm.isConstConstructor); |
- mm = cm.constructors[#Class.constRedirectingFactoryConstructor]; |
+ mm = cm.declarations[#Class.constRedirectingFactoryConstructor]; |
Expect.isTrue(mm.isConstructor); |
Expect.isFalse(mm.isGenerativeConstructor); |
Expect.isTrue(mm.isFactoryConstructor); |