diff options
author | Marek Safar <marek.safar@gmail.com> | 2004-05-30 23:08:00 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2004-05-30 23:08:00 +0400 |
commit | 2f31aa3e438455062d2b9ddc02c4b298b68ae620 (patch) | |
tree | b12bec1da8e99e32749e6850d3be747456ba90f1 /mcs/errors/cs0202.cs | |
parent | b18d980fab0178f5d30b59917f94a7c7a4ce98e8 (diff) |
2004-05-30 Marek Safar <marek.safar@seznam.cz>
* cs1017.cs: New test.
svn path=/trunk/mcs/; revision=28494
Diffstat (limited to 'mcs/errors/cs0202.cs')
-rw-r--r-- | mcs/errors/cs0202.cs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/mcs/errors/cs0202.cs b/mcs/errors/cs0202.cs index 4222e17874b..b2950db3c23 100644 --- a/mcs/errors/cs0202.cs +++ b/mcs/errors/cs0202.cs @@ -1,9 +1,22 @@ -// cs0202.cs: GetEnumerator cant return a pointer, only an instance. -// Line: 6 +// cs0202.cs: The call to GetEnumerator must return a class or a struct, not 'Foo.P*' +// Line: 18 +// Compiler options: -unsafe -public class Foo +public unsafe class Foo { - int P* GetEnumerator () - { - } + public class P + { + public P* GetEnumerator () + { + return null; + } + } + + public static void Main () + { + P o = new P (); + foreach (P p in o) + { + } + } } |