E07610: inappropriate combination of program arguments

Category: E07xxx Full resolution · Reported in phase: EXPLICIT_TYPE_SYMBOL_DEFINITION · Classification: PROGRAM_ARGUMENTS_INAPPROPRIATE · All error codes

What went wrong

The combination of program arguments you've specified is incompatible.

Worked examples

Compilable examples demonstrating this error and the correct fix:

  • ek9 -q 889 (What arguments can an EK9 program accept?)

How to fix it

  1. Use compatible argument type combinations
  2. Check program argument constraints

Common causes

  • Conflicting argument types
  • Multiple list arguments that conflict

See also

  • E07610: incompatible argument combination (this error)
  • E07600: unsupported argument type

Examples

Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.

Fails with E07610: inappropriate combination of program arguments

#!ek9
defines module error.e07610.bad

  defines program

    //Either name every argument, or take them all as a List of String
    Serve()
      ->
        port as Integer
        commandLine as List of String

      stdout <- Stdout()
      stdout.println(`serving on ${port}`)

Fixed: Name every argument, or take them all as a List of String

#!ek9
defines module error.e07610.good

  defines program

    //Option 1: name every argument
    Serve()
      ->
        port as Integer
        host as String

      stdout <- Stdout()
      stdout.println(`serving ${host} on ${port}`)

    //Option 2: take them all, and read them yourself
    ServeRaw()
      -> commandLine as List of String
      stdout <- Stdout()
      stdout.println(`${length commandLine} arguments`)

Questions and answers

These Q&A entries show E07610 and its fix: