Updated container

This commit is contained in:
thomashii@dukefirehawk.com 2022-12-29 00:25:55 +08:00
parent 14a7b82616
commit 7809c72f03
2 changed files with 7 additions and 7 deletions

View file

@ -8,9 +8,11 @@ const Reflectable contained = ContainedReflectable();
class ContainedReflectable extends Reflectable {
const ContainedReflectable()
: super(
topLevelInvokeCapability,
typeAnnotationQuantifyCapability,
superclassQuantifyCapability,
instanceInvokeCapability,
libraryCapability,
invokingCapability,
newInstanceCapability,
reflectedTypeCapability,

View file

@ -49,7 +49,7 @@ void testReflector(Reflector reflector) {
expect(blazikenMirror.getField('type').reflectee, blaziken.type);
});
/*
/*
group('reflectFunction', () {
var mirror = reflector.reflectFunction(returnVoidFromAFunction);
@ -73,8 +73,8 @@ void testReflector(Reflector reflector) {
expect(p?.annotations, isEmpty);
expect(p?.type, reflector.reflectType(int));
});
}, skip: 'pkg:reflectable cannot reflect on closures at all (yet)');
*/
}, skip: 'pkg:reflectable cannot reflect on closures at all (yet)');
*/
test('make on singleton type returns singleton', () {
expect(container.make(Pokemon), blaziken);
@ -110,12 +110,10 @@ void testReflector(Reflector reflector) {
expect(kantoPokemonType.isAssignableTo(pokemonType), true);
var a = container.reflector.reflectType(String);
expect(
kantoPokemonType
() => kantoPokemonType
.isAssignableTo(container.reflector.reflectType(String)),
false);
throwsUnsupportedError);
});
}