[SCM] Lisaac compiler branch, lisaac-0.13.x, updated. lisaac-0.13.1-3-g177a84d
Mildred Ki'Lya
silkensedai at online.fr
Mon Aug 3 18:45:23 UTC 2009
The following commit has been merged in the lisaac-0.13.x branch:
commit 177a84d8dd1039aab9432dd5694c258266df7227
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Mon Aug 3 20:45:18 2009 +0200
added error message that when ignored would cause a crash: try to convert VOID to another type.
diff --git a/src/code_life/expr.li b/src/code_life/expr.li
index bf1f1b9..f275d7a 100644
--- a/src/code_life/expr.li
+++ b/src/code_life/expr.li
@@ -133,12 +133,32 @@ Section Public
? {static_type != NULL};
? {t != NULL};
+
+ (static_type.raw = TYPE_VOID).if {
+ string_tmp.copy "Void expression used as ";
+ t.append_name_in string_tmp;
+ POSITION.put_error semantic text string_tmp;
+ p.put_position;
+ POSITION.send_error;
+ };
(t.affect_with static_type).if {
result := Self;
} else {
? {list_current != NULL};
+ (static_type.prototype = NULL).if {
+ string_tmp.copy "EXPR Internal error: no prototype for static type: ";
+ static_type.append_name_in string_tmp;
+ string_tmp.append " (check with type: ";
+ t.append_name_in string_tmp;
+ string_tmp.append ")";
+ POSITION.put_error warning text string_tmp;
+ p.put_position;
+ POSITION.send_error;
+ };
+ ? { static_type.prototype != NULL };
+
(static_type.is_export_to t).if {
// Auto-export.
local := static_type.get_temporary position;
--
Lisaac compiler
More information about the Lisaac-commits
mailing list