Build compiler with -Xjvm-default=all + @JvmDefaultCompatibility when needed

This commit is contained in:
Mikhael Bogdanov
2021-12-08 10:05:41 +01:00
committed by Alexander Udalov
parent 61d339e8f2
commit c168a19a58
9 changed files with 22 additions and 33 deletions
-4
View File
@@ -24,8 +24,4 @@ dependencies {
sourceSets {
"main" { projectDefault() }
"test" {}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xjvm-default=compatibility"
}
@@ -55,8 +55,6 @@ interface TypeResolutionInterceptorExtension {
@InternalNonStableExtensionPoints
interface CallResolutionInterceptorExtension {
@Suppress("DEPRECATION")
@JvmDefault
fun interceptResolvedCallAtomCandidate(
candidateDescriptor: CallableDescriptor,
completedCallAtom: ResolvedCallAtom,
@@ -65,8 +63,6 @@ interface CallResolutionInterceptorExtension {
diagnostics: Collection<KotlinCallDiagnostic>
): CallableDescriptor = candidateDescriptor
@Suppress("DEPRECATION")
@JvmDefault
fun interceptCandidates(
candidates: Collection<NewResolutionOldInference.MyCandidate>,
context: BasicCallResolutionContext,
@@ -77,8 +73,6 @@ interface CallResolutionInterceptorExtension {
tracing: TracingStrategy
): Collection<NewResolutionOldInference.MyCandidate> = candidates
@Suppress("DEPRECATION")
@JvmDefault
fun interceptFunctionCandidates(
candidates: Collection<FunctionDescriptor>,
scopeTower: ImplicitScopeTower,
@@ -89,8 +83,6 @@ interface CallResolutionInterceptorExtension {
location: LookupLocation
): Collection<FunctionDescriptor> = candidates
@Suppress("DEPRECATION")
@JvmDefault
fun interceptFunctionCandidates(
candidates: Collection<FunctionDescriptor>,
scopeTower: ImplicitScopeTower,
@@ -103,8 +95,6 @@ interface CallResolutionInterceptorExtension {
extensionReceiver: ReceiverValueWithSmartCastInfo?
): Collection<FunctionDescriptor> = candidates
@Suppress("DEPRECATION")
@JvmDefault
fun interceptVariableCandidates(
candidates: Collection<VariableDescriptor>,
scopeTower: ImplicitScopeTower,
@@ -115,8 +105,6 @@ interface CallResolutionInterceptorExtension {
location: LookupLocation
): Collection<VariableDescriptor> = candidates
@Suppress("DEPRECATION")
@JvmDefault
fun interceptVariableCandidates(
candidates: Collection<VariableDescriptor>,
scopeTower: ImplicitScopeTower,
@@ -144,8 +144,6 @@ interface SyntheticResolveExtension {
fun getSyntheticFunctionNames(thisDescriptor: ClassDescriptor): List<Name> = emptyList()
@Suppress("DEPRECATION")
@JvmDefault
fun getSyntheticPropertiesNames(thisDescriptor: ClassDescriptor): List<Name> = emptyList()
fun getSyntheticNestedClassNames(thisDescriptor: ClassDescriptor): List<Name> = emptyList()
@@ -155,8 +153,6 @@ interface SyntheticResolveExtension {
* or null in case it needs to run resolution and inference and/or it is very costly.
* Override this method if resolution started to fail with recursion.
*/
@Suppress("DEPRECATION")
@JvmDefault
fun getPossibleSyntheticNestedClassNames(thisDescriptor: ClassDescriptor): List<Name>? = getSyntheticNestedClassNames(thisDescriptor)
fun addSyntheticSupertypes(thisDescriptor: ClassDescriptor, supertypes: MutableList<KotlinType>) {}
-4
View File
@@ -15,8 +15,4 @@ sourceSets {
"test" {}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xjvm-default=all-compatibility"
}
optInToExperimentalCompilerApi()
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.config.CompilerConfigurationKey
@ExperimentalCompilerApi
@JvmDefaultWithCompatibility
interface CommandLineProcessor {
val pluginId: String
val pluginOptions: Collection<AbstractCliOption>
@@ -83,12 +83,6 @@ public class KtImportDirective extends KtElementImplStub<KotlinImportDirectiveSt
return new ImportContent.ExpressionBased(reference);
}
@Nullable
@Override
public Name getImportedName() {
return KtImportInfo.DefaultImpls.getImportedName(this);
}
@Override
@Nullable
@IfNotParsed