1. Vincenzo Ampolo
  2. gdc

Source

gdc / gdc.test / fail_compilation / fail304.d

1
2
3
4
5
6
7
struct Small { uint x; }
struct Large { uint x, y, z; }
Small foo() { return Small(); }
void main() { 
  Large l; Small s; 
  l = cast(Large)foo();
}