vala r2090 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2090 - in trunk: . vala
- Date: Sat, 29 Nov 2008 23:55:28 +0000 (UTC)
Author: juergbi
Date: Sat Nov 29 23:55:28 2008
New Revision: 2090
URL: http://svn.gnome.org/viewvc/vala?rev=2090&view=rev
Log:
2008-11-30 JÃrg Billeter <j bitron ch>
* vala/valathrowstatement.vala:
Check type of error expression in throw statements
Modified:
trunk/ChangeLog
trunk/vala/valathrowstatement.vala
Modified: trunk/vala/valathrowstatement.vala
==============================================================================
--- trunk/vala/valathrowstatement.vala (original)
+++ trunk/vala/valathrowstatement.vala Sat Nov 29 23:55:28 2008
@@ -85,6 +85,12 @@
if (error_expression != null) {
error_expression.check (analyzer);
+
+ if (!(error_expression.value_type is ErrorType)) {
+ Report.error (error_expression.source_reference, "`%s' is not an error type".printf (error_expression.value_type.to_string ()));
+ error = true;
+ return false;
+ }
}
var error_type = error_expression.value_type.copy ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]