fork download
  1. void increment(ref int i)
  2. {
  3. ++i;
  4. }
  5.  
  6. class Class
  7. {
  8. immutable int member;
  9.  
  10. this(int parameter)
  11. {
  12. member = parameter;
  13. ++member; // okay
  14. increment(member);
  15. }
  16. }
  17.  
  18. void main() {
  19. auto c = new Class(5);
  20. }
Success #stdin #stdout 0.01s 2036KB
stdin
Standard input is empty
stdout

Standard output is empty