|
@@ -1053,7 +1053,7 @@ let field_access ctx mode f fmode t e p =
|
|
| _ ->
|
|
| _ ->
|
|
false
|
|
false
|
|
in
|
|
in
|
|
- if m = ctx.curfield.cf_name && (match e.eexpr with TConst TThis -> true | TTypeExpr (TClassDecl c) when c == ctx.curclass -> true | _ -> false) then
|
|
|
|
|
|
+ if m = ctx.curfield.cf_name && (match e.eexpr with TConst TThis -> true | TLocal v -> Option.map_default (fun vthis -> v == vthis) false ctx.vthis | TTypeExpr (TClassDecl c) when c == ctx.curclass -> true | _ -> false) then
|
|
let prefix = (match ctx.com.platform with Flash when Common.defined ctx.com Define.As3 -> "$" | _ -> "") in
|
|
let prefix = (match ctx.com.platform with Flash when Common.defined ctx.com Define.As3 -> "$" | _ -> "") in
|
|
if is_extern_field f then begin
|
|
if is_extern_field f then begin
|
|
display_error ctx "This field cannot be accessed because it is not a real variable" p;
|
|
display_error ctx "This field cannot be accessed because it is not a real variable" p;
|