My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 223: return switch causes build error
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jan 2013


 
Reported by den...@gmail.com, Jan 30, 2013
function test() : Int {
    return switch(1) {
       case 1: return true;
    }
}

compiles to:

return return 1;

which causes an error while building
Jan 30, 2013
Project Member #1 si...@haxe.org
Note: this causes "This expression cannot be compiled to" errors on some other targets, so we could forbid it for Cpp too.
Status: Accepted
Jan 30, 2013
Project Member #2 si...@haxe.org
Using return as value is now forbidden on haxe r5975.
Status: Fixed

Powered by Google Project Hosting