[SCM] Lisaac compiler branch, stable, updated. lisaac-0.12-490-gf19dcfc

Mildred Ki'Lya silkensedai at online.fr
Wed Sep 30 17:02:13 UTC 2009


The following commit has been merged in the stable branch:
commit f19dcfc6572a34e653b0a599b4cba947d4987484
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Wed Sep 30 19:01:27 2009 +0200

    transformed a crash into a semantic error

diff --git a/src/item/itm_type_mono.li b/src/item/itm_type_mono.li
index 8a70962..9ccf955 100644
--- a/src/item/itm_type_mono.li
+++ b/src/item/itm_type_mono.li
@@ -48,7 +48,10 @@ Section Public
   (        
     deferred;
     NULL
-  );
+  )
+  [
+    +? { Result != NULL };
+  ];
   
   - to_run_in lst:FAST_ARRAY(TYPE_FULL) for p:PARAMETER_TO_TYPE <-
   (
diff --git a/src/item/itm_type_parameter.li b/src/item/itm_type_parameter.li
index 5e4c0c5..4784993 100644
--- a/src/item/itm_type_parameter.li
+++ b/src/item/itm_type_parameter.li
@@ -36,7 +36,12 @@ Section Public
   - to_run_for p:PARAMETER_TO_TYPE :TYPE_FULL <-
   ( + result:TYPE_FULL;
         
-    result := p.parameter_to_type Self;    
+    result := p.parameter_to_type Self;
+    (result = NULL).if {
+      string_tmp.copy "Cannot resolve type for type parameter ";
+      append_in string_tmp;
+      semantic_error(p.position, string_tmp);
+    };
     result
   );
   

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list