[nem-bug] [Nemerle 0001056]: incorrect matching of nullable types
feedback at nemerle.org
feedback at nemerle.org
Fri Oct 26 19:05:48 CEST 2007
The following issue has been set as RELATED TO issue 0000673.
======================================================================
<http://nemerle.org/bugs/view.php?id=1056>
======================================================================
Reported By: hi_octane
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1056
Category: Compiler (match compiler)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 10-26-2007 14:54 CEST
Last Modified: 10-26-2007 19:05 CEST
======================================================================
Summary: incorrect matching of nullable types
Description:
the following code:
def a : int? = 10;
match(a)
{
| null => WriteLine("is null!");
//| 10 => WriteLine("ten (10)"); unexpectedly we're unable to use
constants at all
| x => WriteLine($"x = $x");
}
-- types "is null!" with any value stored in a. While the C# compiler
performs well with the similar code:
int? a = 10;
switch(a)
{
case null:
Console.WriteLine("is null!");
break;
case 10:
Console.WriteLine("ten (10)");
break;
default:
Console.WriteLine("a = " + Convert.ToString(a));
break;
}
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0000673 nullable type throw exception on mono 1...
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
10-26-07 14:54 hi_octane New Issue
10-26-07 19:05 divan Relationship added related to 0000673
======================================================================
More information about the bugs
mailing list