diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2007-10-03 17:22:09 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2007-10-03 17:22:09 +0400 |
commit | 7790e3db2cb7858cab7c59c056609c22f83c4b71 (patch) | |
tree | e0cb28daf279bbb5f1cfd87927b1bb6fabe1fc7c /mcs/tests/test-589.cs | |
parent | c32b72f16cfb1c149550d87a38a365e352e289ab (diff) | |
parent | 0531abbfc9b7a4786368f1ba982b0044c9d72648 (diff) |
Fix #328490
* mcs/ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
Event accessibility checks here. Remove some bogus code that
accidently made GenericMethods work.
(PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
* tests/test-589.cs: Additional test for #328490.
* errors/cs0120-10.cs: New test based on #328490.
svn path=/trunk/mcs/; revision=86807
Diffstat (limited to 'mcs/tests/test-589.cs')
-rw-r--r-- | mcs/tests/test-589.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mcs/tests/test-589.cs b/mcs/tests/test-589.cs new file mode 100644 index 00000000000..ccf81c7c6f9 --- /dev/null +++ b/mcs/tests/test-589.cs @@ -0,0 +1,39 @@ +using System; +using TestNamespace; + +namespace TestNamespace +{ + public class TestClass + { + public static void HelloWorld () + { + } + } +} + +class SuperClass +{ + TestClass tc = null; + + public TestClass TestClass + { + private get { return tc; } + set {} + } +} + +class SubClass : SuperClass +{ + public SubClass () + { + TestClass.HelloWorld (); + } +} + +class App +{ + public static void Main () + { + SubClass sc = new SubClass (); + } +} |