vala r1463 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1463 - in trunk: . vala
- Date: Wed, 28 May 2008 16:25:29 +0000 (UTC)
Author: juergbi
Date: Wed May 28 16:25:28 2008
New Revision: 1463
URL: http://svn.gnome.org/viewvc/vala?rev=1463&view=rev
Log:
2008-05-28 Juerg Billeter <j bitron ch>
* vala/valasemanticanalyzer.vala:
Report error when declaring a compact class implementing an
interface, patch by Phil Housley
Modified:
trunk/ChangeLog
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Wed May 28 16:25:28 2008
@@ -135,6 +135,16 @@
cl.accept_children (this);
+ /* compact classes cannot implement interfaces */
+ if (cl.is_compact) {
+ foreach (DataType base_type in cl.get_base_types ()) {
+ if (base_type.data_type is Interface) {
+ cl.error = true;
+ Report.error (cl.source_reference, "compact classes `%s` may not implement interfaces".printf (cl.get_full_name ()));
+ }
+ }
+ }
+
/* gather all prerequisites */
Gee.List<TypeSymbol> prerequisites = new ArrayList<TypeSymbol> ();
foreach (DataType base_type in cl.get_base_types ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]