New tests.
authorMarek Safar <marek.safar@gmail.com>
Fri, 18 Jun 2010 14:19:33 +0000 (14:19 -0000)
committerMarek Safar <marek.safar@gmail.com>
Fri, 18 Jun 2010 14:19:33 +0000 (14:19 -0000)
svn path=/trunk/mcs/; revision=159138

mcs/tests/dtest-004.cs
mcs/tests/gtest-exmethod-35-lib.cs [new file with mode: 0644]
mcs/tests/gtest-exmethod-35.cs [new file with mode: 0644]

index 53f67e4f63ac56f505475009b3b60cf954c1e180..1b911447d47bffabc0fd2e9b51988287347c4c8e 100644 (file)
@@ -1,4 +1,9 @@
-// internal dynamic<->object conversion tests
+// internal dynamic conversion tests
+
+class G<T>
+{
+}
+
 
 class C
 {
@@ -7,9 +12,22 @@ class C
                return 1;
        }
        
-       public static void Main ()
+       static void M<T> ()
+       {
+               dynamic d = default (T);
+               var v = default (dynamic);
+       }
+       
+       public static int Main ()
        {
                var d = Create ();
                d.ToString ();
+               
+               M<int> ();
+               M<C> ();
+               
+               G<object> v1 = new G<dynamic>();
+               G<dynamic> v2 = new G<object>();
+               return 0;
        }
 }
diff --git a/mcs/tests/gtest-exmethod-35-lib.cs b/mcs/tests/gtest-exmethod-35-lib.cs
new file mode 100644 (file)
index 0000000..686002c
--- /dev/null
@@ -0,0 +1,10 @@
+// Compiler options: -t:library
+
+using System;
+
+namespace System.Runtime.CompilerServices
+{
+       [AttributeUsage (AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
+       public sealed class ExtensionAttribute : Attribute {
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-exmethod-35.cs b/mcs/tests/gtest-exmethod-35.cs
new file mode 100644 (file)
index 0000000..2905e5e
--- /dev/null
@@ -0,0 +1,14 @@
+// Compiler options: -r:System.Core.dll -r:gtest-exmethod-35-lib.dll
+
+using System;
+
+static class A
+{
+       public static void Test (this int v)
+       {
+       }
+       
+       public static void Main ()
+       {
+       }
+}
\ No newline at end of file