vala r2218 - in trunk: . tests tests/objects vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2218 - in trunk: . tests tests/objects vala
- Date: Fri, 19 Dec 2008 12:44:28 +0000 (UTC)
Author: juergbi
Date: Fri Dec 19 12:44:28 2008
New Revision: 2218
URL: http://svn.gnome.org/viewvc/vala?rev=2218&view=rev
Log:
2008-12-19 JÃrg Billeter <j bitron ch>
* vala/valaformalparameter.vala:
* vala/valagenieparser.vala:
* vala/valaparser.vala:
Remove support for deprecated syntax for construct parameters
* tests/arrays.test:
* tests/objects/test-029.test:
Update syntax used in test cases
Modified:
trunk/ChangeLog
trunk/tests/arrays.test
trunk/tests/objects/test-029.test
trunk/vala/valaformalparameter.vala
trunk/vala/valagenieparser.vala
trunk/vala/valaparser.vala
Modified: trunk/tests/arrays.test
==============================================================================
--- trunk/tests/arrays.test (original)
+++ trunk/tests/arrays.test Fri Dec 19 12:44:28 2008
@@ -4,7 +4,8 @@
using GLib;
class Maman.Foo : Object {
- public Foo (construct string bar) {
+ public Foo (string bar) {
+ this.bar = bar;
}
public string bar { get; set; }
Modified: trunk/tests/objects/test-029.test
==============================================================================
--- trunk/tests/objects/test-029.test (original)
+++ trunk/tests/objects/test-029.test Fri Dec 19 12:44:28 2008
@@ -7,8 +7,9 @@
public int p1 { get; set; }
public int p2 { get; set; }
- public Foo (int i, construct int p2) {
+ public Foo (int i, int p2) {
p1 = 2 * i;
+ this.p2 = p2;
}
public static int main (string[] args) {
Modified: trunk/vala/valaformalparameter.vala
==============================================================================
--- trunk/vala/valaformalparameter.vala (original)
+++ trunk/vala/valaformalparameter.vala Fri Dec 19 12:44:28 2008
@@ -64,12 +64,6 @@
* if the parameter type is an array.
*/
public bool no_array_length { get; set; }
-
- /**
- * Specifies whether this parameter holds a value to be assigned to a
- * construct property. This is only allowed in CreationMethod headers.
- */
- public bool construct_parameter { get; set; }
/**
* Specifies the position of the parameter in the C function.
@@ -234,20 +228,6 @@
}
}
- /* special treatment for construct formal parameters used in creation methods */
- if (construct_parameter) {
- if (!(parent_symbol is CreationMethod)) {
- error = true;
- Report.error (source_reference, "construct parameters are only allowed in type creation methods");
- }
-
- var method_body = ((CreationMethod) parent_symbol).body;
- var left = new MemberAccess (new MemberAccess.simple ("this"), name);
- var right = new MemberAccess.simple (name);
-
- method_body.add_statement (new ExpressionStatement (new Assignment (left, right), source_reference));
- }
-
analyzer.current_source_file = old_source_file;
analyzer.current_symbol = old_symbol;
Modified: trunk/vala/valagenieparser.vala
==============================================================================
--- trunk/vala/valagenieparser.vala (original)
+++ trunk/vala/valagenieparser.vala Fri Dec 19 12:44:28 2008
@@ -3234,7 +3234,6 @@
var param = new FormalParameter (id, type, get_src (begin));
set_attributes (param, attrs);
param.direction = direction;
- param.construct_parameter = false;
if (accept (TokenType.ASSIGN)) {
param.default_expression = parse_expression ();
}
Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala (original)
+++ trunk/vala/valaparser.vala Fri Dec 19 12:44:28 2008
@@ -2679,11 +2679,6 @@
return new FormalParameter.with_ellipsis (get_src (begin));
}
bool params_array = accept (TokenType.PARAMS);
- bool construct_param = false;
- if (accept (TokenType.CONSTRUCT)) {
- Report.warning (get_last_src (), "deprecated syntax, use assignments in the method body");
- construct_param = true;
- }
var direction = ParameterDirection.IN;
if (accept (TokenType.OUT)) {
direction = ParameterDirection.OUT;
@@ -2704,7 +2699,6 @@
set_attributes (param, attrs);
param.direction = direction;
param.params_array = params_array;
- param.construct_parameter = construct_param;
if (accept (TokenType.ASSIGN)) {
param.default_expression = parse_expression ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]