Compile error in one of Test.kt in Koans

In this Koan Kotlin Playground: Edit, Run, Share Kotlin Code Online

there’s a compile error
Error:(10, 62) Assigning single elements to varargs in named form is forbidden

    @Test fun testMostExpensiveDeliveredProduct() {
        val testShop = shop("test shop for 'most expensive delivered product'",
                customer(lucas, Canberra,
                        order(isDelivered = false, products = idea),
                        //                                    ^ HERE!!
                        order(reSharper)
                )
        )
        Assert.assertEquals("getMostExpensiveDeliveredProduct".toMessage(), reSharper, testShop.customers[0].getMostExpensiveDeliveredProduct())
    }

Why is this error occurring?
And could anyone please fix this, since I cannot modify it?

The kotlin-koans on try.kotlinlang.org is not updated to fix this bug,
The kotlin-koans on play.kotlinlang.org is, see here.

You can work around this bug by setting the version to 1.2.71 on the bottom-right.

Issue is https://youtrack.jetbrains.com/issue/KT-28373.
(I placed a comment on it)

1 Like