[nem-bug] [Nemerle 0000619]: Losing type coersion between short and
int
feedback at nemerle.org
feedback at nemerle.org
Wed Feb 15 07:27:17 CET 2006
The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=619>
======================================================================
Reported By: kanru
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 619
Category: Compiler (type engine)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 02-15-2006 07:27 CET
Last Modified: 02-15-2006 07:27 CET
======================================================================
Summary: Losing type coersion between short and int
Description:
mutable s : short = 0;
s = s + 2;
s += 2;
mutable u : byte = 0;
u = u + 2;
u += 2;
Compiling above code got:
t.n:2:1:2:10: error: expected System.Int16, got int in assigned value:
System.Int32 is not a subtype of System.Int16 [simple require]
t.n:3:1:3:7: error: expected System.Int16, got int in assigned value:
System.Int32 is not a subtype of System.Int16 [simple require]
t.n:5:1:5:10: error: expected System.Byte, got int in assigned value:
System.Int32 is not a subtype of System.Byte [simple require]
t.n:6:1:6:7: error: expected System.Byte, got int in assigned value:
System.Int32 is not a subtype of System.Byte [simple require]
Seems the compiler always treats number_literal as Int32.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
02-15-06 07:27 kanru New Issue
======================================================================
More information about the bugs
mailing list