|
@@ -766,7 +766,8 @@ let rec acc_get ctx g p =
|
|
| TFun (_ :: args,ret) ->
|
|
| TFun (_ :: args,ret) ->
|
|
let tcallb = TFun (args,ret) in
|
|
let tcallb = TFun (args,ret) in
|
|
let twrap = TFun ([("_e",false,e.etype)],tcallb) in
|
|
let twrap = TFun ([("_e",false,e.etype)],tcallb) in
|
|
- let args = List.map (fun (n,_,t) -> alloc_var n t) args in
|
|
|
|
|
|
+ (* arguments might not have names in case of variable fields of function types, so we generate one (issue #2495) *)
|
|
|
|
+ let args = List.map (fun (n,_,t) -> if n = "" then gen_local ctx t else alloc_var n t) args in
|
|
let ve = alloc_var "_e" e.etype in
|
|
let ve = alloc_var "_e" e.etype in
|
|
let ecall = make_call ctx et (List.map (fun v -> mk (TLocal v) v.v_type p) (ve :: args)) ret p in
|
|
let ecall = make_call ctx et (List.map (fun v -> mk (TLocal v) v.v_type p) (ve :: args)) ret p in
|
|
let ecallb = mk (TFunction {
|
|
let ecallb = mk (TFunction {
|