[nem-bug] [Nemerle 0000670]: Can't set the value of byte array element with index not divisible by 4 without explicit cast.

feedback at nemerle.org feedback at nemerle.org
Fri May 12 11:49:46 CEST 2006


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=670> 
======================================================================
Reported By:                eelya
Assigned To:                malekith
======================================================================
Project:                    Nemerle
Issue ID:                   670
Category:                   Compiler
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             05-12-2006 09:09 CEST
Last Modified:              05-12-2006 11:49 CEST
======================================================================
Summary:                    Can't set the value of byte array element with index
not divisible by 4 without explicit cast.
Description: 
Code: 

using System;
using System.Console;

   def a = array(2) : array[Byte];
   a[1] = 42;
   WriteLine("a[1] = {0}", a[1]);

makes output: 
   a[1] = 0

If expression a[1] = 42 :> Byte; is used instead of one above the output
is 
   a[1] = 42

(The same thing with any other index not divisible by 4)
======================================================================

----------------------------------------------------------------------
 VladD2 - 05-12-06 10:55 
----------------------------------------------------------------------
Bug in IL generation. Nemerle produce:
ldc.i4.s 42
stelem.i4 

But need:
ldc.i4.s 42
stelem.i1

----------------------------------------------------------------------
 malekith - 05-12-06 11:49 
----------------------------------------------------------------------
Resolved on trunk, r6256.

Thanks!

Issue History
Date Modified  Username       Field                    Change              
======================================================================
05-12-06 09:09 eelya          New Issue                                    
05-12-06 10:55 VladD2         Note Added: 0001274                          
05-12-06 11:49 malekith       Status                   new => resolved     
05-12-06 11:49 malekith       Resolution               open => fixed       
05-12-06 11:49 malekith       Assigned To               => malekith        
05-12-06 11:49 malekith       Note Added: 0001275                          
======================================================================




More information about the bugs mailing list