Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
@@ -182,8 +182,19 @@ fun generateUnions(ifaces: List<GenerateTraitOrClass>, typedefs: Iterable<Typede
|
||||
|
||||
val typedefsMarkersMap = typedefsToBeGenerated.groupBy { it.name }.mapValues { mapUnionType(it.value.first().value).copy(name = it.key) }
|
||||
|
||||
val typeNamesToUnions = anonymousUnionTypes.toList().flatMap { unionType -> unionType.memberTypes.filterIsInstance<SimpleType>().map { unionMember -> unionMember.type to unionType.name } }.toMultiMap() merge
|
||||
typedefsToBeGenerated.flatMap { typedef -> typedef.value.memberTypes.filterIsInstance<SimpleType>().map { unionMember -> unionMember.type to typedef.name } }.toMultiMap()
|
||||
val typeNamesToUnions = anonymousUnionTypes
|
||||
.toList()
|
||||
.flatMap { unionType ->
|
||||
unionType.memberTypes
|
||||
.filterIsInstance<SimpleType>()
|
||||
.map { unionMember -> unionMember.type to unionType.name }
|
||||
}.toMultiMap()
|
||||
.merge(typedefsToBeGenerated
|
||||
.flatMap { typedef ->
|
||||
typedef.value.memberTypes
|
||||
.filterIsInstance<SimpleType>()
|
||||
.map { unionMember -> unionMember.type to typedef.name }
|
||||
}.toMultiMap())
|
||||
|
||||
return GenerateUnionTypes(
|
||||
typeNamesToUnionsMap = typeNamesToUnions,
|
||||
|
||||
@@ -19,7 +19,7 @@ fun main(args: Array<String>) {
|
||||
Repository(
|
||||
interfaces = acc.interfaces.mergeReduce(fileRepository.interfaces, ::merge),
|
||||
typeDefs = acc.typeDefs + fileRepository.typeDefs,
|
||||
externals = acc.externals merge fileRepository.externals,
|
||||
externals = acc.externals.merge(fileRepository.externals),
|
||||
enums = acc.enums + fileRepository.enums
|
||||
)
|
||||
}
|
||||
|
||||
+5
-5
@@ -148,7 +148,7 @@ class Kotlin2JvmSourceSetProcessor(
|
||||
|
||||
val aptConfiguration = project.createAptConfiguration(sourceSet.getName(), kotlinAnnotationProcessingDep)
|
||||
|
||||
project afterEvaluate { project ->
|
||||
project.afterEvaluate { project ->
|
||||
if (project != null) {
|
||||
for (dir in sourceSet.getJava().getSrcDirs()) {
|
||||
kotlinDirSet?.srcDir(dir)
|
||||
@@ -318,7 +318,7 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
||||
|
||||
project.createKaptExtension()
|
||||
|
||||
project afterEvaluate { project ->
|
||||
project.afterEvaluate { project ->
|
||||
if (project != null) {
|
||||
val plugin = (project.getPlugins().findPlugin("android")
|
||||
?: project.getPlugins().findPlugin("android-library")) as BasePlugin
|
||||
@@ -405,7 +405,7 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
||||
|
||||
subpluginEnvironment.addSubpluginArguments(project, kotlinTask)
|
||||
|
||||
kotlinTask doFirst {
|
||||
kotlinTask.doFirst {
|
||||
val androidRT = project.files(AndroidGradleWrapper.getRuntimeJars(androidPlugin, androidExt))
|
||||
val fullClasspath = (javaTask.getClasspath() + androidRT) - project.files(kotlinTask.property("kotlinDestinationDir"))
|
||||
(it as AbstractCompile).setClasspath(fullClasspath)
|
||||
@@ -431,7 +431,7 @@ open class KotlinAndroidPlugin @Inject constructor(val scriptHandler: ScriptHand
|
||||
}
|
||||
}
|
||||
|
||||
javaTask doFirst {
|
||||
javaTask.doFirst {
|
||||
javaTask.setClasspath(javaTask.getClasspath() + project.files(kotlinTask.property("kotlinDestinationDir")))
|
||||
}
|
||||
}
|
||||
@@ -514,7 +514,7 @@ open class GradleUtils(val scriptHandler: ScriptHandler, val project: ProjectInt
|
||||
val dependencyHandler: DependencyHandler = scriptHandler.getDependencies()
|
||||
val configurationsContainer: ConfigurationContainer = scriptHandler.getConfigurations()
|
||||
|
||||
val deps = coordinates map { dependencyHandler.create(it) }
|
||||
val deps = coordinates.map { dependencyHandler.create(it) }
|
||||
val configuration = configurationsContainer.detachedConfiguration(*deps.toTypedArray())
|
||||
|
||||
return configuration.getResolvedConfiguration().getFiles { true }
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class SeleniumQUnit(val driver: WebDriver) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun WebElement.get(id: String): String? = getAttribute(id)
|
||||
private operator fun WebElement.get(id: String): String? = getAttribute(id)
|
||||
|
||||
private val WebElement.classAttribute: String?
|
||||
get() = this["class"]
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ fun box(): String {
|
||||
l()
|
||||
|
||||
val ext = Int::extProp
|
||||
if (ext.get(42) != 42) return "Fail ext: ${ext[42]}"
|
||||
if (ext.get(42) != 42) return "Fail ext: ${ext.get(42)}"
|
||||
|
||||
val a = A::class
|
||||
if (a.memberProperties.size() != 1) return "Fail: ${a.memberProperties}"
|
||||
|
||||
Reference in New Issue
Block a user