removing static type assertions work in progress
This commit is contained in:
+1
-1
@@ -253,7 +253,7 @@ public abstract class LazyJavaScope(
|
||||
c.components.externalSignatureResolver.reportSignatureErrors(propertyDescriptor, signatureErrors)
|
||||
}
|
||||
|
||||
propertyDescriptor.setType(effectiveSignature.getReturnType(), listOf(), getDispatchReceiverParameter(), null : JetType?)
|
||||
propertyDescriptor.setType(effectiveSignature.getReturnType(), listOf(), getDispatchReceiverParameter(), null as JetType?)
|
||||
|
||||
if (DescriptorUtils.shouldRecordInitializerForProperty(propertyDescriptor, propertyDescriptor.getType())) {
|
||||
propertyDescriptor.setCompileTimeInitializer(
|
||||
|
||||
+3
-2
@@ -25,12 +25,13 @@ import java.lang.reflect.TypeVariable
|
||||
public class ReflectJavaClassifierType(public override val type: Type) : ReflectJavaType(), JavaClassifierType {
|
||||
private val classifier: JavaClassifier = run {
|
||||
val type = type
|
||||
when (type) {
|
||||
val classifier: JavaClassifier = when (type) {
|
||||
is Class<*> -> ReflectJavaClass(type)
|
||||
is TypeVariable<*> -> ReflectJavaTypeParameter(type)
|
||||
is ParameterizedType -> ReflectJavaClass(type.getRawType() as Class<*>)
|
||||
else -> throw IllegalStateException("Not a classifier type (${type.javaClass}): $type")
|
||||
} : JavaClassifier
|
||||
}
|
||||
classifier
|
||||
}
|
||||
|
||||
override fun getClassifier(): JavaClassifier = classifier
|
||||
|
||||
@@ -53,7 +53,7 @@ private fun TypeArgument.toTypeProjection(): TypeProjection {
|
||||
}
|
||||
|
||||
private fun TypeProjection.toTypeArgument(typeParameter: TypeParameterDescriptor) =
|
||||
when (TypeSubstitutor.combine(typeParameter.getVariance(), getProjectionKind()) : Variance) {
|
||||
when (TypeSubstitutor.combine(typeParameter.getVariance(), getProjectionKind())) {
|
||||
Variance.INVARIANT -> TypeArgument(typeParameter, getType(), getType())
|
||||
Variance.IN_VARIANCE -> TypeArgument(typeParameter, getType(), typeParameter.builtIns.nullableAnyType)
|
||||
Variance.OUT_VARIANCE -> TypeArgument(typeParameter, typeParameter.builtIns.nothingType, type)
|
||||
|
||||
Reference in New Issue
Block a user