Bug 315726 (MONO62677) - [gmcs] syntax error if an unbound-generic-type is used in a typeof-expression
Summary: [gmcs] syntax error if an unbound-generic-type is used in a typeof-expression
Status: RESOLVED FIXED
Alias: MONO62677
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-08 20:35 UTC by Mike Roome
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
output of gmcs --parse -v on testcase (12.40 KB, text/plain)
2004-08-08 20:37 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:49:30 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".