소스 검색

mark Bytes.ofString as `@:pure`

Simon Krajewski 9 년 전
부모
커밋
503ac64ce4
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      analyzer.ml
  2. 1 0
      std/haxe/io/Bytes.hx

+ 1 - 1
analyzer.ml

@@ -2702,8 +2702,8 @@ module Purity = struct
 			taint node
 		| Some e ->
 			try
-				if is_pure c cf then raise Exit;
 				if (Meta.has (Meta.Custom ":impure")) cf.cf_meta then taint_raise node;
+				if is_pure c cf then raise Exit;
 				loop e;
 				node.pn_purity <- Pure;
 			with Exit ->

+ 1 - 0
std/haxe/io/Bytes.hx

@@ -479,6 +479,7 @@ class Bytes {
 		#end
 	}
 
+	@:pure
 	public static function ofString( s : String ) : Bytes {
 		#if neko
 		return new Bytes(s.length,untyped __dollar__ssub(s.__s,0,s.length));