Skip to content

Commit

Permalink
[As3] generate value cast to Function using "as" (closes HaxeFoundati…
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Sep 25, 2013
1 parent 1a6c3ac commit 75b9cd1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions genas3.ml
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,14 @@ and gen_value ctx e =
gen_value ctx e1
| TCast (e1,None) ->
let s = type_str ctx e.etype e1.epos in
if s = "*" then
begin match s with
| "*" ->
gen_value ctx e1
else begin
| "Function" ->
spr ctx "((";
gen_value ctx e1;
print ctx ") as %s)" s;
| _ ->
print ctx "%s(" s;
gen_value ctx e1;
spr ctx ")";
Expand Down

0 comments on commit 75b9cd1

Please sign in to comment.