Bug 314300 (MONO56465) - [PATCH] The argument to the IndexerName attribute must be a valid identifier
Summary: [PATCH] The argument to the IndexerName attribute must be a valid identifier
Status: RESOLVED FIXED
Alias: MONO56465
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Ben Maurer
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2004-04-04 20:28 UTC by Ben Maurer
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
patch (2.98 KB, patch)
2004-04-07 02:07 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:32:48 UTC


---- Reported by bmaurer@users.sf.net 2004-04-04 13:28:31 MST ----

We compile:
public class MonthDays {
   [System.Runtime.CompilerServices.IndexerName ("buggypo for you")]
   public int this [int a] {
      get {
         return 0;
      }
   }

   public static void Main ()
   {
	int i = new MonthDays () [1];
   }
}

csc gives:
C:\Inetpub\ftproot>csc t.cs
t.cs(2,50): error CS0633: The argument to the IndexerName attribute must 
be a
        valid identifier

PEVerify gives errors on the exe we generate.



---- Additional Comments From miguel@ximian.com 2004-04-05 23:37:44 MST ----

fixed.



---- Additional Comments From bmaurer@users.sf.net 2004-04-06 00:35:57 MST ----

am reopening it because I know there are corner cases here ("", "\n",
and "\0" are there quick examples).

I will fix this.



---- Additional Comments From bmaurer@users.sf.net 2004-04-06 00:36:19 MST ----

I hate that it takes two clicks to open + assign



---- Additional Comments From bmaurer@users.sf.net 2004-04-06 00:36:40 MST ----

especially when you make a typo ;-)



---- Additional Comments From ClassDevelopment@A-SoftTech.com 2004-04-06 15:40:49 MST ----

System/System.CodeDom.Compiler/CodeGenerator.cs contains a static 
method:
public static bool IsValidLanguageIndependentIdentifier (string 
value)
 
Maybe that could be of use here.



---- Additional Comments From bmaurer@users.sf.net 2004-04-06 19:07:19 MST ----

Created an attachment (id=165848)
patch




---- Additional Comments From miguel@ximian.com 2004-04-10 15:42:37 MST ----

Applied the patch.

Imported an attachment (id=165848)

Unknown operating system unknown. Setting to default OS "Other".