[nem-en] Matching on indexer properties

Snaury snaury at gmail.com
Wed Jun 28 13:58:45 CEST 2006


Do I miss something here?

    public StringToCorrectString(s: string) : string
    {
      match(s) {
        | null
        | (Length = 0) => s;
        | (Chars[0] = '=')
        | (Chars[0] = '\'') => "'" + s;
        | _ => s;
      }
    }

Kitsu.Excel.n:89:12:89:26: ←[01;31merror←[0m: pattern matches 1
values, while the type `System.String' has 0 fields
Kitsu.Excel.n:90:12:90:27: ←[01;31merror←[0m: pattern matches 1
values, while the type `System.String' has 0 fields

At the same time it doesn't complain about Length (although it is also
not a field, it is a property). How can one match on indexer
properties?


More information about the devel-en mailing list