fork download
  1. import std.stdio;
  2. class C{}
  3. struct S{
  4. C c;
  5. }
  6. void main(){
  7. S s;
  8. s.c = new C;
  9. writeln(typeid(s.c));
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(9): Error: need 'this' to access member c
stdout
Standard output is empty