diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2004-06-07 16:34:15 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2004-06-07 16:34:15 +0400 |
commit | 1b0107aba94dd280aa0640f9d327802a5d98d8e7 (patch) | |
tree | 24b75080f3a8265a09b1e76b65c25c5f923b95de /mcs/errors/cs0038-2.cs | |
parent | 7412e7bb115f6ebc640c61c2e656d42c984c348c (diff) |
* cs0038-2.cs: New test, from bug #59477.
* mcs-expect-wrong-error: Add cs0038-1.
svn path=/trunk/mcs/; revision=28961
Diffstat (limited to 'mcs/errors/cs0038-2.cs')
-rw-r--r-- | mcs/errors/cs0038-2.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mcs/errors/cs0038-2.cs b/mcs/errors/cs0038-2.cs new file mode 100644 index 00000000000..09337158b13 --- /dev/null +++ b/mcs/errors/cs0038-2.cs @@ -0,0 +1,17 @@ +// CS0038: Cannot access nonstatic member `MyEnum' of outer type `X' via nested type `X+Nested' +// Line: 9 +public enum MyEnum { V = 1 } + +class X { + public MyEnum MyEnum; + class Nested { + internal MyEnum D () { + return MyEnum; + } + } + + static int Main () { + Nested n = new Nested (); + return n.D() == MyEnum.V ? 0 : 1; + } +} |