[nem-en] Problem with IComparable /CheckSTV
Marcin Machura
emmar at poczta.wp.pl
Tue Feb 6 14:46:10 CET 2007
Hi
I've found some mischief behavior of this pice of code:
#pragma indent
using Nemerle.IO
using Nemerle.Assertions
using Nemerle.Macros
using Nemerle.Utility
using NC = Nemerle.Collections
using System.Collections.Generic
using System
public class DijkstraSearch[V,E]
private prev : IDictionary[V, Dane]
[Record] class Dane : System.IComparable[Dane]
[Accessor] id : int
[Accessor] imie : string
[Accessor] age : int
[Accessor] a : V
[Accessor] b : E
public CompareTo(x : Dane) : int
id.CompareTo(x.id)
public this()
def q = NC.Heap(1) // def q = 1
if q is instance of Heap, compiler rise:
CheckSTV for
System.IComparable[System.IComparable[System.IComparable[System.IComparable[...]]]] failed: cyclic type found
on the other hand, when q = 1, then everything is correct
This looks someway similar to
http://nemerle.org/mailman/pipermail/bugs/2006-December/002920.html
Best regards
Marcin Machura
More information about the devel-en
mailing list