-// cs1605.cs: Cannot pass 'i' as a ref or out argument because it is read-only
-// Line: 9
+// CS1605: Cannot pass `this' as a ref or out argument because it is read-only
+// Line: 13
-class E
+class X
{
- public E (int[] args)
- {
- foreach (int i in args)
- Init (ref i);
- }
-
- void Init (ref int val) {}
-
+ void Test (out X x)
+ {
+ x = null;
+ }
+
+ void Run ()
+ {
+ Test (out this);
+ }
}