diff options
author | Marek Safar <marek.safar@gmail.com> | 2009-08-19 14:58:38 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2009-08-19 14:58:38 +0400 |
commit | 0bd4004c832f6c5a02c35cada2b6fdbedd1563a2 (patch) | |
tree | f00ca9380c317dd25c72e848fd610562510bd64e /mcs/errors | |
parent | 74f5e93b131973ae5e6e3cf7b39617fcd916bd22 (diff) | |
parent | 0e57ff8832e0480dd28d7d6bd49372d005f55068 (diff) |
New tests.
svn path=/trunk/mcs/; revision=140231
Diffstat (limited to 'mcs/errors')
-rw-r--r-- | mcs/errors/cs0027-4.cs | 7 | ||||
-rw-r--r-- | mcs/errors/cs0206-2.cs | 27 | ||||
-rw-r--r-- | mcs/errors/cs0432-3.cs | 6 | ||||
-rw-r--r-- | mcs/errors/cs0533-4.cs (renamed from mcs/errors/cs0534-5.cs) | 2 | ||||
-rw-r--r-- | mcs/errors/cs1967.cs | 6 |
5 files changed, 47 insertions, 1 deletions
diff --git a/mcs/errors/cs0027-4.cs b/mcs/errors/cs0027-4.cs new file mode 100644 index 00000000000..cae5dc92128 --- /dev/null +++ b/mcs/errors/cs0027-4.cs @@ -0,0 +1,7 @@ +// CS0027: Keyword `this' is not available in the current context +// Line: 6 + +class Program +{ + const object y = this; +} diff --git a/mcs/errors/cs0206-2.cs b/mcs/errors/cs0206-2.cs new file mode 100644 index 00000000000..21059069246 --- /dev/null +++ b/mcs/errors/cs0206-2.cs @@ -0,0 +1,27 @@ +// CS0206: A property or indexer may not be passed as an out or ref parameter +// Line: 22 + +using System; + +namespace N +{ + public class Test + { + public double this[int i] + { + get { return 1; } + } + + public static void WriteOutData(out double d) + { + d = 5.0; + } + + public static void Main(string[] args) + { + Test test = new Test(); + WriteOutData(out test[1]); + } + } +} + diff --git a/mcs/errors/cs0432-3.cs b/mcs/errors/cs0432-3.cs new file mode 100644 index 00000000000..492aac16bb1 --- /dev/null +++ b/mcs/errors/cs0432-3.cs @@ -0,0 +1,6 @@ +// CS0432: Alias `Sa' not found +// Line: 6 + +using S = System; + +[assembly: Sa::CLSCompliantAttribute (false)] diff --git a/mcs/errors/cs0534-5.cs b/mcs/errors/cs0533-4.cs index 66b2a27ceec..4d2eee8243c 100644 --- a/mcs/errors/cs0534-5.cs +++ b/mcs/errors/cs0533-4.cs @@ -1,4 +1,4 @@ -// CS0534: `B' does not implement inherited abstract member `A.MyEvent.add' +// CS0533: `B.MyEvent' hides inherited abstract member `A.MyEvent' // Line: 11 using System; diff --git a/mcs/errors/cs1967.cs b/mcs/errors/cs1967.cs new file mode 100644 index 00000000000..696c979c017 --- /dev/null +++ b/mcs/errors/cs1967.cs @@ -0,0 +1,6 @@ +// CS1967: A constraint cannot be the dynamic type +// Line: 4 + +class C<T> where T : dynamic +{ +} |