Debugger: check that virtual machine allows to get bytecodes

This commit is contained in:
Natalia Ukhorskaya
2016-01-26 13:05:20 +03:00
parent 23080f78f7
commit b442cf9fec
@@ -24,7 +24,6 @@ import com.sun.jdi.TypeComponent
import org.jetbrains.kotlin.load.java.JvmAbi
import org.jetbrains.kotlin.name.FqNameUnsafe
import org.jetbrains.org.objectweb.asm.Opcodes
import sun.tools.java.RuntimeConstants
class KotlinSyntheticTypeComponentProvider: SyntheticTypeComponentProvider {
override fun isSynthetic(typeComponent: TypeComponent?): Boolean {
@@ -54,6 +53,7 @@ class KotlinSyntheticTypeComponentProvider: SyntheticTypeComponentProvider {
private fun Method.isDelegateToDefaultInterfaceImpl(): Boolean {
if (allLineLocations().size != 1) return false
if (!virtualMachine().canGetBytecodes()) return false
if (!hasOnlyInvokeStatic(this)) return false