[nem-bug] [Nemerle 0000773]: match and type inference
feedback at nemerle.org
feedback at nemerle.org
Mon Oct 2 10:29:36 CEST 2006
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=773>
======================================================================
Reported By: IT
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 773
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 10-02-2006 01:00 CEST
Last Modified: 10-02-2006 10:29 CEST
======================================================================
Summary: match and type inference
Description:
I am not sure this is a bug, but looks like that.
public variant Var
{
| Opt
}
public module Program
{
Main() : void
{
def boo1(v : Var)
{
| Opt => () // ok
}
def boo2(v)
{
| Opt => () // error: unbound type name Opt
}
boo1(Var.Opt());
boo2(Var.Opt());
}
}
======================================================================
----------------------------------------------------------------------
malekith - 10-02-06 10:29
----------------------------------------------------------------------
It's a lack of fetaure ;-)
The problem is that typing of matching is not delayed. Therefore it needs
more type information than, say, member access.
One can enforce the parameter type, the type of matched value or use
Var.Opt for matching, but you probably already know that.
It would be nice to implement this though :-)
Issue History
Date Modified Username Field Change
======================================================================
10-02-06 01:00 IT New Issue
10-02-06 10:29 malekith Note Added: 0001466
======================================================================
More information about the bugs
mailing list