소스 검색

do not use "using" fallback when private field is encountered

Simon Krajewski 13 년 전
부모
커밋
16d328fbe3
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      tests/unit/TestType.hx
  2. 1 1
      typer.ml

+ 1 - 1
tests/unit/TestType.hx

@@ -465,7 +465,7 @@ class TestType extends Test {
 	
 	function testUsing()
 	{
-		eq(UsingChild1.test(), "FOOFOOfoo");
+		eq(UsingChild1.test(), "FOOFOOFOO");
 		eq(UsingChild2.test(), "FOO");
 		eq(UsingUnrelated.test(), "FOOFOO");
 	}

+ 1 - 1
typer.ml

@@ -587,7 +587,7 @@ let using_field ctx mode e i p =
 				let f = PMap.find i c.cl_statics in
 				let t = field_type ctx c [] f p in
 				(match follow t with
-				| TFun ((_,_,t0) :: args,r) (* when can_access ctx.curclass c f true *) ->
+				| TFun ((_,_,t0) :: args,r) ->
 					let t0 = (try match t0 with
 					| TType({t_path=["haxe";"macro"], ("ExprOf"|"ExprRequire")}, [t]) ->
 						(try unify_raise ctx e.etype t p with Error (Unify _,_) -> raise Not_found); t;