Commit 2ef7213e authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

don't allow interface implementations to specify override remove override

2007-03-04  Jürg Billeter  <j@bitron.ch>

	* vala/valasemanticanalyzer.vala: don't allow interface implementations
	  to specify override
	* vala/valaconstant.vala, vala/valafield.vala,
	  vala/valaformalparameter.vala, vala/valamethod.vala,
	  vala/valaproperty.vala, vala/valasignal.vala,
	  vala/valavariabledeclarator.vala: remove override from interface
	  implementations

svn path=/trunk/; revision=219
parent 85981bf8
2007-03-04 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: don't allow interface implementations
to specify override
* vala/valaconstant.vala, vala/valafield.vala,
vala/valaformalparameter.vala, vala/valamethod.vala,
vala/valaproperty.vala, vala/valasignal.vala,
vala/valavariabledeclarator.vala: remove override from interface
implementations
2007-03-04 Jürg Billeter <j@bitron.ch>
* vala/parser.y, vala/valainterface.vala,
......
......@@ -104,11 +104,11 @@ public class Vala.Constant : Member, Lockable {
return cname;
}
public override bool get_lock_used () {
public bool get_lock_used () {
return lock_used;
}
public override void set_lock_used (bool used) {
public void set_lock_used (bool used) {
lock_used = used;
}
}
......@@ -141,7 +141,7 @@ public class Vala.Field : Member, Invokable, Lockable {
}
}
public override ref List<weak FormalParameter> get_parameters () {
public ref List<weak FormalParameter> get_parameters () {
if (!is_invokable ()) {
return null;
}
......@@ -150,7 +150,7 @@ public class Vala.Field : Member, Invokable, Lockable {
return cb.get_parameters ();
}
public override TypeReference get_return_type () {
public TypeReference get_return_type () {
if (!is_invokable ()) {
return null;
}
......@@ -159,15 +159,15 @@ public class Vala.Field : Member, Invokable, Lockable {
return cb.return_type;
}
public override bool is_invokable () {
public bool is_invokable () {
return (type_reference.data_type is Callback);
}
public override bool get_lock_used () {
public bool get_lock_used () {
return lock_used;
}
public override void set_lock_used (bool used) {
public void set_lock_used (bool used) {
lock_used = used;
}
}
......@@ -96,7 +96,7 @@ public class Vala.FormalParameter : CodeNode, Invokable {
visitor.visit_formal_parameter (this);
}
public override ref List<weak FormalParameter> get_parameters () {
public ref List<weak FormalParameter> get_parameters () {
if (!is_invokable ()) {
return null;
}
......@@ -105,7 +105,7 @@ public class Vala.FormalParameter : CodeNode, Invokable {
return cb.get_parameters ();
}
public override TypeReference get_return_type () {
public TypeReference get_return_type () {
if (!is_invokable ()) {
return null;
}
......@@ -114,7 +114,7 @@ public class Vala.FormalParameter : CodeNode, Invokable {
return cb.return_type;
}
public override bool is_invokable () {
public bool is_invokable () {
return (type_reference.data_type is Callback);
}
}
......@@ -168,15 +168,15 @@ public class Vala.Method : Member, Invokable {
parameters.append (param);
}
public override ref List<weak FormalParameter> get_parameters () {
public ref List<weak FormalParameter> get_parameters () {
return parameters.copy ();
}
public override TypeReference get_return_type () {
public TypeReference get_return_type () {
return return_type;
}
public override bool is_invokable () {
public bool is_invokable () {
return true;
}
......
......@@ -155,11 +155,11 @@ public class Vala.Property : Member, Lockable {
}
}
public override bool get_lock_used () {
public bool get_lock_used () {
return lock_used;
}
public override void set_lock_used (bool used) {
public void set_lock_used (bool used) {
lock_used = used;
}
}
......@@ -238,10 +238,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
if (m.is_virtual || m.overrides) {
find_base_class_method (m, (Class) current_symbol.node);
if (m.base_method == null) {
// FIXME remove check after interface override transition
if (m.base_interface_method == null) {
Report.error (m.source_reference, "%s: no suitable method found to override".printf (m.symbol.get_full_name ()));
}
Report.error (m.source_reference, "%s: no suitable method found to override".printf (m.symbol.get_full_name ()));
}
}
}
......
......@@ -77,15 +77,15 @@ public class Vala.Signal : Member, Invokable, Lockable {
parameters.append (param);
}
public override ref List<weak FormalParameter> get_parameters () {
public ref List<weak FormalParameter> get_parameters () {
return parameters.copy ();
}
public override TypeReference get_return_type () {
public TypeReference get_return_type () {
return return_type;
}
public override bool is_invokable () {
public bool is_invokable () {
return true;
}
......@@ -179,11 +179,11 @@ public class Vala.Signal : Member, Invokable, Lockable {
}
}
public override bool get_lock_used () {
public bool get_lock_used () {
return lock_used;
}
public override void set_lock_used (bool used) {
public void set_lock_used (bool used) {
lock_used = used;
}
}
......@@ -81,7 +81,7 @@ public class Vala.VariableDeclarator : CodeNode, Invokable {
visitor.visit_variable_declarator (this);
}
public override ref List<weak FormalParameter> get_parameters () {
public ref List<weak FormalParameter> get_parameters () {
if (!is_invokable ()) {
return null;
}
......@@ -90,7 +90,7 @@ public class Vala.VariableDeclarator : CodeNode, Invokable {
return cb.get_parameters ();
}
public override TypeReference get_return_type () {
public TypeReference get_return_type () {
if (!is_invokable ()) {
return null;
}
......@@ -99,7 +99,7 @@ public class Vala.VariableDeclarator : CodeNode, Invokable {
return cb.return_type;
}
public override bool is_invokable () {
public bool is_invokable () {
return (type_reference.data_type is Callback);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment