Преглед на файлове

disallow static extension to private fields again

Simon Krajewski преди 11 години
родител
ревизия
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