Kaynağa Gözat

do not try to inline empty arrays

Simon Krajewski 11 yıl önce
ebeveyn
işleme
92195adc4f
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      optimizer.ml

+ 2 - 2
optimizer.ml

@@ -1010,10 +1010,10 @@ let inline_constructors ctx e =
 	let rec get_inline_ctor_info e = match e.eexpr with
 		| TNew ({ cl_constructor = Some ({ cf_kind = Method MethInline; cf_expr = Some { eexpr = TFunction f } } as cst) } as c,_,pl) ->
 			IKCtor (f,cst,c,pl,[])
+		| TObjectDecl [] | TArrayDecl [] ->
+			IKNone
 		| TArrayDecl el ->
 			IKArray el
-		| TObjectDecl [] ->
-			IKNone
 		| TObjectDecl fl ->
 			IKStructure fl
 		| TCast(e,None) | TParenthesis e ->