|
@@ -400,13 +400,10 @@ let rec gen_call ctx e el in_value =
|
|
|
concat ctx "," (gen_value ctx) el;
|
|
|
spr ctx ")";
|
|
|
| TField ( { eexpr = TConst(TInt _ | TFloat _| TString _| TBool _) } as e , ((FInstance _ | FAnon _) as ef)), el ->
|
|
|
- (* TODO: Come up with better workaround for dealing with invoked methods on constants e.g. "foo".charAt(0); *)
|
|
|
- spr ctx "(function(x) return x:";
|
|
|
- print ctx "%s" (field_name ef);
|
|
|
- spr ctx "(";
|
|
|
- concat ctx "," (gen_value ctx) el;
|
|
|
- spr ctx ") end )(";
|
|
|
+ spr ctx ("(");
|
|
|
gen_value ctx e;
|
|
|
+ print ctx ("):%s(") (field_name ef);
|
|
|
+ concat ctx "," (gen_value ctx) el;
|
|
|
spr ctx ")";
|
|
|
| TField (e, ((FInstance _ | FAnon _ | FDynamic _) as ef)), el ->
|
|
|
gen_value ctx e;
|