Exerosis
06/24/2023, 2:01 AM@Base
@Nullable
public static final Object handle(@NotNull Mutated _context_receiver_0, @NotNull Player $this$handle, @NotNull Object roots, @NotNull Function2 handler, @NotNull Continuation $completion) {
<undefinedtype> test = new Commands() {
@Base
@Nullable
public Object handle(@NotNull Player $this$handle, @NotNull Mutated _context_receiver_0, @NotNull Object roots, @NotNull Function2 handler, @NotNull Continuation $completion) {
return DefaultImpls.handle(this, (Mutated)$this$handle, (Player)_context_receiver_0, roots, handler, $completion);
}
// $FF: synthetic method
// $FF: bridge method
public Object handle(Mutated _context_receiver_0, Player $this$handle, Object roots, Function2 handler, Continuation $completion) {
return this.handle((Player)_context_receiver_0, (Mutated)$this$handle, roots, handler, $completion);
}
};
int var8 = false;
Object var10000 = test.handle(_context_receiver_0, $this$handle, roots, handler, $completion);
return var10000 == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? var10000 : Unit.INSTANCE;
}
Caught red handed! Casting Mutated to Player:
context(Toggled) @Base
suspend fun Player.handle(roots: Any, handler: suspend Arguments.() -> (Unit)) {
val player = this@handle
val test = object : Commands {}
test.run { handle(roots, handler) }
// Commands.run { player.handle(roots, handler) }
}
Presumably some strange compiler bug, I'll attempt to isolate.