Version franaise
Home About Download Resources Contact us
Browse thread
Recursive parametrized classes bug?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Сергей_ Плаксин <serp@s...>
Subject: Recursive parametrized classes bug?
>>> cat test.ml
class type ['a] a  =
  object
    method v: 'a
  end
and b =
  object
    inherit [int] a
  end
and c =
  object
    inherit [float] a
  end
=======
File "test.ml", line 15, characters 13-18:
The type parameter float does not meet its constraint: it should be int

---------------------
Whithou recursion it compiled successfully.

class type ['a] a  =
  object
    method v: 'a
  end

class type b =
  object
    inherit [int] a
  end

class type c =
  object
    inherit [float] a
  end