Skip to content
This repository has been archived by the owner on Dec 6, 2017. It is now read-only.

Commit

Permalink
fix(transformer): Exception on parameterized types with implicit cons…
Browse files Browse the repository at this point in the history
…tructors

Fixing a transformer crash which was occurring when attempting to warn about parameterized
types when the type has an implicit constructor.
  • Loading branch information
blois committed Apr 22, 2014
1 parent cf0b922 commit ed0a2b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/transformer/injector_generator.dart
Expand Up @@ -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 != '') {
Expand Down
2 changes: 1 addition & 1 deletion test/injector_generator_spec.dart
Expand Up @@ -79,7 +79,7 @@ main() {
],
messages: [
'warning: Parameterized is a parameterized type. '
'(package:a/a.dart 2 18)',
'(package:a/a.dart 1 16)',
]);
});

Expand Down

0 comments on commit ed0a2b0

Please sign in to comment.