vala r1879 - in trunk: . gobject vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1879 - in trunk: . gobject vala
- Date: Thu, 23 Oct 2008 17:44:46 +0000 (UTC)
Author: juergbi
Date: Thu Oct 23 17:44:46 2008
New Revision: 1879
URL: http://svn.gnome.org/viewvc/vala?rev=1879&view=rev
Log:
2008-10-23 JÃrg Billeter <j bitron ch>
* vala/valaparser.vala:
* vala/valasemanticanalyzer.vala:
* gobject/valaccodemethodbinding.vala:
Mark creation methods as instance methods to fix lambda
expressions in creation methods
Modified:
trunk/ChangeLog
trunk/gobject/valaccodemethodbinding.vala
trunk/vala/valaparser.vala
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/gobject/valaccodemethodbinding.vala
==============================================================================
--- trunk/gobject/valaccodemethodbinding.vala (original)
+++ trunk/gobject/valaccodemethodbinding.vala Thu Oct 23 17:44:46 2008
@@ -268,7 +268,8 @@
cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", cself));
cinit.append (cdecl);
- } else if (m.binding == MemberBinding.INSTANCE) {
+ } else if (m.binding == MemberBinding.INSTANCE
+ && !(m is CreationMethod)) {
var ccheckstmt = create_method_type_check_statement (m, creturn_type, cl, true, "self");
ccheckstmt.line = codegen.function.line;
cinit.append (ccheckstmt);
Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala (original)
+++ trunk/vala/valaparser.vala Thu Oct 23 17:44:46 2008
@@ -1964,7 +1964,6 @@
&& !cl.is_static && !cl.is_abstract
&& cl.default_construction_method == null) {
var m = new CreationMethod (cl.name, null, cl.source_reference);
- m.binding = MemberBinding.STATIC;
m.access = SymbolAccessibility.PUBLIC;
m.body = new Block (cl.source_reference);
cl.add_method (m);
@@ -2723,7 +2722,6 @@
}
method.access = access;
set_attributes (method, attrs);
- method.binding = MemberBinding.STATIC;
if (!accept (TokenType.SEMICOLON)) {
method.body = parse_block ();
} else if (scanner.source_file.external_package) {
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Thu Oct 23 17:44:46 2008
@@ -1760,7 +1760,9 @@
} else if (member is Method) {
var m = (Method) member;
access = m.access;
- instance = (m.binding == MemberBinding.INSTANCE);
+ if (!(m is CreationMethod)) {
+ instance = (m.binding == MemberBinding.INSTANCE);
+ }
klass = (m.binding == MemberBinding.CLASS);
} else if (member is Property) {
var prop = (Property) member;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]