Author: marek
Date: 2007-06-19 09:18:11 -0400 (Tue, 19 Jun 2007)
New Revision: 80151
Added:
trunk/mcs/tests/gtest-var-06.cs
Log:
New test.
Added: trunk/mcs/tests/gtest-var-06.cs
===================================================================
--- trunk/mcs/tests/gtest-var-06.cs 2007-06-19 13:10:42 UTC (rev 80150)
+++ trunk/mcs/tests/gtest-var-06.cs 2007-06-19 13:18:11 UTC (rev 80151)
@@ -0,0 +1,17 @@
+// Compiler options: -langversion:linq
+// Tests variable type inference with the var keyword when using the
for-statement
+
+using System;
+
+public class Test
+{
+ static int Main ()
+ {
+ for (var i = 0; i < 1; ++i)
+ if (i.GetType() != typeof (int))
+ return 1;
+
+ return 0;
+ }
+}
+
Property changes on: trunk/mcs/tests/gtest-var-06.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches