diff options
author | Miguel de Icaza <miguel@gnome.org> | 2002-03-06 00:28:50 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2002-03-06 00:28:50 +0300 |
commit | 620746bb06dcc60da8cc5e1d3604a83151faf08f (patch) | |
tree | 41313d131e856f3fc8394df2614bdfd40d64adbc /mcs/tests/test-80.cs | |
parent | cbe6d62e7ec372cab2736ac7ef71b764ddd44d1f (diff) |
Bug fixes and a couple of optimizations (used a nice profiler to find
a few easy to fix hot spots):
2002-03-05 Miguel de Icaza <miguel@ximian.com>
* typemanager.cs (NoTypes): Move the definition for the empty Type
array here.
* class.cs (TypeContainer.FindMembers): Also look for methods defined by
properties.
(TypeContainer.DefineProxy): New function used to proxy to parent
implementations when implementing interfaces.
(TypeContainer.ParentImplements): used to lookup if our parent
implements a public function that is required by an interface.
(TypeContainer.VerifyPendingMethods): Hook this up.
* typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
`modules' and `assemblies' arraylists into arrays. We only grow
these are the very early start up of the program, so this improves
the speedof LookupType (nicely measured).
svn path=/trunk/mcs/; revision=2929
Diffstat (limited to 'mcs/tests/test-80.cs')
-rwxr-xr-x | mcs/tests/test-80.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mcs/tests/test-80.cs b/mcs/tests/test-80.cs new file mode 100755 index 00000000000..ec2270b1c40 --- /dev/null +++ b/mcs/tests/test-80.cs @@ -0,0 +1,32 @@ +// +// This test is used to check that we can actually use implementations +// provided in our parent to interfaces declared afterwards. +// + +using System; + +public interface A { + int Add (int a, int b); +} + +public class X { + public int Add (int a, int b) + { + return a + b; + } +} + +class Y : X, A { + + static int Main () + { + Y y = new Y (); + + if (y.Add (1, 1) != 2) + return 1; + + Console.WriteLine ("parent interface implementation test passes"); + return 0; + } + +} |