Issue 104: Cannot return a function from inside a switch block.
Status:  Fixed
Owner: ----
Closed:  Mar 2011
Reported by stephane...@gmail.com, Mar 14, 2011
What steps will reproduce the problem?
1. Compile the code below for the cpp target using the latest nightly compiler (not tested on previous ones).
2.
3.

What is the expected output? What do you see instead?
Should compile.
It generate an error in the output cpp generated code (cannot retrieve the closure to return).

Please complete the following class with minimal code reproducing the
problem :

class Test {
    static function toto(x : Int) : Int -> String {
	return switch (x){
		case 5: function (x) return "Cinq";
	};
}
static function main() {
}
}

Please provide any additional information below.

This is a show stopper for a broad range of valid haxe programs.
Mar 15, 2011
Project Member #1 gameh...@gmail.com
This should be fixed on svn.
Status: Fixed