From b79024fc34459c227cdc564524909127fd330179 Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Wed, 25 Feb 2009 15:38:10 +0100
Subject: [PATCH] Fixing ec the  backend (cont'): I was printing  some useless
 (because expansed) type  definitions that were containing struct  or arrays
 in the expand_structs mode.

---
 src/lazyCompiler.ml | 13 ++++++++-----
 src/licDump.ml      |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml
index bc1c9423..3f2165e8 100644
--- a/src/lazyCompiler.ml
+++ b/src/lazyCompiler.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 25/02/2009 (at 14:50) by Erwan Jahier> *)
+(** Time-stamp: <modified the 25/02/2009 (at 15:34) by Erwan Jahier> *)
 
 
 open Lxm
@@ -457,10 +457,13 @@ and (type_check_do: t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool ->
                 Struct_type_eff (n, eff_fields)
             )
       in
-      let is_struct_or_array = match type_def.it with 
-	  StructType _ -> true 
-	| ArrayType _ -> true 
-	| _  -> false in
+      let is_struct_or_array = match type_eff with 
+        | Array_type_eff(_)
+        | Struct_type_eff(_) -> true
+        | Any | Overload | Bool_type_eff | Int_type_eff | Real_type_eff
+        | External_type_eff(_) | Abstract_type_eff(_) | Enum_type_eff(_) 
+          -> false
+      in        
         if 
           (not provide_flag) 
           && (not (!Global.expand_structs & is_struct_or_array)) 
diff --git a/src/licDump.ml b/src/licDump.ml
index 3fff0ae9..e7d92ae4 100644
--- a/src/licDump.ml
+++ b/src/licDump.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 25/02/2009 (at 15:14) by Erwan Jahier> *)
+(** Time-stamp: <modified the 25/02/2009 (at 15:34) by Erwan Jahier> *)
 
 open Printf
 open Lxm
@@ -287,7 +287,7 @@ and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> st
       match posop.it,vel with
 	| Predef (Predef.DIESE_n,_), [ve1] ->
             if !Global.lv4 
-            then sov ve1 (* lv4 does no accept to apply # on One var only ! *)
+            then sov ve1 (* lv4 does no accept to apply # on One var only! *)
             else ((op2string Predef.DIESE_n) ^ (tuple_par [ve1]))
             
 	| Predef (Predef.IF_n,_), [ve1; ve2; ve3] ->
-- 
GitLab