[Mono-bugs] [Bug 608362] New: When using 'out' as a variable, should warn about it being a keyword

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 24 13:00:08 EDT 2010



           Summary: When using 'out' as a variable, should warn about it
                    being a keyword
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: knocte at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:
Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729; .NET4.0E)

public static class MainClass
    int TestOutString()
        string out = "hola";
        return out.Length;

gmcs returns:
CS1525: Unexpected symbol 'out', expecting '.', '?', '[', '<operator>' or

csc returns two errors:
- Invalid expression term 'out'
- Identifier expected; 'out' is a keyword

This issue is minor, but yet it is interesting since C# noobs may run into this
(without knowing 'out' is a keyword) and get confused.

Reproducible: Always

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list