Introspection/Reflection/etc on Linux
J Arrizza
cppgent0 at gmail.com
Tue Nov 1 11:42:42 PDT 2011
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 <sandford at jhu.edu> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111101/5231ace6/attachment.html>
More information about the Digitalmars-d
mailing list