[Mono-bugs] [Bug 62677][Nor] New - [gmcs] syntax error if an unbound-generic-type is used in a typeof-expression

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 8 Aug 2004 13:35:18 -0400 (EDT)


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 arhra@arslinux.com.

http://bugzilla.ximian.com/show_bug.cgi?id=62677

--- shadow/62677	2004-08-08 13:35:18.000000000 -0400
+++ shadow/62677.tmp.18595	2004-08-08 13:35:18.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 62677
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: debian sid
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: arhra@arslinux.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [gmcs] syntax error if an unbound-generic-type is used in a typeof-expression
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem: When using a typeof expression with an unbound
+generic type (Foo<>), gmcs fails, giving a syntax error message.
+
+Steps to reproduce the problem:
+1. Attempt to compile any program containing a typeof(Foo<>) expression
+2. 
+3. 
+
+Actual Results:
+Syntax error.
+
+Expected Results:
+Sucessful compilation.
+
+How often does this happen? 
+Always.
+
+Additional Information:
+
+testcase:
+
+class Foo<T> {}
+
+class C {
+	static void Main() {
+		Type t = typeof(Foo<>);
+	}
+}
+
+gmcs error:
+
+[mike@harmakhis]$ gmcs gentypeof.cs
+ALPHA SOFTWARE: Mono C# Compiler 1.0.0.0 for Generics
+syntax error, got token `OP_LT', expecting OPEN_BRACKET CLOSE_PARENS STAR
+gentypeof.cs(5) error CS1002: Expecting `;'
+Compilation failed: 1 error(s), 0 warnings