Skip to content

Commit

Permalink
fixed pos_path is sometimes null_pos whereas pos_full is not (close #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Dec 16, 2023
1 parent 3e721f0 commit 15731ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typing/typeload.ml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ and load_instance' ctx ptp get_params =
if t.tparams <> [] then raise_typing_error ("Class type parameter " ^ t.tname ^ " can't have parameters") ptp.pos_full;
pt
with Not_found ->
let mt = load_type_def ctx ptp.pos_path t in
let mt = load_type_def ctx (if ptp.pos_path == null_pos then ptp.pos_full else ptp.pos_path) t in
let info = ctx.g.get_build_info ctx mt ptp.pos_full in
if info.build_path = ([],"Dynamic") then match t.tparams with
| [] -> t_dynamic
Expand Down

0 comments on commit 15731ea

Please sign in to comment.