vala r1342 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1342 - in trunk: . vala
- Date: Thu, 8 May 2008 20:09:26 +0100 (BST)
Author: juergbi
Date: Thu May 8 19:09:25 2008
New Revision: 1342
URL: http://svn.gnome.org/viewvc/vala?rev=1342&view=rev
Log:
2008-05-08 Juerg Billeter <j bitron ch>
* vala/valasemanticanalyzer.vala:
Report error when trying to create instance of static class,
patch by Andreas Brauchli, fixes bug 516779
Modified:
trunk/ChangeLog
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Thu May 8 19:09:25 2008
@@ -2334,6 +2334,13 @@
return;
}
+ if (cl.is_static) {
+ expr.static_type = null;
+ expr.error = true;
+ Report.error (expr.source_reference, "Can't create instance of static class `%s'".printf (cl.get_full_name ()));
+ return;
+ }
+
if (expr.symbol_reference == null) {
expr.symbol_reference = cl.default_construction_method;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]