Wrong function name in fatalError message for newScoreBoard() in High Score Board

Description

In task 2. Add a new toy to the database, the code example doesn’t match the function the task asks you to implement.

  1. Wrong function name

The task asks you to implement createToy(name:amount:), but the example calls getName:

getName(name: “Doll”, quantity: 10) // Returns (name: “Doll”, quantity: 10)

  1. Mismatched parameter label

The signature uses amount as the second parameter label, but the example uses quantity. It’s unclear which one is intended.

Suggested fix

If the label should be amount, update the example to match the signature:

createToy(name: “Doll”, amount: 10) // Returns (name: “Doll”, quantity: 10)

If it should be quantity, update the signature and description to createToy(name:quantity:) instead.

Why it matters

The mismatch can confuse learners and cause their solution to fail the tests if the test suite expects a different label than the one shown in the example.

This looks like an LLM generated post. Please write your own posts on the forum :slight_smile: Otherwise I’ll need an LLM to summarize LLM posts for me on the forum!

I think this was related to Fix Incorrect function name and parameter label in Santa's Swifty Helper by gorpello · Pull Request #924 · exercism/swift · GitHub.

Apologies for that! I’m new to the community and learning the contribution workflow. I’ve already opened the PR on GitHub for this issue. Happy to contribute!

Contributions are always welcome, but please take the time to write things out by hand! We like talking to humans, not to bots.