Merge pull request #3583 from xmcclure/test-418-checked
[mono.git] / mcs / errors / cs1605.cs
index 8bcd528b878a176dd9943bf1bac5e223b7c8762c..4e172cae63ce4a2f3f6fbe32c98890f070c11d7a 100644 (file)
@@ -1,14 +1,15 @@
-// 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);
+       }
 }