vala r1426 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1426 - in trunk: . vala
- Date: Sun, 25 May 2008 13:34:13 +0000 (UTC)
Author: juergbi
Date: Sun May 25 13:34:13 2008
New Revision: 1426
URL: http://svn.gnome.org/viewvc/vala?rev=1426&view=rev
Log:
2008-05-25 Juerg Billeter <j bitron ch>
* vala/valasemanticanalyzer.vala:
Report error when declaring virtual methods in compact classes,
based on patch by Jared Moore, fixes bug 514844
Modified:
trunk/ChangeLog
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Sun May 25 13:34:13 2008
@@ -375,6 +375,14 @@
Report.error (m.source_reference, "Virtual methods may not be declared outside of classes and interfaces");
return;
}
+
+ if (m.parent_symbol is Class) {
+ var cl = (Class) m.parent_symbol;
+ if (cl.is_compact) {
+ Report.error (m.source_reference, "Virtual methods may not be declared in compact classes");
+ return;
+ }
+ }
} else if (m.overrides) {
if (!(m.parent_symbol is Class)) {
m.error = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]