[Gd-hackers] [Gd-chatter] r11101 - trunk/src/d2c/runtime/dylan/tests
Peter S. Housel
housel at acm.org
Sun Dec 31 04:27:16 CET 2006
On Tue, 2006-12-26 at 08:39 +0100, agent at gwydiondylan.org wrote:
> Author: agent
> Date: Tue Dec 26 08:39:29 2006
> New Revision: 11101
>
> Modified:
> trunk/src/d2c/runtime/dylan/tests/collections.dylan
> Log:
> Job: gd
> Corrected invalid test. Test did ensure that element(..., default: x) errors
> if x is of the wrong element type. According to DRM, the restriction on
> return value of element() doesn't apply if default: is supplied, so it should
> not error.
Where do you get that? As I read it, the DRM doesn't explicitly say
whether or not default: values that aren't instances of the collection's
element type are permitted. For performance reasons, it seems perfectly
reasonable that a particular element() method would declare a particular
return type, and that the default: value would be subject to the
declared type restriction.
--
Peter S. Housel <housel at acm.org>
More information about the hackers
mailing list