Tricky case
Mildred Ki'Lya
ml.mildred593 at gmail.com
Wed Nov 11 15:07:32 UTC 2009
Hi,
I wanted your opinion in what should happen in that case:
Section Header
+ name := OBJECT;
Section Public
- Self:SELF '==' other:SELF :BOOLEAN <- deferred;
Section Header
+ name := APPLE;
Section Inherit
- parent_object :OBJECT := OBJECT;
Section Public
- Self:SELF '==' other:SELF :BOOLEAN <- color == other.color;
+ color :COLOR;
Section Header
+ name := ORANGE;
Section Inherit
- parent_object :OBJECT := OBJECT;
Section Public
- Self:SELF '==' other:SELF :BOOLEAN <- size == other.size;
+ size :INTEGER;
Section Header
+ name := MAIN
Section Public
- main <-
( + o1, o2 :OBJECT;
(o1, o2) := (APPLE, ORANGE);
(o1 == o2).println;
);
What should be the result of this ?
1. Compile time error
2. Runtime error "slot deferred" (OBJECT.'==')
3. FALSE
4. TRUE
5. random result
I would vote for (2) but is that behaviour specified anywhere ?
Mildred
--
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Website: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20091111/a8c6cf90/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20091111/a8c6cf90/attachment.pgp>
More information about the Lisaac-devel
mailing list