[nem-bug] [Nemerle 0000635]: When _ + _ is used inside a @+
definition, the wrong + is used.
feedback at nemerle.org
feedback at nemerle.org
Wed Jun 27 14:45:09 CEST 2007
The following issue has been set as RELATED TO issue 0001026.
======================================================================
<http://nemerle.org/bugs/view.php?id=635>
======================================================================
Reported By: d
Assigned To: malekith
======================================================================
Project: Nemerle
Issue ID: 635
Category: Compiler (type engine)
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 03-17-2006 20:11 CET
Last Modified: 06-27-2007 14:45 CEST
======================================================================
Summary: When _ + _ is used inside a @+ definition, the wrong
+ is used.
Description:
using Nemerle.Collections.List;
[Record]
public class T {
public x : list [int];
public y : list [int];
public static @+ (a : T, b : T) : T {
T (Map2 (a.x, b.x, _+_), Map2 (a.y, b.y, _+_))
}
}
/*
test.n:9:8:9:12: error: in argument http://nemerle.org/bugs/view.php?id=3 (f),
needed a (int * int) ->
System.Object+, got (T+ * T+) -> T-: the types (int * int) and (int * T+)
are not compatible [simple unify]
test.n:9:8:9:12: error: typing error in call
test.n:9:30:9:34: error: in argument http://nemerle.org/bugs/view.php?id=3 (f),
needed a (int * int) ->
System.Object+, got (T+ * T+) -> T-: the types (int * int) and (int * T+)
are not compatible [simple unify]
test.n:9:30:9:34: error: typing error in call
*/
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0001026 user-defined operators break type-infer...
======================================================================
----------------------------------------------------------------------
nazgul - 05-04-06 21:24
----------------------------------------------------------------------
This only happens with delayed typing. If the types of parameters are known
from the start, then it works fine.
Issue History
Date Modified Username Field Change
======================================================================
03-17-06 20:11 d New Issue
05-04-06 21:24 nazgul Note Added: 0001229
05-05-06 13:27 malekith Status new => assigned
05-05-06 13:27 malekith Assigned To => malekith
06-27-07 14:33 divan Issue Monitored: divan
06-27-07 14:45 divan Relationship added related to 0001026
======================================================================
More information about the bugs
mailing list