Explorar o código

fixed completion issue when using for( x in Vector )

Nicolas Cannasse %!s(int64=13) %!d(string=hai) anos
pai
achega
5c4ba2e8b6
Modificáronse 2 ficheiros con 11 adicións e 0 borrados
  1. 4 0
      doc/CHANGES.txt
  2. 7 0
      typer.ml

+ 4 - 0
doc/CHANGES.txt

@@ -9,6 +9,7 @@
 	all : does not allow overriding var/prop
 	flash : removed wrapping for Xml nodes, use instead specific compare when comparing two typed nodes
 	js : use new haxe.xml.Parser (faster, not based on Regexp)
+	flash : fixed completion issue with for( x in Vector )
 
 2012-04-14: 2.09
 	all : optimized const == const and const != const (with different const types)
@@ -54,6 +55,9 @@
 	cpp : Default arguments now use Null<T> for performance increase and interface compatibility
 	cpp : Added metadata options for injecting native cpp code into headers, classes and functions
 	php : added php.Lib.mail
+	(hotfix) fixed bug in completion and disabled profiling on Linux
+	(hotfix) fixed $ssize when doing new String(v) in neko
+	(hotfix) fixed bug with properties in interfaces for Flash & PHP
 
 2011-09-25: 2.08
 	js : added js.JQuery

+ 7 - 0
typer.ml

@@ -572,6 +572,13 @@ let rec type_field ctx e i p mode =
 			loop_dyn c params
 		with Not_found ->
 			if PMap.mem i c.cl_statics then error ("Cannot access static field " ^ i ^ " from a class instance") p;
+			if ctx.com.display && i = "iterator" && c.cl_path = (["flash"],"Vector") then begin
+				let it = TAnon {
+					a_fields = PMap.add "next" (mk_field "next" (TFun([],List.hd params)) p) PMap.empty;
+					a_status = ref Closed;
+				} in
+				AKExpr (mk (TField (e,i)) (TFun([],it)) p)
+			end else
 			no_field())
 	| TDynamic t ->
 		(try