fix if-else generation in version block (issue #534) #900

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@zhaihj
Contributor
zhaihj commented Jul 10, 2015

This commit makes the following code work:

version(windows) {
  if (false) {
    // something
    "a" println()
  } else {
    // something else
    "b" println()
  }
} else {
    if(true){
        "c" println()
    } else {
        "d" println()
    }
}

version(!windows) {
  if (false) {
    // something
    "a" println()
  } else {
    // something else
    "b" println()
  }
} else {
    if(true){
        "c" println()
    } else {
        "d" println()
    }
}
@zhaihj zhaihj referenced this pull request in ooc-lang/nagaqueen Jul 10, 2015
Closed

fix if-else in version block #27

@zhaihj
Contributor
zhaihj commented Jul 10, 2015

Test failed because Nagaqueen.c is not updated...

@fasterthanlime

Ahh that's what I wanted to do all along :) (have if-else chains be linked lists). Thanks a lot!

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