File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,6 +217,13 @@ class Client
217217 default :
218218 }
219219
220+ switch ReturnExpressions .testHostArgReturn () {
221+ case Error (message ):
222+ Common .status = ' Failed test for argument return stopping argument evaluation: ' + message ;
223+ return ;
224+ default :
225+ }
226+
220227 // regression test for #926
221228 var x : Dynamic = 3 ;
222229 x * = 5 ;
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ class Common
1313 return count ++ ;
1414 }
1515
16+ public function new () {}
17+
1618 public function dummyMethod () {}
1719 public function dummyMethodArg (_ ) {}
20+
21+ public function instanceIncrementCount (_ ) {
22+ count ++ ;
23+ }
1824}
Original file line number Diff line number Diff line change @@ -15,4 +15,18 @@ class ReturnExpressions {
1515 }
1616 return Error (" Host method executed after return" );
1717 }
18+
19+ @:analyzer (ignore )
20+ static function returnAsCallHaxeArg () {
21+ new Common ().instanceIncrementCount (return );
22+ }
23+
24+ public static function testHostArgReturn () {
25+ Common .count = 0 ;
26+ returnAsCallHaxeArg ();
27+ if (Common .count == 0 ) {
28+ return Ok ;
29+ }
30+ return Error (" Host method executed after return" );
31+ }
1832}
You can’t perform that action at this time.
0 commit comments