[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:41:06 CET 2007


A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=898> 
======================================================================
Reported By:                nikov
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   898
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     new
======================================================================
Date Submitted:             02-14-2007 11:43 CET
Last Modified:              02-14-2007 13:41 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

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                          
======================================================================




More information about the bugs mailing list