Bläddra i källkod

renamed IntIter to IntIterator

Nicolas Cannasse 12 år sedan
förälder
incheckning
da652063ac
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      optimizer.ml
  2. 1 1
      std/IntIterator.hx
  3. 1 1
      typer.ml

+ 1 - 1
optimizer.ml

@@ -400,7 +400,7 @@ let optimize_for_loop ctx i e1 e2 p =
 	let t_int = ctx.t.tint in
 	let lblock el = Some (mk (TBlock el) t_void p) in
 	match e1.eexpr, follow e1.etype with
-	| TNew ({ cl_path = ([],"IntIter") },[],[i1;i2]) , _ ->
+	| TNew ({ cl_path = ([],"IntIterator") },[],[i1;i2]) , _ ->
 		let max = (match i1.eexpr , i2.eexpr with
 			| TConst (TInt a), TConst (TInt b) when Int32.compare b a < 0 -> error "Range operate can't iterate backwards" p
 			| _, TConst _ | _ , TLocal _ -> None

+ 1 - 1
std/IntIter.hx → std/IntIterator.hx

@@ -22,7 +22,7 @@
 /**
 	Integer iterator. Used for interval implementation.
 **/
-class IntIter {
+class IntIterator {
 
 	var min : Int;
 	var max : Int;

+ 1 - 1
typer.ml

@@ -1324,7 +1324,7 @@ let rec type_binop ctx op e1 e2 p =
 		unify ctx e2.etype b p;
 		mk_op b
 	| OpInterval ->
-		let t = Typeload.load_core_type ctx "IntIter" in
+		let t = Typeload.load_core_type ctx "IntIterator" in
 		unify ctx e1.etype tint e1.epos;
 		unify ctx e2.etype tint e2.epos;
 		mk (TNew ((match t with TInst (c,[]) -> c | _ -> assert false),[],[e1;e2])) t p