소스 검색

[python] explicitly hint NativeIterable.iterator to avoid type inference problems (see #2979)

Dan Korostelev 11 년 전
부모
커밋
c0528467da
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/python/NativeIterable.hx

+ 1 - 1
std/python/NativeIterable.hx

@@ -9,7 +9,7 @@ abstract NativeIterable <T>(NativeIterableRaw<T>) to NativeIterableRaw<T> from N
 
 	//@:from public static inline function fromArray <T>(p:Array<T>):PyIterable<T> return cast p;
 
-	public inline function iterator <T>() return toHaxeIterable().iterator();
+	public inline function iterator <T>():HaxeIterator<T> return toHaxeIterable().iterator();
 
 	public function getNativeIterable <T>():NativeIterableRaw<T> return this;
 	public function getNativeIterator <T>():NativeIteratorRaw<T> return this.__iter__();