Skip to content

Commit

Permalink
Erase type if kustom generic is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoSignoretto authored and glureau committed Jul 27, 2023
1 parent 205ed8a commit af460c0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ class OriginTypeName(
fun importedMethod(name: FormatString) = importMethod(name)

val exportedTypeName: TypeName by lazy {
// Remove TypeParameter: because we can't export generic in a cool manner yet, so we produce concrete from generics.
// See @KustomExportGenerics
exportedType()
var type = exportedType()
if(isKustomExportAnnotated) {
// Remove TypeParameter: because we can't export generic in a cool manner yet, so we produce concrete from generics.
// See @KustomExportGenerics
type = type.removeTypeParameter()
}
type
}

fun exportedMethod(name: FormatString) = exportMethod(name)
Expand Down

0 comments on commit af460c0

Please sign in to comment.