fork download
  1. import std.stdio;
  2.  
  3. class A {
  4. int foo(int i)
  5. out (result) { }
  6. body { return 1; }
  7. }
  8.  
  9. class B : A {
  10. int foo(int i)
  11. out (result) { }
  12. body { return 1; }
  13.  
  14. }
  15.  
  16. class C : B {
  17. int foo(int i) { return 1; }
  18. }
  19.  
  20. void main() {
  21. writeln("Hello world!");
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(10): Warning: overrides base class function prog.A.foo, but is not marked with 'override'
prog.d(17): Warning: overrides base class function prog.B.foo, but is not marked with 'override'
/spoj/dmd_compile: line 10:  2221 Segmentation fault      dmd -O -w -ofprog prog.d
stdout
Standard output is empty