Closed aksh1618 closed 6 years ago
The warning could also be solved by swapping the arguments with which the order
function is called and not using the products
named argument. You can see an example of this solution in the TestShop.kt
file (lines 49 and 50). Regardless of the chosen solution, I would recommend keeping the code consistent.
@jarekankowski Although I was aware of both, I chose this solution as this would show a learner an alternative way to call a function with named varargs. It remains to be decided whether this takes precedence over consistency.
aksh1618, thanks for noticing this problem! I've fixed it in a way mentioned by @jarekankowski
This was giving the warning 'Assigning single elements to varargs in named form is deprecated.' in IntelliJ IDEA.