[Nemerle 0001163]: Wrong behavior: IEnumerable[int] and array[int] are not compatible

17 views
Skip to first unread message

feed...@nemerle.org

unread,
Dec 25, 2008, 5:35:48 AM12/25/08
to nemerl...@googlegroups.com

The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1163>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1163
Category: Compiler (type engine)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 12-25-2008 11:35 CET
Last Modified: 12-25-2008 11:35 CET
======================================================================
Summary: Wrong behavior: IEnumerable[int] and array[int] are
not compatible
Description:
The following code leads to error message "Error: types
System.Collections.Generic.IEnumerable[int] and array[int] are not
compatible [during intersection]":
using System.Collections.Generic;

module Program
{
Main() : void
{
def test[TEnu, TOut] (_ : IEnumerable[TEnu]) : void
where TEnu : IEnumerable[int]
{
}

_ = test(array[array[1, 2]]);
}
}

This is a wrong behavior.
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
12-25-08 11:35 VladD2 New Issue
======================================================================

feed...@nemerle.org

unread,
Dec 25, 2008, 7:00:16 AM12/25/08
to nemerl...@googlegroups.com

A NOTE has been added to this issue.

======================================================================
<http://nemerle.org/bugs/view.php?id=1163>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 1163
Category: Compiler (type engine)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 12-25-2008 11:35 CET
Last Modified: 12-25-2008 13:00 CET

======================================================================
Summary: Wrong behavior: IEnumerable[int] and array[int] are
not compatible
Description:
The following code leads to error message "Error: types
System.Collections.Generic.IEnumerable[int] and array[int] are not
compatible [during intersection]":
using System.Collections.Generic;

module Program
{
Main() : void
{
def test[TEnu, TOut] (_ : IEnumerable[TEnu]) : void
where TEnu : IEnumerable[int]
{
}

_ = test(array[array[1, 2]]);
}
}

This is a wrong behavior.
======================================================================

----------------------------------------------------------------------
divan - 12-25-08 13:00
----------------------------------------------------------------------
Also it seems to get ICE here:
internal compiler error: assertion ``res'' failed in file typing/TyVar.n,
line 420: failed to fixate array[int] [] with array[int]
at Nemerle.Compiler.TyVar._N__FT_Fixate_2307()
at Nemerle.Compiler.TyVar.Fix()
at Nemerle.Compiler.Typer4.DoWalk(TExpr expr)
...

And it's about contraints, with following header it compiles fine
test (_ : IEnumerable[IEnumerable[int]]) : void

Issue History
Date Modified Username Field Change
======================================================================
12-25-08 11:35 VladD2 New Issue

12-25-08 13:00 divan Note Added: 0002163
======================================================================

Reply all
Reply to author
Forward
0 new messages