else on version blocks is buggy if after another else #534

nddrylliog opened this Issue Dec 30, 2012 · 2 comments


None yet

2 participants



version(windows) {
  if (something) {
    // something
  } else {
    // something else
} else {
  // should be equivalent to version(!windows) but isn't

The generated code actually has two dangling elses.


In my opinion, else should actually be children nodes of their predecessor. So, the first else should be a children of the if, and the second else should be a children of the version node.

It shouldn't interfere much with our AST transformations, but it should make it a lot clearer what else belongs to what.

shamanas commented Nov 2, 2013

Agreed, more stuff for .98!
Btw, you are on a roll today!

@zhaihj zhaihj added a commit to zhaihj/rock that referenced this issue Jul 10, 2015
@zhaihj zhaihj fix ooc-lang#534 18ba835
@fasterthanlime fasterthanlime added a commit that closed this issue Jul 10, 2015
@zhaihj @fasterthanlime zhaihj + fasterthanlime fix #534 3fc936b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment