diff options
author | Martin Baulig <martin@novell.com> | 2003-07-14 20:40:42 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2003-07-14 20:40:42 +0400 |
commit | 6872f858c1b7b6685fa88000108aa81176eafd5a (patch) | |
tree | 4831b1b395492f1664f0e9f49a88c91a4b06d6f3 /mcs/errors/cs0212.cs | |
parent | 7fb5f2c48763c621359fe34bb51a51d821d43e56 (diff) |
2003-07-14 Martin Baulig <martin@ximian.com>
* cs0212.cs: New test.
svn path=/trunk/mcs/; revision=16225
Diffstat (limited to 'mcs/errors/cs0212.cs')
-rw-r--r-- | mcs/errors/cs0212.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mcs/errors/cs0212.cs b/mcs/errors/cs0212.cs new file mode 100644 index 00000000000..d51f6748ace --- /dev/null +++ b/mcs/errors/cs0212.cs @@ -0,0 +1,19 @@ +// cs0212: You can only take the address of an unfixed expression inside +// a fixed statement initializer. +// Line: 17 +using System; + +class X +{ + public int x; + public X () + { + this.x = 4; + } + + public unsafe static void Main () + { + X x = new X (); + int *p = &x.x; + } +} |