fork download
  1. import std.stdio;
  2.  
  3. void foo(T)(T x) { x(5, 10); }
  4.  
  5. void main()
  6. {
  7. foo((a, b) { writeln(a+b); });
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(7): Error: identifier 'a' is not defined
prog.d(7): Error: a is used as a type
prog.d(7): Error: cannot have parameter of type void
prog.d(7): Error: identifier 'b' is not defined
prog.d(7): Error: b is used as a type
prog.d(7): Error: cannot have parameter of type void
prog.d(7): Error: cannot have parameter of type void
prog.d(7): Error: cannot have parameter of type void
stdout
Standard output is empty