瀏覽代碼

[generics] apply generic expansion to arg default values

Rudy Ges 2 年之前
父節點
當前提交
039ac61295
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/texpr.ml

+ 1 - 1
src/core/texpr.ml

@@ -232,7 +232,7 @@ let map_expr_type f ft fv e =
 	| TFunction fu ->
 		let fu = {
 			tf_expr = f fu.tf_expr;
-			tf_args = List.map (fun (v,o) -> fv v, o) fu.tf_args;
+			tf_args = List.map (fun (v,o) -> fv v, (Option.map f o)) fu.tf_args;
 			tf_type = ft fu.tf_type;
 		} in
 		{ e with eexpr = TFunction fu; etype = ft e.etype }