@@ -382,8 +382,9 @@ let rec can_access ctx ?(in_overload=false) c cf stat =
true
else if not in_overload && ctx.com.config.pf_overload && Meta.has Meta.Overload cf.cf_meta then
+ else if c == ctx.curclass then
+ true
else
- (* TODO: should we add a c == ctx.curclass short check here? *)
(* has metadata path *)
let rec make_path c f = match c.cl_kind with
| KAbstractImpl a -> fst a.a_path @ [snd a.a_path; f.cf_name]
@@ -7,13 +7,17 @@ class Issue8789 extends DisplayTestCase {
this = value;
}
+ inline function pvt() {}
+
public function test() {
- new Int8{-1-}(10);
+ var i = new Int8{-1-}(10);
+ i.{-2-}
**/
function test() {
var r = toplevel(pos(1));
eq(true, hasToplevel(r, "type", "Int8"));
+ eq(true, hasField(fields(pos(2)), "pvt", "Void -> Void"));