Here are two examples of extensions in Kotlin. The first one works, the second one gives instrumentation warnings. For the first one I replaced FlatMappingReceivePort with an implementation that uses a lambda directly instead of the guava function.
Here is the generated byte-code for the solution that works:
Here is the one using the Function<...> @Suspenable {..} notation:
The second one instantiates an anonymous inner class flatMap$1. Since constructors can't be instrumented, this might be where the bug lies. The agent doesn't report any warnings though.
Here are two examples of extensions in Kotlin. The first one works, the second one gives instrumentation warnings. For the first one I replaced
FlatMappingReceivePort
with an implementation that uses a lambda directly instead of the guava function.Here is the generated byte-code for the solution that works:
Here is the one using the
Function<...> @Suspenable {..}
notation:The second one instantiates an anonymous inner class
flatMap$1
. Since constructors can't be instrumented, this might be where the bug lies. The agent doesn't report any warnings though.