[Mono-bugs] [Bug 81855][Wis] New - using declarations that reference generic types before an [assembly:] attribute causes compiler error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jun 11 11:07:55 EDT 2007


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 jonpryor at vt.edu.

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

--- shadow/81855	2007-06-11 11:07:55.000000000 -0400
+++ shadow/81855.tmp.22137	2007-06-11 11:07:55.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 81855
+Product: Mono: Compilers
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jonpryor at vt.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: using declarations that reference generic types before an [assembly:] attribute causes compiler error
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+`using' declarations that reference generic types before an [assembly:]
+attribute causes compiler error
+
+Steps to reproduce the problem:
+1. Save the following code:
+
+	using System;
+	using System.Collections.Generic;
+	using System.Reflection;
+
+	using StringList = System.Collections.Generic.List<string>;
+
+	[assembly: AssemblyTitle("Monodocer - The Mono Documentation Tool")]
+
+	class Test {
+		public static void Main ()
+		{
+		}
+	}
+
+2. Compile with gmcs: gmcs t.cs
+3. Profit!
+
+Actual Results:
+
+t.cs(8,12): error CS0657: `assembly' is not a valid attribute location for
+this declaration. Valid attribute locations for this declaration are `type'
+t.cs(8,12): error CS0592: The attribute
+`System.Reflection.AssemblyTitleAttribute' is not valid on this declaration
+type. It is valid on `assembly' declarations only
+Compilation failed: 2 error(s), 0 warnings
+
+That error message doesn't even make sense!
+
+Expected Results:
+
+No error.
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+CSC 2.0 is able to compile this w/o error.
+
+Moving the [assembly:...] attribute to the end of the file allows gmcs to
+compile it.


More information about the mono-bugs mailing list