diff --git a/src/Compiler.php b/src/Compiler.php index f8dd61c..53f81dc 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -28,6 +28,7 @@ public function compile(AbstractModule $module, string $scriptDir): Scripts // Compile dependencies $compileVisitor = new CompileVisitor($container); $container->map(static function (DependencyInterface $dependency, string $key) use ($scripts, $compileVisitor): DependencyInterface { + assert($dependency instanceof AcceptInterface); $script = $dependency->accept($compileVisitor); assert(is_string($script)); $scripts->add($key, $script);