-
-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Closed
Copy link
Description
Hi!
The following code does not compile:
component Main {
fun insertAfter (value : a, afterValue : Maybe(a), arr : Array(a)) : Array(a) {
[]
}
fun render : Html {
insertAfter(value: "123", afterValue: Maybe.Nothing, arr: [])
<div>"Hello World!"</div>
}
}
due to error:
░ ERROR (CALL_NOT_FOUND_ARGUMENT) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
I was looking for a named argument but I can't find it:
value
The type of the function is:
Function(
a,
afterValue: Maybe(a),
arr: Array(a),
Array(a))
The call in question is here:
┌ Main.mint:7:5
├───────────────────────────────────────────────────────────────────
3│ []
4│ }
5│
6│ fun render : Html {
7│ insertAfter(value: "123", afterValue: Maybe.Nothing, arr: [])
│ ⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃
8│
9│ <div>"Hello World!"</div>
10│ }
11│ }
The error defines the function to have 4 parameters but it has in fact just 3 parameters.
Sandbox:
https://mint-lang.com/sandbox/C5yZMlukwyting

Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done