armaxis
03/12/2019, 11:32 PM//Tasks.kt
abstract class Foo : Callable<Unit> {
override fun call() { bar() }
abstract fun bar()
}
//Manager.java
public class FooChild extends Tasks.Foo {
@Override public void bar() { //haha }
}
Class FooChild is highlighed as Error with message:
'call()' in 'Tasks.Foo' clashes with 'call()' in 'java.util.concurrent.Callable'; attempting to use incompatible return typepublic synthetic bridge
. Here's bytecode:
// access flags 0x1
public call()V
L0
LINENUMBER 93 L0
ALOAD 0
INVOKEVIRTUAL Tasks$Foo.bar ()V
RETURN
L1
LOCALVARIABLE this LTasks$Foo; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
// access flags 0x1041
public synthetic bridge call()Ljava/lang/Object;
L0
LINENUMBER 91 L0
ALOAD 0
INVOKEVIRTUAL Tasks$Foo.call ()V
GETSTATIC kotlin/Unit.INSTANCE : Lkotlin/Unit;
ARETURN
MAXSTACK = 1
MAXLOCALS = 1
Dico
03/13/2019, 4:09 AMpublic kotlin.Unit call()
armaxis
03/13/2019, 7:02 AMCall
?Dico
03/14/2019, 1:12 AM