digitalmars.D.bugs - typeinfo for structs, enums, typedefs, arrays
- Carlos Santander B. (42/42) Jun 30 2004 I'm not sure to put it as a bug, but more as a request.
- Walter (1/1) Jul 02 2004 Yes, I plan to improve on the TypeInfo support.
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
 Jun 30 2004
Yes, I plan to improve on the TypeInfo support.
 Jul 02 2004








 
  
  
  "Walter" <newshound digitalmars.com>
 "Walter" <newshound digitalmars.com>