Skip to content

Commit

Permalink
Fix tracks runtime type check. (#4193)
Browse files Browse the repository at this point in the history
  • Loading branch information
toots authored Oct 26, 2024
1 parent 808885c commit 63aea1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/hooks_implementations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let eval_check ~env:_ ~tm v =
s#content_type_computation_allowed))
else if Source_tracks.is_value v then (
let s = Source_tracks.source v in
Typing.(s#frame_type <: tm.Term.t))
Typing.(s#frame_type <: Type.fresh tm.Term.t))
else if Track.is_value v then (
let field, source = Lang_source.to_track v in
if not source#has_content_type then (
Expand Down
6 changes: 4 additions & 2 deletions src/core/source.ml
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ class virtual operator ?(stack = []) ?clock ?(name = "src") sources =
try
self#content_type_computation_allowed;
if log == source_log then self#create_log;
source_log#info "Source %s gets up with content type: %s." id
(Frame.string_of_content_type self#content_type);
source_log#info
"Source %s gets up with content type: %s and frame type: %s." id
(Frame.string_of_content_type self#content_type)
(Type.to_string self#frame_type);
self#log#debug "Clock is %s." (Clock.id self#clock);
self#log#important "Content type is %s."
(Frame.string_of_content_type self#content_type);
Expand Down
2 changes: 1 addition & 1 deletion src/core/types/format_type.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module FormatSpecs = struct
let subtype _ f f' = Content_base.merge f f'

let sup _ f f' =
Content_base.merge f f';
Content_base.(merge (duplicate f) (duplicate f'));
f

let to_string _ = assert false
Expand Down

0 comments on commit 63aea1b

Please sign in to comment.