diff --git a/lib/transformer/injector_generator.dart b/lib/transformer/injector_generator.dart index 11543ea..a6af126 100644 --- a/lib/transformer/injector_generator.dart +++ b/lib/transformer/injector_generator.dart @@ -252,11 +252,11 @@ class _Processor { } if (resolver.getImportUri(cls.library, from: _generatedAssetId) == null) { _warn('${cls.name} cannot be injected because ' - 'the containing file cannot be imported.', ctor); + 'the containing file cannot be imported.', cls); return false; } if (!cls.typeParameters.isEmpty) { - _warn('${cls.name} is a parameterized type.', ctor); + _warn('${cls.name} is a parameterized type.', cls); // Only warn. } if (ctor.name != '') { diff --git a/test/injector_generator_spec.dart b/test/injector_generator_spec.dart index 90742c0..ca7faa0 100644 --- a/test/injector_generator_spec.dart +++ b/test/injector_generator_spec.dart @@ -79,7 +79,7 @@ main() { ], messages: [ 'warning: Parameterized is a parameterized type. ' - '(package:a/a.dart 2 18)', + '(package:a/a.dart 1 16)', ]); });