[nem-bug] [Nemerle 0000633]: You cannot overload += or other operators that are defined as macros in macros/operators.n

feedback at nemerle.org feedback at nemerle.org
Mon Mar 6 01:13:51 CET 2006


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=633> 
======================================================================
Reported By:                amp
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   633
Category:                   The Language
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             03-06-2006 01:13 CET
Last Modified:              03-06-2006 01:13 CET
======================================================================
Summary:                    You cannot overload += or other operators that are
defined as macros in macros/operators.n
Description: 
Because the macro is applied before the user defined operators are applied,
the overload is silently ignored.

++ and -- are overloadable, but cannot be applied to immutable variables
because the macro performs an assignment.

I think it is important to allow an arbitrary function to be called by any
operator, because it allows programs to define mini-languages that operate
among a group of classes.

That being said, this issue should at least be documented. 

The operators effected are:
&&, ||, %||, %&&, %^^, ++, --, +=, -=, *=, /=, <<=, >>=, %=, |=, &=, ^=,
<->, ::=

======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
03-06-06 01:13 amp            New Issue                                    
======================================================================




More information about the bugs mailing list