July 01, 2004 typeinfo for structs, enums, typedefs, arrays | ||||
---|---|---|---|---|
| ||||
I'm not sure to put it as a bug, but more as a request. The following code: ///////////// void foo ( ... ) { foreach ( TypeInfo ti ; _arguments ) ti.print(); } void main () { A a; B b; my_int m; aliased_int i; E e; char [] [ char [] ] aa; Object [] oa; int [] ia; char [] s; foo(a,b,m,i,e,aa,oa,ia,s); } class A {} struct B {} typedef int my_int; alias int aliased_int; enum E { x } ///////////// Produces this output: A TypeInfo TypeInfoTypedef int TypeInfo TypeInfo TypeInfo TypeInfo_Ai char[] Could it be possible to get proper TypeInfo for arrays, structs, typedefs and enums. Probably for aliases it's ok the way it's now, but I'm not totally sure. Also notice how "char[]" is printed but "int[]" is not. ----------------------- Carlos Santander Bernal |
July 02, 2004 Re: typeinfo for structs, enums, typedefs, arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | Yes, I plan to improve on the TypeInfo support. |
Copyright © 1999-2021 by the D Language Foundation