Re: [Vala] modify simpletype with methods in vapi
- From: pancake <pancake youterm com>
- To: vala-list gnome org
- Subject: Re: [Vala] modify simpletype with methods in vapi
- Date: Sun, 30 May 2010 15:10:47 +0200
Yep you are right. It takes no sense to have such a method in a simpletype. I would suggest that vala errors
in this situation. To avoid create invalid and no-op methods.
Should i open a bug for it?
--pancake
----- Original message -----
On Sat, 2010-05-29 at 09:40 +0800, Nor Jaidi Tuah wrote:
42 public bool toggle() {
43 this = !this;
44 return this;
45 }
46 }
'this = anything' should be flagged as an error.
'this' should be a constant reference.
Think from the point of view of, say, 'true'.
'true' is saying to itself:
self = false
If that works, 'true' is no longer itself!
Just to elaborate:
what is the result of this?
true.toggle ();
hand
Nor Jaidi Tuah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]