[KT-58817] Star-imports are not handled
Default imports coming from script configuration can be of "star" type. Prior to this commit they were effectively ignored due to a bug at FQN assembly. Before: org.gradle.dsl.* => org.gradle.dsl. After: org.gradle.dsl.* => org.gradle.dsl
This commit is contained in:
committed by
Space Team
parent
6255efa7f7
commit
1b8fd01969
+1
-1
@@ -58,7 +58,7 @@ class FirScriptConfiguratorExtensionImpl(
|
||||
compilationConfiguration[ScriptCompilationConfiguration.defaultImports]?.forEach { defaultImport ->
|
||||
val trimmed = defaultImport.trim()
|
||||
val endsWithStar = trimmed.endsWith("*")
|
||||
val stripped = if (endsWithStar) trimmed.substring(0, trimmed.length - 1) else trimmed
|
||||
val stripped = if (endsWithStar) trimmed.substring(0, trimmed.length - 2) else trimmed
|
||||
val fqName = FqName.fromSegments(stripped.split("."))
|
||||
fileBuilder.imports += buildImport {
|
||||
importedFqName = fqName
|
||||
|
||||
Reference in New Issue
Block a user