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?