Minor, remove temporary workarounds for JPS build
This commit is contained in:
@@ -279,7 +279,6 @@ internal class KClassImpl<T : Any>(override val jClass: Class<T>) : KDeclaration
|
||||
override val isCompanion: Boolean
|
||||
get() = descriptor.isCompanionObject
|
||||
|
||||
@Suppress("NOTHING_TO_OVERRIDE") // Temporary workaround for the JPS build until bootstrap
|
||||
override val isFun: Boolean
|
||||
get() = descriptor.isFun
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ package kotlin.reflect.jvm.internal
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import kotlin.jvm.internal.TypeParameterReference
|
||||
import kotlin.reflect.KType
|
||||
import kotlin.reflect.KTypeParameter
|
||||
import kotlin.reflect.KVariance
|
||||
@@ -50,17 +51,6 @@ internal class KTypeParameterImpl(override val descriptor: TypeParameterDescript
|
||||
override fun hashCode() =
|
||||
descriptor.hashCode()
|
||||
|
||||
// TODO: this temporarily duplicates TypeParameterReference.toString to prevent JPS build failure until stdlib is bootstrapped
|
||||
override fun toString() =
|
||||
// TypeParameterReference.toString(this)
|
||||
buildString {
|
||||
when (variance) {
|
||||
KVariance.INVARIANT -> {
|
||||
}
|
||||
KVariance.IN -> append("in ")
|
||||
KVariance.OUT -> append("out ")
|
||||
}
|
||||
|
||||
append(name)
|
||||
}
|
||||
TypeParameterReference.toString(this)
|
||||
}
|
||||
|
||||
@@ -123,8 +123,7 @@ public class ReflectionFactoryImpl extends ReflectionFactory {
|
||||
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) {
|
||||
List<KTypeParameter> typeParameters;
|
||||
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);
|
||||
}
|
||||
|
||||
// @Override
|
||||
@Override
|
||||
public void setUpperBounds(KTypeParameter typeParameter, List<KType> bounds) {
|
||||
// Do nothing. KTypeParameterImpl implementation will load upper bounds from the metadata.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user