Browse Source

allow access to all public fields of the underlying type inside an abstract

Simon Krajewski 12 years ago
parent
commit
17ee33c8fb
1 changed files with 4 additions and 0 deletions
  1. 4 0
      typer.ml

+ 4 - 0
typer.ml

@@ -1038,6 +1038,10 @@ and type_field ctx e i p mode =
 			AKUsing ((mk (TField (et,FStatic (c,f))) t p),c,f,e)
 		with Not_found -> try
 			using_field ctx mode e i p
+		with Not_found -> try
+			(match ctx.curclass.cl_kind with
+			| KAbstractImpl a2 when a == a2 -> type_field ctx {e with etype = apply_params a.a_types pl a.a_this} i p mode;
+			| _ -> raise Not_found)
 		with Not_found ->
 			no_field())
 	| _ ->