| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:mirrors" as mir; |
| |
| import "dart:mirrors"; |
| |
| class _FailingTest extends core::Object /*hasConstConstructor*/ { |
| const constructor •() → self::_FailingTest |
| : super core::Object::•() |
| ; |
| } |
| class MyTest extends core::Object { |
| synthetic constructor •() → self::MyTest |
| : super core::Object::•() |
| ; |
| @#C1 |
| method foo() → void {} |
| } |
| abstract class _MyTest2&Object&MyTest = core::Object with self::MyTest /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_MyTest2&Object&MyTest |
| : super core::Object::•() |
| ; |
| mixin-super-stub method foo() → void |
| return super.{self::MyTest::foo}(); |
| } |
| class MyTest2 extends self::_MyTest2&Object&MyTest { |
| synthetic constructor •() → self::MyTest2 |
| : super self::_MyTest2&Object&MyTest::•() |
| ; |
| } |
| static const field self::_FailingTest failingTest = #C1; |
| static method main() → dynamic { |
| mir::ClassMirror classMirror = mir::reflectClass(#C2); |
| classMirror.{mir::ClassMirror::instanceMembers}{core::Map<core::Symbol, mir::MethodMirror>}.{core::Map::forEach}((core::Symbol symbol, mir::MethodMirror memberMirror) → void { |
| if(memberMirror.{mir::DeclarationMirror::simpleName}{core::Symbol} =={core::Symbol::==}{(core::Object) → core::bool} #C3) { |
| core::print(memberMirror); |
| core::print(self::_hasFailingTestAnnotation(memberMirror)); |
| } |
| }){((core::Symbol, mir::MethodMirror) → void) → void}; |
| } |
| static method _hasFailingTestAnnotation(mir::MethodMirror method) → core::bool { |
| core::bool r = self::_hasAnnotationInstance(method, #C1); |
| core::print("[_hasFailingTestAnnotation] ${method} ${r}"); |
| return r; |
| } |
| static method _hasAnnotationInstance(mir::DeclarationMirror declaration, dynamic instance) → core::bool |
| return declaration.{mir::DeclarationMirror::metadata}{core::List<mir::InstanceMirror>}.{core::Iterable::any}((mir::InstanceMirror annotation) → core::bool { |
| core::print("annotation: ${annotation.{mir::InstanceMirror::reflectee}{dynamic}}"); |
| return core::identical(annotation.{mir::InstanceMirror::reflectee}{dynamic}, instance); |
| }){((mir::InstanceMirror) → core::bool) → core::bool}; |
| |
| constants { |
| #C1 = self::_FailingTest {} |
| #C2 = TypeLiteralConstant(self::MyTest2*) |
| #C3 = #foo |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///bug33099.dart: |
| - _FailingTest. (from org-dartlang-testcase:///bug33099.dart:10:9) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |