fix(di): allow @Inject(…)
to work in dart2js and dynamic reflection
Note: We can’t write a unit test for this as our unit tests are running in Dartium, where the error does not occur. However, we previously had a failure in our e2e tests in `hello_world/index_dynamic.html` when removing the TODOs in `application.ts`. Closes #2185
This commit is contained in:
@ -57,8 +57,8 @@ class ReflectionCapabilities {
|
||||
}
|
||||
|
||||
List _convertParameter(ParameterMirror p) {
|
||||
var t = p.type.reflectedType;
|
||||
var res = t == dynamic ? [] : [t];
|
||||
var t = p.type;
|
||||
var res = (!t.hasReflectedType || t.reflectedType == dynamic) ? [] : [t.reflectedType];
|
||||
res.addAll(p.metadata.map((m) => m.reflectee));
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user