Skip to content

Commit 4bee744

Browse files
committed
remove unnecessary check from macro example code
1 parent 3169b7a commit 4bee744

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

working/macros/example/lib/injectable.dart

-3
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,6 @@ macro class Component implements ClassDeclarationsMacro, ClassDefinitionMacro {
388388
// If we have no explicit provider from any module, check if the type is
389389
// injectable.
390390
final clazz = await builder.typeDeclarationOf(type);
391-
if (clazz is! IntrospectableType) {
392-
throw UnsupportedError('Only classes are automatically injectable.');
393-
}
394391
for (final method in await builder.methodsOf(clazz)) {
395392
if (!method.isStatic) continue;
396393
final returnType = method.returnType;

0 commit comments

Comments
 (0)