2
0
Эх сурвалжийг харах

disallow static extension to private fields again

Simon Krajewski 11 жил өмнө
parent
commit
27f37f1b86
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -1174,7 +1174,7 @@ let rec using_field ctx mode e i p =
 	| c :: l ->
 		try
 			let cf = PMap.find i c.cl_statics in
-			if Meta.has Meta.NoUsing cf.cf_meta then raise Not_found;
+			if Meta.has Meta.NoUsing cf.cf_meta || not (can_access ctx c cf true) then raise Not_found;
 			let monos = List.map (fun _ -> mk_mono()) cf.cf_params in
 			let map = apply_params cf.cf_params monos in
 			let t = map cf.cf_type in