Get rid of exception at ConeKotlinType.varargElementType

This commit is contained in:
Mikhail Glukhikh
2020-09-10 09:39:11 +03:00
parent 2f61a2f56f
commit c2d9fc469a

View File

@@ -398,5 +398,5 @@ internal fun FirExpression.getExpectedType(
}
fun ConeKotlinType.varargElementType(): ConeKotlinType {
return this.arrayElementType() ?: error("Failed to extract! ${this.render()}!")
return this.arrayElementType() ?: this
}