E1013: parameter named twice in a call

View source

Each parameter receives exactly one argument.

Each parameter receives exactly one argument. A call that names the same parameter twice would give it two values, so the compiler rejects the second one. The error points at the second argument. A parameter that gets no argument is reported as E1015.

Example

actus
verb scale(abs value: Int, abs factor: Int) -> Int {
    return value * factor;
}

verb main() {
    erg a: Int = 2;
    println(int: scale(value: abs a, value: abs a));
}

Fix

Name each parameter once. The second argument most likely belongs to the parameter that has no argument yet.

actus
verb scale(abs value: Int, abs factor: Int) -> Int {
    return value * factor;
}

verb main() {
    erg a: Int = 2;
    println(int: scale(value: abs a, factor: abs a));
}

Run actus explain E1013 in your terminal to read this entry offline. Browse Ownership & types or all error codes.