Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1090)

Unified Diff: third_party/pkg/di/lib/dynamic_injector.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/di/benchmark/injector_benchmark_common.dart ('k') | third_party/pkg/di/lib/generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/di/lib/dynamic_injector.dart
===================================================================
--- third_party/pkg/di/lib/dynamic_injector.dart (revision 33054)
+++ third_party/pkg/di/lib/dynamic_injector.dart (working copy)
@@ -30,23 +30,8 @@
MethodMirror ctor = classMirror.declarations[classMirror.simpleName];
- if (ctor == null) {
- throw new NoProviderError('Unable to find default constructor for $type. '
- 'Make sure class has a default constructor.' +
- (1.0 is int ?
- ' Make sure you have correctly configured @MirrorsUsed.' : ''));
- }
-
resolveArgument(int pos) {
ParameterMirror p = ctor.parameters[pos];
- if (MirrorSystem.getName(p.type.qualifiedName) == 'dynamic') {
- var name = MirrorSystem.getName(p.simpleName);
- throw new NoProviderError(error("The '$name' parameter must be typed"));
- }
- if (p.type is TypedefMirror) {
- throw new NoProviderError(
- error('Cannot create new instance of a typedef ${p.type}'));
- }
return getInstanceByType(getReflectedTypeWorkaround(p.type), requestor);
}
« no previous file with comments | « third_party/pkg/di/benchmark/injector_benchmark_common.dart ('k') | third_party/pkg/di/lib/generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698