So you mean this code should give an error? import std.stdio; class A { } A ga; void foo(scope A a) { ga = a; } void main() { A a = new A(); foo(a); }