[nem-bug] [Nemerle 0000636]: lock (expr) will evaluate expr twice

feedback at nemerle.org feedback at nemerle.org
Thu Mar 23 21:14:03 CET 2006


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=636> 
======================================================================
Reported By:                steffen
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   636
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             03-23-2006 21:14 CET
Last Modified:              03-23-2006 21:14 CET
======================================================================
Summary:                    lock (expr) will evaluate expr twice
Description: 
The lock macro evaluates its argument twice.

    <[
      System.Threading.Monitor.Enter ($x);
      try {
        $body
      } finally {
        System.Threading.Monitor.Exit ($x);
      }
    ]>

should probably look like this:

    <[
      def obj = $x : object;
      System.Threading.Monitor.Enter (obj);
      try {
        $body
      } finally {
        System.Threading.Monitor.Exit (obj);
      }
    ]>


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

Issue History
Date Modified  Username       Field                    Change              
======================================================================
03-23-06 21:14 steffen        New Issue                                    
======================================================================




More information about the bugs mailing list