diff options
author | Marek Safar <marek.safar@gmail.com> | 2009-08-18 20:23:47 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2009-08-18 20:23:47 +0400 |
commit | 90b26c582a7bcc99f176362b275a698638df5366 (patch) | |
tree | a2bac2fed3ea9d73fcdcb0ea7816f82c14896559 /mcs/errors | |
parent | aa77e2e45a7299f52ac723a472cd232747177670 (diff) |
New tests.
svn path=/trunk/mcs/; revision=140172
Diffstat (limited to 'mcs/errors')
-rw-r--r-- | mcs/errors/cs0026-3.cs | 17 | ||||
-rw-r--r-- | mcs/errors/cs0027-3.cs | 18 | ||||
-rw-r--r-- | mcs/errors/cs0120-14.cs | 20 |
3 files changed, 38 insertions, 17 deletions
diff --git a/mcs/errors/cs0026-3.cs b/mcs/errors/cs0026-3.cs deleted file mode 100644 index b0ec7ea1c56..00000000000 --- a/mcs/errors/cs0026-3.cs +++ /dev/null @@ -1,17 +0,0 @@ -// CS0026: Keyword `this' is not valid in a static property, static method, or static field initializer -// Line: 7 - -class A : B -{ - public A () - : base (this) - { - } -} - -class B -{ - public B (B b) - { - } -}
\ No newline at end of file diff --git a/mcs/errors/cs0027-3.cs b/mcs/errors/cs0027-3.cs new file mode 100644 index 00000000000..cbe891cb14a --- /dev/null +++ b/mcs/errors/cs0027-3.cs @@ -0,0 +1,18 @@ +// CS0007: Keyword `this' is not available in the current context +// Line: 14 + +class B +{ + public B (object o) + { + } +} + +class C : B +{ + public C () + : base (this) + { + } +} + diff --git a/mcs/errors/cs0120-14.cs b/mcs/errors/cs0120-14.cs new file mode 100644 index 00000000000..9066b843c52 --- /dev/null +++ b/mcs/errors/cs0120-14.cs @@ -0,0 +1,20 @@ +// CS0120: An object reference is required to access non-static member `C.i' +// Line: 16 + +class B +{ + public B (object o) + { + } +} + +class C : B +{ + int i; + + public C () + : base (i) + { + } +} + |