Method containing only a switch block results in invalid syntax #70

Closed
eallik opened this Issue Nov 20, 2013 · 0 comments

Comments

Projects
None yet
2 participants

eallik commented Nov 20, 2013

This:

public class TestCls {
    public void doSmth(int i) {
        switch (i) {
        case 3:
            return;
        }
    }
}

gets converted to:

class TestCls {
  def doSmth(i: Int) i match {  // ERROR: '=' expected but identifier found
    case 3 => return
  }
}

...the generated method body should either be wrapped in { and } or prefixed with =.

@eallik eallik referenced this issue in dnadolny/java-to-scala-plugin Nov 20, 2013

Closed

Method containing only a switch block results in invalid syntax #9

timowest added a commit that referenced this issue Nov 27, 2013

timowest added a commit that referenced this issue Nov 27, 2013

@timowest timowest closed this Nov 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment