Yield outside of switch expression

Template for a good bug report, formatted with Markdown:

  • Versions used : 8.5
  • Error observed : ERROR: Unable to parse source file : Parse error at line 128 column 2: yield outside of switch expression
  • Steps to reproduce analyze class with yield function

Hey there.

Can you provide a small snippet of code that reproduces the issue?

Colin

1 Like

Just ran into this bug. Here is a reproducer:

class MyClass {

    void f() {
        if (true) yield null;
    }
}