New tests.
authorMarek Safar <marek.safar@gmail.com>
Wed, 24 Jun 2009 11:34:25 +0000 (11:34 -0000)
committerMarek Safar <marek.safar@gmail.com>
Wed, 24 Jun 2009 11:34:25 +0000 (11:34 -0000)
svn path=/trunk/mcs/; revision=136766

1  2 
mcs/errors/cs0175-2.cs
mcs/errors/cs0175.cs
mcs/errors/cs1525-13.cs
mcs/errors/cs1525-14.cs
mcs/errors/cs1644-13.cs
mcs/errors/cs1738-2.cs
mcs/errors/cs1738.cs
mcs/errors/gcs0853.cs
mcs/errors/gcs0854.cs

diff --cc mcs/errors/cs0175-2.cs
index 3fabcb37732752d2da06f139702c5b545ca0bede,3fabcb37732752d2da06f139702c5b545ca0bede..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,9 -1,9 +1,0 @@@
--// cs0175-2.cs: Use of keyword `base' is not valid in this context
--// Line: 13
--
--class DerivedClass {
--        public DerivedClass() {
--                base = null;
--        }
--}
--
diff --cc mcs/errors/cs0175.cs
index 45782ee438e3a0132643b66262992fb12135d76c,45782ee438e3a0132643b66262992fb12135d76c..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,12 -1,12 +1,0 @@@
--// cs0175.cs: Use of keyword `base' is not valid in this context
--// Line: 8
--using System.Collections;
--class Collection : CollectionBase
--{
--      public int Add (int x)
--      {
--              return ((IList) base).Add (x);
--      }
--}
--
--
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cd091bc9c14add8528e2a2eb5a13f8eb8eff8ba6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++// CS1525: Unexpected symbol `)', expecting `.', or `['
++// Line: 10
++
++using System.Collections;
++
++class Collection : CollectionBase
++{
++      public int Add (int x)
++      {
++              return ((IList) base).Add (x);
++      }
++}
++
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..03f54690d4137820516b77f1640e8ebc4cfe286e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++// CS1525: Unexpected symbol `=', expecting `.', or `['
++// Line: 8
++
++class DerivedClass
++{
++      public DerivedClass ()
++      {
++              base = null;
++      }
++}
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3b9390e35367636465595d902015b47ef86ff731
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++// CS1644: Feature `named argument' cannot be used because it is not part of the C# 3.0 language specification
++// Line: 13
++// Compiler options: -langversion:3
++
++public class C
++{
++      static void Foo (int i)
++      {
++      }
++      
++      public static void Main ()
++      {
++              Foo (i : 3);
++      }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cd6838c375458a9c9c2641556be046aac8b1bd75
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++// CS1738: Named arguments must appear after the positional arguments
++// Line: 13
++// Compiler options: -langversion:future
++
++using System;
++
++class MyAttribute : Attribute
++{
++      public MyAttribute (string s, int value)
++      {
++      }
++}
++
++[MyAttribute (s : "a", 1)]
++class C
++{
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e2a5ab579003ee132c3b72f2fd1558b8498dd6bf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++// CS1738: Named arguments must appear after the positional arguments
++// Line: 12
++// Compiler options: -langversion:future
++
++class C
++{
++      static void Foo (int a, string s)
++      {
++      }
++      
++      public static void Main ()
++      {
++              Foo (a : 1,  "out");
++      }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83b7dd069ac2df9273e006f63472bbcff5858c72
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++// CS0853: An expression tree cannot contain named argument
++// Line: 15
++// Compiler options: -langversion:future
++
++using System;
++using System.Linq.Expressions;
++
++class M
++{
++      static void Named (int i)
++      {
++      }
++      
++      public static void Main ()
++      {
++              Expression<Action> e = () => Named (i : 1);
++      }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fe15bdb2c8bc4902f458c09a9bfefa56f2790de0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++// CS0854: An expression tree cannot contain an invocation which uses optional parameter
++// Line: 15
++// Compiler options: -langversion:future
++
++using System;
++using System.Linq.Expressions;
++
++class M
++{
++      static void Optional (int i, string s = "value")
++      {
++      }
++      
++      public static void Main ()
++      {
++              Expression<Action> e = () => Optional (1);
++      }
++}