File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
projects/koin-ksp-compiler/src/jvmMain/kotlin/org/koin/compiler/generator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ class DefinitionWriter(
9494 scope : KoinMetaData .Scope ?
9595// scopeTag : String? = null
9696 ) {
97- val definitionString = " ${def.keyword.keyword} ($qualifier$createAtStart ) { ${param}${prefix}$ctor } $binds "
97+ val cast = if (def is KoinMetaData .Definition .ClassDefinition && def.isMonitored) " as ${def.packageNamePrefix}${def.className} " else " "
98+ val definitionString = " ${def.keyword.keyword} ($qualifier$createAtStart ) { ${param}${prefix}$ctor$cast } $binds "
9899 val scopeDefinitionString = if (scope == null ) {
99100 definitionString
100101 } else {
@@ -105,7 +106,6 @@ class DefinitionWriter(
105106 " scope<${scope.getTagValue()} >{ $definitionString }"
106107 }
107108 }
108-
109109 writeln(" @ExternalDefinition(\" ${def.packageName} \" )" )
110110 writeln(" public fun Module.$DEFINE_PREFIX${def.packageName.camelCase()}${def.label} () : Unit { $scopeDefinitionString }" )
111111 }
You can’t perform that action at this time.
0 commit comments