Browse files

Add regression test to #666008

  • Loading branch information...
1 parent 8a4ece0 commit 1be9686bd4cc3d598ebb41dc73613b491ba72c1e @kumpera kumpera committed Feb 5, 2011
Showing with 30 additions and 1 deletion.
  1. +2 −1 mono/tests/Makefile.am
  2. +28 −0 mono/tests/bug-666008.cs
View
3 mono/tests/Makefile.am
@@ -371,7 +371,8 @@ BASE_TEST_CS_SRC= \
bug-599469.cs \
bug-389886-3.cs \
monitor.cs \
- dynamic-method-resurrection.cs
+ dynamic-method-resurrection.cs \
+ bug-666008.cs
TEST_CS_SRC_DIST= \
$(BASE_TEST_CS_SRC) \
View
28 mono/tests/bug-666008.cs
@@ -0,0 +1,28 @@
+using System;
+
+abstract class Foo<T>
+{
+ public virtual int OnReloaded () {
+ Console.WriteLine ("HIT!");
+ return 0;
+ }
+}
+
+class Bar<T> : Foo<T>
+{
+ public int DoIt (Func<int> a) {
+ return a ();
+ }
+
+ public override int OnReloaded () {
+ return DoIt (base.OnReloaded);
+ }
+}
+
+public class Tests
+{
+ public static int Main (String[] args) {
+ var b = new Bar<string> ();
+ return b.OnReloaded ();
+ }
+}

0 comments on commit 1be9686

Please sign in to comment.