Skip to content

Commit

Permalink
place override functions in the results at least once (#11773)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 authored Sep 17, 2024
1 parent 32d9b9b commit b99eda0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/generators/gencpp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4407,7 +4407,10 @@ let current_virtual_functions_rev clazz base_functions =
| _, Method MethDynamic -> result
| TFun (args,return_type), Method _ ->
if (is_override elem ) then
List.map (fun (e,a,r) -> if e.cf_name<>elem.cf_name then (e,a,r) else (elem,args,return_type) ) result
if List.exists (fun (e,a,r) -> e.cf_name=elem.cf_name ) result then
result
else
(elem,args,return_type) :: result
else
(elem,args,return_type) :: result
| _,_ -> result
Expand Down

0 comments on commit b99eda0

Please sign in to comment.