Skip to content

Commit

Permalink
[jvm] deal with abstract no expression corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Jul 11, 2023
1 parent 4841072 commit d457083
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/generators/genjvm.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,13 @@ class tclass_to_jvm gctx c = object(self)
let field mtype cf = match cf.cf_kind with
| Method (MethNormal | MethInline) ->
List.iter (fun cf ->
if not (has_class_field_flag cf CfExtern) then self#generate_method gctx jc c mtype cf
let is_weird_abstract_field_without_expression = match cf.cf_expr,c.cl_kind with
| None,KAbstractImpl _ ->
true
| _ ->
false
in
if not (has_class_field_flag cf CfExtern) && not (is_weird_abstract_field_without_expression) then self#generate_method gctx jc c mtype cf
) (cf :: List.filter (fun cf -> has_class_field_flag cf CfOverload) cf.cf_overloads)
| _ ->
if not (has_class_flag c CInterface) && is_physical_field cf then self#generate_field gctx jc c mtype cf
Expand Down

0 comments on commit d457083

Please sign in to comment.