https://kotlinlang.org logo
#announcements
Title
# announcements
p

ptashcka

03/06/2017, 1:09 PM
hey! after plugin upgrade to 1.1 version can't make a project in IDEA with the following error: ErrorKotlin [Internal Error] org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong code generated org.jetbrains.kotlin.codegen.CompilationException Back-end (JVM) Internal error: Couldn't transform method node: next ()Lkotlin/Pair;: has anyone seen it? any workaround? maybe there is a way to downgrade the plugin in IDEA?
m

max.kammerer

03/06/2017, 3:05 PM
ptashcka: Could you provide full stack trace?
and code sample where it fails
p

ptashcka

03/06/2017, 3:08 PM
in a minute
we can speak russian btw 🙂
sorry for the delay submitted through IDEA: Error report: 1376101
m

max.kammerer

03/07/2017, 11:24 AM
привет, можешь дать тело tryProcessingQueue?
p

ptashcka

03/07/2017, 12:42 PM
private fun tryProcessingQueue(): Pair<T, () -> Unit>? { do { val poll = processingQueue.poll()?.queue if (poll == null) { return null } else { if (poll.currentElement == null) { val firstElement = poll.queue.poll() if (firstElement != null) { try { blockedQueues[firstElement.id]!!.currentElement = firstElement } catch(e: Exception) { e.printStackTrace() throw e } if (unblockPeriodSeconds > 0) { poll.nextCall = System.nanoTime() + TimeUnit.NANOSECONDS.convert(unblockPeriodSeconds, SECONDS) delayedQueue.add(poll) } firstElement.timer?.stop() return firstElement.element to { blockQueue.add(firstElement).let { } } } } } } while (true) }
пойдет?
m

max.kammerer

03/07/2017, 12:47 PM
да, супер
выделил минимальный сэмпл https://youtrack.jetbrains.com/issue/KT-16713
p

ptashcka

03/07/2017, 1:42 PM
круто! а есть понимание по времени фикса примерное?
m

max.kammerer

03/07/2017, 2:55 PM
возможно, попадет в 1.1.1
фикс будет в 1.1.2 (уже доступен в snapshotах), для 1.1[.1] в качестве воркэраунда можно заменить while (true) на do ..while(true) или вынести константу в поле/переменную
2 Views