Skip to content

Commit 21f2eec

Browse files
committed
deal with overloads
1 parent 397b3a0 commit 21f2eec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/typing/fieldAccess.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ let get_constructor_access c tl p =
168168
| None ->
169169
raise Not_found
170170
| Some cf ->
171-
cf,FHAbstract(a,tl,c)
171+
cf,FHAbstract(a,tl,c)
172172
end
173173
| _ ->
174174
Type.get_constructor c, FHInstance(c,tl)

src/typing/typeloadFields.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ let create_variable (ctx,cctx,fctx) c f cf t eo p =
929929
cf
930930

931931
let check_abstract (ctx,cctx,fctx) a c cf fd t ret p =
932-
if fctx.is_abstract_constructor then a.a_constructor <- Some cf;
932+
if fctx.is_abstract_constructor && a.a_constructor = None (* TODO: this is pretty dumb, it deals with the overload case *) then a.a_constructor <- Some cf;
933933
let m = mk_mono() in
934934
let ta = TAbstract(a,List.map (fun _ -> mk_mono()) a.a_params) in
935935
let tthis = if fctx.is_abstract_member || Meta.has Meta.To cf.cf_meta then monomorphs a.a_params a.a_this else a.a_this in

0 commit comments

Comments
 (0)