[Mono-bugs] [Bug 76076][Min] New - Using void as type parameter
crashes runtime
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Sep 12 19:53:59 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kiess at h3c.de.
http://bugzilla.ximian.com/show_bug.cgi?id=76076
--- shadow/76076 2005-09-12 19:53:59.000000000 -0400
+++ shadow/76076.tmp.30236 2005-09-12 19:53:59.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 76076
+Product: Mono: Runtime
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: misc
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: kiess at h3c.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Using void as type parameter crashes runtime
+
+Description of Problem: Using void as a type parameter for a generic type
+compiles fine but crashes the runtime.
+
+
+Steps to reproduce the problem:
+1. cat > test.cs << EOF
+class A<T> {
+ public static void Print() {
+ System.Console.WriteLine (typeof(T));
+ }
+
+ public static void Fun() {
+ T x;
+ }
+}
+
+class M {
+ public static void Main() {
+ A<void>.Print(); // Works
+ A<void>.Fun(); // Crashes
+ }
+}
+EOF
+2. gmcs test.cs
+3. mono test.exe
+
+Actual Results:
+System.Void
+
+** ERROR **: unknown type 0x01 in type_to_stind
+aborting...
+
+
+Expected Results:
+I don't know wether void is allowed as a type parameter. However, the code
+should either refuse to compile or it should run cleanly.
+
+How often does this happen?
+always
+
+Additional Information:
+I'm using mono 1.1.9
More information about the mono-bugs
mailing list