Skip to content

Commit

Permalink
fix throw in haxe.Template (closes HaxeFoundation#4217)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Jul 1, 2015
1 parent d73f175 commit c5166d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/haxe/Template.hx
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ class Template {
var e1:Dynamic = makeExpr(l);
var p = l.pop();
if( p == null || p.s )
throw p.p;
throw p;
if( p.p == ")" )
return e1;
var e2:Dynamic = makeExpr(l);
var p2 = l.pop();
if( p2 == null || p2.p != ")" )
throw p2.p;
throw p2;
return switch( p.p ) {
case "+": function() { return cast e1() + e2(); };
case "-": function() { return cast e1() - e2(); };
Expand Down

0 comments on commit c5166d2

Please sign in to comment.