[nem-bug] [Nemerle 0000898]: 'int' treated as an identifier even if
used without verbatim specifier (@)
feedback at nemerle.org
feedback at nemerle.org
Wed Feb 14 13:47:53 CET 2007
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=898>
======================================================================
Reported By: nikov
Assigned To: nikov
======================================================================
Project: Nemerle
Issue ID: 898
Category: Compiler
Reproducibility: always
Severity: minor
Priority: low
Status: resolved
Resolution: not an issue
Fixed in Version:
======================================================================
Date Submitted: 02-14-2007 11:43 CET
Last Modified: 02-14-2007 13:47 CET
======================================================================
Summary: 'int' treated as an identifier even if used without
verbatim specifier (@)
Description:
public class Class1
{
public Foo() : void {
def x = int => 0;
}
}
Ncc treats 'int' as a lambda parameter name '@int' here.
Should issue an error.
======================================================================
----------------------------------------------------------------------
nazgul - 02-14-07 12:03
----------------------------------------------------------------------
This is by design: int is just like any other type name and can be
overriden as local variable, like
using System;
def Int32 = "sss";
Console.WriteLine (Int32);
----------------------------------------------------------------------
nikov - 02-14-07 13:33
----------------------------------------------------------------------
Do you mean that primitive types aliases are not treated as keywords, and
may be used as ordinary identifiers?
And why this does not compile:
public Foo() : void {
def x = void => 0;
}
?
----------------------------------------------------------------------
nazgul - 02-14-07 13:41
----------------------------------------------------------------------
void is a keyword. but yes, primitive types are just aliases for long
names... Hm, I guess void could also be such, though it should be verified
----------------------------------------------------------------------
nikov - 02-14-07 13:47
----------------------------------------------------------------------
So, it is not an issue.
I will add a note in wiki documentation, because this behavior is
different from C#.
Issue History
Date Modified Username Field Change
======================================================================
02-14-07 11:43 nikov New Issue
02-14-07 12:03 nazgul Note Added: 0001721
02-14-07 13:33 nikov Note Added: 0001722
02-14-07 13:41 nazgul Note Added: 0001723
02-14-07 13:47 nikov Status new => resolved
02-14-07 13:47 nikov Resolution open => not an issue
02-14-07 13:47 nikov Assigned To => nikov
02-14-07 13:47 nikov Note Added: 0001724
======================================================================
More information about the bugs
mailing list