Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2005-04-05 16:50:19 +0400
committerRaja R Harinath <harinath@hurrynot.org>2005-04-05 16:50:19 +0400
commitb51993a0c077fb9828682247db8bf4ac83bd8b37 (patch)
treee45931d9e0c9d68225bb5206ce297f940e6979b4 /mcs/errors/cs0208-6.cs
parent28e691a58ebb6db6dc1b1a06f6ad1d7e741ed8c0 (diff)
In mcs:
2005-04-05 John Luke <john.luke@gmail.com> Raja R Harinath <rharinath@novell.com> Fix #62232. * typemanager.cs (IsUnmanagedType): Check non-public fields of a struct too. Return false quicker in a few cases. (VerifyUnManaged): Use it. In errors: * cs0208-5.cs, cs0208-6.cs: New tests from #62232. svn path=/trunk/mcs/; revision=42559
Diffstat (limited to 'mcs/errors/cs0208-6.cs')
-rw-r--r--mcs/errors/cs0208-6.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/mcs/errors/cs0208-6.cs b/mcs/errors/cs0208-6.cs
new file mode 100644
index 00000000000..9321ac27eb3
--- /dev/null
+++ b/mcs/errors/cs0208-6.cs
@@ -0,0 +1,12 @@
+// cs0208-6.cs: Cannot take the address of a managed type ('System.Object')
+// Line: 8
+// Compiler options: -unsafe
+
+unsafe struct X {
+ string a;
+ static void Main () {
+ X x;
+ void* y = &x;
+ }
+}
+