Files
sdk/pkg/front_end/testcases/bug33099.dart.strong.expect
T
Sigmund Cherem 4b7d256a06 Revert "Enable constant-update-2018 by default." and "Update .expect files in pkg/front_end after e9ca6a53"
This reverts commit e9ca6a5335 and d3e00fd35e.

Change-Id: I346d6156be19c4fceffa202a7ce9bfa931c7c14b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-16 20:20:12 +00:00

50 lines
1.9 KiB
Plaintext

library;
import self as self;
import "dart:core" as core;
import "dart:mirrors" as mir;
import "dart:mirrors";
class _FailingTest extends core::Object {
const constructor •() → self::_FailingTest
: super core::Object::•()
;
}
class MyTest extends core::Object {
synthetic constructor •() → self::MyTest
: super core::Object::•()
;
@self::failingTest
method foo() → void {}
}
abstract class _MyTest2&Object&MyTest = core::Object with self::MyTest {
const synthetic constructor •() → self::_MyTest2&Object&MyTest
: super core::Object::•()
;
}
class MyTest2 extends self::_MyTest2&Object&MyTest {
synthetic constructor •() → self::MyTest2
: super self::_MyTest2&Object&MyTest::•()
;
}
static const field self::_FailingTest failingTest = const self::_FailingTest::•();
static method main() → dynamic {
mir::ClassMirror classMirror = mir::reflectClass(self::MyTest2);
classMirror.{mir::ClassMirror::instanceMembers}.{core::Map::forEach}((core::Symbol symbol, mir::MethodMirror memberMirror) → core::Null {
if(memberMirror.{mir::DeclarationMirror::simpleName}.{core::Symbol::==}(#foo)) {
core::print(memberMirror);
core::print(self::_hasFailingTestAnnotation(memberMirror));
}
});
}
static method _hasFailingTestAnnotation(mir::MethodMirror method) → core::bool {
core::bool r = self::_hasAnnotationInstance(method, self::failingTest);
core::print("[_hasFailingTestAnnotation] ${method} ${r}");
return r;
}
static method _hasAnnotationInstance(mir::DeclarationMirror declaration, dynamic instance) → core::bool
return declaration.{mir::DeclarationMirror::metadata}.{core::Iterable::any}((mir::InstanceMirror annotation) → core::bool {
core::print("annotation: ${annotation.{mir::InstanceMirror::reflectee}}");
return core::identical(annotation.{mir::InstanceMirror::reflectee}, instance);
});