Internal Compilation error - Unsupported receiver value: null


Android studio 3.0.1, plugin version 1.2.21

i got this abstract method in a ButtonHelper java class:

public abstract void instantiateButtons(RecyclerView.ViewHolder viewHolder, ArrayList<WrappedButton> buttons);

and this is the implementation in a fragment .kt

object : ButtonHelper(recyclerView) {
        override fun instantiateButtons(viewHolder: RecyclerView.ViewHolder?, buttons: ArrayList<WrappedButton>) {
            buttons.add( ButtonHelper.WrappedButton(
                    "Button text"

i got this error during the build:
Error:org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Unsupported receiver value: null
Cause: Unsupported receiver value: null
File being compiled and position: (138,17) in C:/Android/projects/test_android/app/src/main/java/com/my/project/fragments/AgendaFragment.kt
The root cause was thrown at:

I really can’t find what is going wrong. I’m adding the full error trace in case this can be helpful. Any hint? (1.9 KB)