Skip to content

Commit

Permalink
test case for bug #78431.
Browse files Browse the repository at this point in the history
svn path=/trunk/mono/; revision=71284
  • Loading branch information
illupus committed Jan 18, 2007
1 parent 5ce1370 commit d58f62d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions mono/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ TEST_IL_SRC= \
TEST_CS2_SRC = \
interlocked-2.2.cs \
pinvoke-2.2.cs \
bug-78431.2.cs \
bug-79684.2.cs \
catch-generics.2.cs \
event-get.2.cs \
Expand Down
32 changes: 32 additions & 0 deletions mono/tests/bug-78431.2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
public class Pair <T> {
public T fst;
public T snd;
}

public class RList <T> {
public class Nil : RList <T> {}
public class Zero : RList <T> {
public RList <Pair <T> > arg;
}

static int _Length (RList <T> xs) {
if (xs is Zero)
return RList <Pair <T> >._Length (((Zero)xs).arg);
else
return 0;
}
public int Length {
get {
return _Length (this);
}
}
}


class M {
public static void Main() {
int x = (new RList<object>.Nil()).Length;
}
}


0 comments on commit d58f62d

Please sign in to comment.