Minor, remove temporary workarounds for JPS build

This commit is contained in:
Alexander Udalov
2020-05-26 14:51:56 +02:00
parent e72f7d9a1d
commit d25f9dee62
3 changed files with 4 additions and 16 deletions
@@ -279,7 +279,6 @@ internal class KClassImpl<T : Any>(override val jClass: Class<T>) : KDeclaration
override val isCompanion: Boolean override val isCompanion: Boolean
get() = descriptor.isCompanionObject get() = descriptor.isCompanionObject
@Suppress("NOTHING_TO_OVERRIDE") // Temporary workaround for the JPS build until bootstrap
override val isFun: Boolean override val isFun: Boolean
get() = descriptor.isFun get() = descriptor.isFun
@@ -18,6 +18,7 @@ package kotlin.reflect.jvm.internal
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
import kotlin.jvm.internal.TypeParameterReference
import kotlin.reflect.KType import kotlin.reflect.KType
import kotlin.reflect.KTypeParameter import kotlin.reflect.KTypeParameter
import kotlin.reflect.KVariance import kotlin.reflect.KVariance
@@ -50,17 +51,6 @@ internal class KTypeParameterImpl(override val descriptor: TypeParameterDescript
override fun hashCode() = override fun hashCode() =
descriptor.hashCode() descriptor.hashCode()
// TODO: this temporarily duplicates TypeParameterReference.toString to prevent JPS build failure until stdlib is bootstrapped
override fun toString() = override fun toString() =
// TypeParameterReference.toString(this) TypeParameterReference.toString(this)
buildString {
when (variance) {
KVariance.INVARIANT -> {
}
KVariance.IN -> append("in ")
KVariance.OUT -> append("out ")
}
append(name)
}
} }
@@ -123,8 +123,7 @@ public class ReflectionFactoryImpl extends ReflectionFactory {
return KClassifiers.createType(klass, arguments, isMarkedNullable, Collections.<Annotation>emptyList()); return KClassifiers.createType(klass, arguments, isMarkedNullable, Collections.<Annotation>emptyList());
} }
// TODO: this is a temporary workaround for the JPS build @Override
// @Override
public KTypeParameter typeParameter(Object container, String name, KVariance variance, boolean isReified) { public KTypeParameter typeParameter(Object container, String name, KVariance variance, boolean isReified) {
List<KTypeParameter> typeParameters; List<KTypeParameter> typeParameters;
if (container instanceof KClass) { if (container instanceof KClass) {
@@ -140,7 +139,7 @@ public class ReflectionFactoryImpl extends ReflectionFactory {
throw new IllegalArgumentException("Type parameter " + name + " is not found in container: " + container); throw new IllegalArgumentException("Type parameter " + name + " is not found in container: " + container);
} }
// @Override @Override
public void setUpperBounds(KTypeParameter typeParameter, List<KType> bounds) { public void setUpperBounds(KTypeParameter typeParameter, List<KType> bounds) {
// Do nothing. KTypeParameterImpl implementation will load upper bounds from the metadata. // Do nothing. KTypeParameterImpl implementation will load upper bounds from the metadata.
} }