Skip to content

Commit

Permalink
remove unnecessary check from macro example code
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 authored and lrhn committed Jul 21, 2023
1 parent b26dd04 commit 4299d94
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions working/macros/example/lib/injectable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,6 @@ macro class Component implements ClassDeclarationsMacro, ClassDefinitionMacro {
// If we have no explicit provider from any module, check if the type is
// injectable.
final clazz = await builder.typeDeclarationOf(type);
if (clazz is! IntrospectableType) {
throw UnsupportedError('Only classes are automatically injectable.');
}
for (final method in await builder.methodsOf(clazz)) {
if (!method.isStatic) continue;
final returnType = method.returnType;
Expand Down

0 comments on commit 4299d94

Please sign in to comment.