浏览代码

[generic] inherit CAbstract

Simon Krajewski 2 年之前
父节点
当前提交
65fb793bf0
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      src/typing/generic.ml
  2. 2 1
      tests/unit/compile-each.hxml

+ 1 - 0
src/typing/generic.ml

@@ -335,6 +335,7 @@ let rec build_generic_class ctx c p tl =
 		TypeloadFunction.add_constructor ctx cg false p;
 		cg.cl_kind <- KGenericInstance (c,tl);
 		if (has_class_flag c CInterface) then add_class_flag cg CInterface;
+		if (has_class_flag c CAbstract) then add_class_flag cg CAbstract;
 		cg.cl_constructor <- (match cg.cl_constructor, c.cl_constructor, c.cl_super with
 			| _, Some cf, _ -> Some (build_field cf)
 			| Some ctor, _, _ -> Some ctor

+ 2 - 1
tests/unit/compile-each.hxml

@@ -9,4 +9,5 @@
 --dce full
 -lib utest
 -D analyzer-optimize
--D analyzer-user-var-fusion
+-D analyzer-user-var-fusion
+-D message-reporting=pretty