Bugzilla – Bug 315726
[gmcs] syntax error if an unbound-generic-type is used in a typeof-expression
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by arhra@arslinux.com 2004-08-08 13:35:17 MST ---- 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 ---- Additional Comments From arhra@arslinux.com 2004-08-08 13:37:04 MST ---- Created an attachment (id=166606) output of gmcs --parse -v on testcase ---- Additional Comments From martin@ximian.com 2004-08-16 12:22:01 MST ---- Fixed in CVS. Imported an attachment (id=166606) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>debian sid</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".