Kröhnert, Manfred <manfred.kroehn...@kit.edu> wrote on 02/03/2011 11:53:49
AM:
>
> I stumbled over a problem a while ago which confused me a little bit.
>
> Here is the code:
>
> public class Test {
> public static def main(args: Array[String])
> {
> Console.OUT.println("Place.places.size = " + Place.places
().size);
> Console.OUT.println("Place.places.size() = " + Place.places
().size());
> Console.OUT.println("Place.places.size = " + Place.places
().size);
> }
> }
>
> And here is the output:
>
> Place.places.size = 3740688
> Place.places.size() = 1
> Place.places.size = 3740688
>
> What irritated me was the fact that the two calls produced different
output.
> The method size() is not documented but size is documented as a
> property of Interface Sequence<T>.
> So I assumed that both would return the same value.
>
> Is this intentional or is it a bug?
>
This looks like a bug where instead of generating a call to the property
method size, the generated C++ code is instead incorrectly accessing it as
a field (thus printing out the address of the function instead. Definitely
not intended behavior.
--dave
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users