Skip to content

Commit

Permalink
allow access to fields of underlying types only on "this"
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Apr 30, 2013
1 parent 18cbf74 commit 57784e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1202,8 +1202,8 @@ and type_field ctx e i p mode =
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;
(match ctx.curfun, e.eexpr with
| FunMemberAbstract, TConst (TThis) -> 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())
Expand Down

0 comments on commit 57784e9

Please sign in to comment.