annotate tests/mini/bug6.d @ 1651:cb960b882ca3 tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
parents 1bb99290e03a
children
rev   line source
lindquist@32 1 module bug6;
lindquist@32 2 class wrong { }
lindquist@32 3 void bark(ref wrong s) { s = new wrong; }
lindquist@32 4 void foo(wrong tree) {
lindquist@32 5 auto old = tree;
lindquist@32 6 bark(tree);
lindquist@32 7 assert(old !is tree);
lindquist@32 8 }
lindquist@32 9 void main()
lindquist@32 10 {
lindquist@32 11 auto w = new wrong;
lindquist@32 12 auto old = w;
lindquist@32 13 foo(w);
lindquist@32 14 assert(w is old);
lindquist@32 15 }