codeowners update
[mono.git] / mcs / tests / dtest-error-01.cs
index d4999c0fc6e40ba7a78e723ad1c29caae5455b0e..2cba37f3e8f32417a72aef55721f2934eac6f0ff 100644 (file)
@@ -17,12 +17,29 @@ class Helper
 class Tester
 {
 #pragma warning disable 169
+       void NonInvocable ()
+       {
+               AssertError (
+                       () => {
+                               dynamic d = 1;
+                               d ();
+                       }, "Cannot invoke a non-delegate type");
+       }
+       
+       void Using_1 ()
+       {
+               AssertError (
+                       () => {
+                               using (dynamic d = 1) { }
+                       }, "Cannot implicitly convert type 'int' to 'System.IDisposable'");
+       }
+       
        void Unsafe_1 ()
        {
                dynamic d = 1;
                AssertError (
                        () => Helper.Foo (d),
-                       "Pointers and fixed size buffers cannot be used in a dynamic context");
+                       "Dynamic calls cannot be used in conjunction with pointers");
        }
        
        void NullableConversion ()
@@ -33,7 +50,7 @@ class Tester
                                dynamic b = false;
                                byte? b2 = null;
                                b &= b2;
-                       }, "Operator `&=' cannot be applied to operands of type `bool' and `byte?'");
+                       }, "Operator '&=' cannot be applied to operands of type 'bool' and 'byte?'");
        }
        
 #pragma warning restore 169