Quellcode durchsuchen

don't ignore optional fields (respect haxe subtyping wrt overrides)

Nicolas Cannasse vor 9 Jahren
Ursprung
Commit
b9d8372757
1 geänderte Dateien mit 0 neuen und 5 gelöschten Zeilen
  1. 0 5
      src/generators/genhl.ml

+ 0 - 5
src/generators/genhl.ml

@@ -742,11 +742,6 @@ let rec to_type ?tref ctx t =
 			ctx.anons_cache <- (a,t) :: ctx.anons_cache;
 			let fields = PMap.fold (fun cf acc ->
 				match cf.cf_kind with
-				| Var _ when has_meta Meta.Optional cf.cf_meta ->
-					(*
-						if it's optional it might not be present, handle the field access as fully Dynamic
-					*)
-					acc
 				| Var _ when (match follow cf.cf_type with TAnon _ | TFun _ -> true | _ -> false) ->
 					(*
 						if it's another virtual or a method, it might not match our own (might be larger, or class)