Jonathan:

This is not intended. Note that calling "return;" after "funi(...)" makes everything work. However, it feels like I'm doing something wrong here?

Try:

enum RunOpt { opt1, opt2, opt3 } // No semicolon here

final switch (option) with (RunOpt) {
    case opt1: fun1(...); break;
    case opt2: fun2(...); break;
    case opt3: fun3(...); break;
}

Bye,
bearophile

Reply via email to