Robert,

I tried using variant.d using your exact test program below and I got
compiler errors:

$ dmd  variant.d dtest.d
variant.d(273): Error: no property 'length' for type 'Result'
variant.d(273): Error: no property 'length' for type 'Result'
variant.d(274): Error: no property 'length' for type 'Result'
variant.d(274): Error: no property 'length' for type 'Result'
variant.d(274): Error: no property 'length' for type 'Result'
variant.d(275): Error: no property 'length' for type 'Result'
variant.d(277): Error: no property 'length' for type 'Result'
variant.d(277): Error: no property 'length' for type 'Result'
variant.d(277): Error: no property 'length' for type 'Result'
variant.d(277): Error: no property 'length' for type 'Result'
variant.d(280): Error: no property 'length' for type 'Result'
$ dmd -v
DMD64 D Compiler v2.055

Am I missing a switch or something?

John

On Tue, Oct 18, 2011 at 8:13 PM, Robert Jacques <[email protected]> wrote:

> You could try out my improved variant implementation:
>
> https://jshare.johnshopkins.**edu/rjacque2/public_html/**variant.mht<https://jshare.johnshopkins.edu/rjacque2/public_html/variant.mht>
>
> https://jshare.johnshopkins.**edu/rjacque2/public_html/**variant.d<https://jshare.johnshopkins.edu/rjacque2/public_html/variant.d>
>
> Example:
>
> import variant;
>
> class Foo { int x; }
> void main(string[] args) {
>    Variant.__register!Foo;
>    Variant var = Object.factory( typeid(Foo).toString );
>    var.__reflect("x",Variant(10))**; // or explicitly
>    assert(var.__reflect("x") == 10);
>    return;
> }
>



-- 
John
blog: http://arrizza.blogspot.com/
web: http://www.arrizza.com/

Reply via email to