johan
09/08/2016, 5:13 PMval annotation = object : Annotation{}
val array:Array<Annotation> = arrayOf(annotation)
val converter: retrofit2.Converter<ResponseBody, APIError> =
APIServiceProvider.retrofit.responseBodyConverter(
APIError::class.java,
array)
generates this BE (JVM) internal error:
Error:(40, 43) org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'arrayOf' into
{
val annotation = object : Annotation{}
val array:Array<Annotation> = arrayOf(annotation)
val converter: retrofit2.Converter<ResponseBody, APIError> =
APIServiceProvider.retrofit!!.responseBodyConverter(
APIError::class.java,
array)
val error = converter.convert(it)
Log.e("API", "Error on $call: $error")
onError(APIError(it.string(), response.code()))
}
cause: Not generated
Cause: Couldn't find declaration file for kotlin/KotlinPackage
Any idea what's going on ?