Browse Source

don't generate enums for classes that extends something

Nicolas Cannasse 16 years ago
parent
commit
35a6105500
2 changed files with 4 additions and 0 deletions
  1. 3 0
      doc/CHANGES.txt
  2. 1 0
      genas3.ml

+ 3 - 0
doc/CHANGES.txt

@@ -37,6 +37,9 @@ TODO :
 	flash9/as3/php : don't add Boot.skip_constructor test if no side effects in constructor
 	flash9/as3/php : don't add Boot.skip_constructor test if no side effects in constructor
 	compiler : added --no-opt to disable expr reduction
 	compiler : added --no-opt to disable expr reduction
 	compiler : separated basic and advanced commandline options
 	compiler : separated basic and advanced commandline options
+	compiler : fixed printing of sub-function types
+	genHX : fixed generation of classes that extends another class (shouldn't be turned into enums)
+	speedup Array.remove on flash/flash9/js
 
 
 2008-11-23: 2.02
 2008-11-23: 2.02
 	Std.is(MyInterface, Class) now returns true (haXe/PHP)
 	Std.is(MyInterface, Class) now returns true (haXe/PHP)

+ 1 - 0
genas3.ml

@@ -1274,6 +1274,7 @@ let genhx_class ctx c s =
 	if pack <> [] then IO.printf ch "package %s;\n\n" (String.concat "." pack);
 	if pack <> [] then IO.printf ch "package %s;\n\n" (String.concat "." pack);
 	let enum_fields, isenum = (try
 	let enum_fields, isenum = (try
 		if Array.length c.cl3_fields > 0 || c.cl3_interface || Array.length s.st3_fields = 0 then raise Exit;
 		if Array.length c.cl3_fields > 0 || c.cl3_interface || Array.length s.st3_fields = 0 then raise Exit;
+		(match c.cl3_super with None -> () | Some p -> if type_path ctx p <> ([],"Dynamic") then raise Exit);
 		let etype = ref None in
 		let etype = ref None in
 		let fields = List.map (fun f ->
 		let fields = List.map (fun f ->
 			(match f.f3_kind with
 			(match f.f3_kind with